Commit 8ed74341ba5c54751e209f571002e5b967abf176

Authored by Heiko Schocher
Committed by Wolfgang Denk
1 parent 1ebbb77a19

ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support

For the kmsupx5 a new header file was introduced km8321-common.h.
Now the common stuff from tuxa1, tuda1 and suvd3 was removed and
the new header file included.

The defines CONFIG_SYS_PIGGY_BASE and CONFIG_SYS_PIGGY_SIZE are
confusing. Because they actually describe the KMBEC FPGA values.
The KMBEC FPGA can be PRIO on kmeter1 or upio on mgcoge. Therefore
all the defines were renamed.

remove unneeded variable CONFIG_KM_DEF_NETDEV, as it is
already declared in keymile-common.h

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

Showing 11 changed files with 36 additions and 359 deletions Side-by-side Diff

board/keymile/common/common.c
... ... @@ -562,7 +562,8 @@
562 562 #if !defined(MACH_TYPE_KM_KIRKWOOD)
563 563 int ethernet_present(void)
564 564 {
565   - struct km_bec_fpga *base = (struct km_bec_fpga *)CONFIG_SYS_PIGGY_BASE;
  565 + struct km_bec_fpga *base =
  566 + (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE;
566 567  
567 568 return in_8(&base->bprth) & PIGGY_PRESENT;
568 569 }
board/keymile/km83xx/km83xx.c
... ... @@ -134,7 +134,8 @@
134 134  
135 135 int board_early_init_r(void)
136 136 {
137   - struct km_bec_fpga *base = (struct km_bec_fpga *)CONFIG_SYS_PIGGY_BASE;
  137 + struct km_bec_fpga *base =
  138 + (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE;
138 139 #if defined(CONFIG_SUVD3)
139 140 immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
140 141 fsl_lbc_t *lbc = &immap->im_lbc;
board/keymile/mgcoge/mgcoge.c
... ... @@ -318,7 +318,8 @@
318 318 */
319 319 int board_early_init_r(void)
320 320 {
321   - struct km_bec_fpga *base = (struct km_bec_fpga *)CONFIG_SYS_PIGGY_BASE;
  321 + struct km_bec_fpga *base =
  322 + (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE;
322 323  
323 324 /* setup the UPIOx */
324 325 /* General Unit Reset disabled, Flash Bank enabled, UnitLed on */
include/configs/keymile-common.h
... ... @@ -102,7 +102,7 @@
102 102 * driver to set the MAC.
103 103 */
104 104 #define CONFIG_CHECK_ETHERNET_PRESENT
105   -#define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_PIGGY_BASE
  105 +#define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_KMBEC_FPGA_BASE
106 106 #define CONFIG_SYS_SLOT_ID_OFF (0x07) /* register offset */
107 107 #define CONFIG_SYS_SLOT_ID_MASK (0x3f) /* mask for slot ID bits */
108 108  
include/configs/km82xx-common.h
... ... @@ -287,20 +287,20 @@
287 287 PSDMR_CL_2)
288 288  
289 289 /*
290   - * GPIO/PIGGY on CS3 initialization values
  290 + * UPIO FPGA (GPIO/PIGGY) on CS3 initialization values
291 291 */
292   -#define CONFIG_SYS_PIGGY_BASE 0x30000000
293   -#define CONFIG_SYS_PIGGY_SIZE 128
  292 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0x30000000
  293 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128
294 294  
295   -#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_PIGGY_BASE & BRx_BA_MSK) |\
  295 +#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_KMBEC_FPGA_BASE & BRx_BA_MSK) |\
296 296 BRx_PS_8 | BRx_MS_GPCM_P | BRx_V)
297 297  
298   -#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) |\
  298 +#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_KMBEC_FPGA_SIZE) |\
299 299 ORxG_CSNT | ORxG_ACS_DIV2 |\
300 300 ORxG_SCY_3_CLK | ORxG_TRLX)
301 301  
302 302 /*
303   - * Board FPGA on CS4 initialization values
  303 + * BFTICU board FPGA on CS4 initialization values
304 304 */
305 305 #define CONFIG_SYS_FPGA_BASE 0x40000000
306 306 #define CONFIG_SYS_FPGA_SIZE 1 /*1KB*/
include/configs/km8321-common.h
... ... @@ -33,9 +33,6 @@
33 33 #define CONFIG_MPC832x /* MPC832x CPU specific */
34 34 #define CONFIG_KM8321 /* Keymile PBEC8321 board specific */
35 35  
36   -#define CONFIG_KM_DEF_NETDEV \
37   - "netdev=eth0\0"
38   -
39 36 #define CONFIG_KM_DEF_ROOTPATH \
40 37 "rootpath=/opt/eldk/ppc_8xx\0"
41 38  
... ... @@ -117,8 +114,8 @@
117 114  
118 115 #define CONFIG_SYS_DDR_TIMING_3 0x00000000
119 116  
120   -#define CONFIG_SYS_PIGGY_BASE 0xE8000000
121   -#define CONFIG_SYS_PIGGY_SIZE 128
  117 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000
  118 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128
122 119  
123 120 /* EEprom support */
124 121 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
include/configs/km83xx-common.h
... ... @@ -121,13 +121,14 @@
121 121 /*
122 122 * PRIO1/PIGGY on the local bus CS1
123 123 */
124   -#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_PIGGY_BASE
  124 +/* Window base at flash base */
  125 +#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_KMBEC_FPGA_BASE
125 126 #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000001A /* 128MB window size */
126 127  
127   -#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_PIGGY_BASE | \
  128 +#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_KMBEC_FPGA_BASE | \
128 129 (1 << BR_PS_SHIFT) | /* 8 bit port size */ \
129 130 BR_V)
130   -#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) | \
  131 +#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_KMBEC_FPGA_SIZE) | \
131 132 OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \
132 133 OR_GPCM_SCY_2 | \
133 134 OR_GPCM_TRLX | OR_GPCM_EAD)
... ... @@ -212,7 +213,7 @@
212 213 #if defined(CONFIG_CMD_NAND)
213 214 #define CONFIG_NAND_KMETER1
214 215 #define CONFIG_SYS_MAX_NAND_DEVICE 1
215   -#define CONFIG_SYS_NAND_BASE CONFIG_SYS_PIGGY_BASE
  216 +#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE
216 217 #endif
217 218  
218 219 #if defined(CONFIG_PCI)
... ... @@ -257,11 +258,11 @@
257 258 #define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U
258 259  
259 260 /* PRIO1, PIGGY: icache cacheable, but dcache-inhibit and guarded */
260   -#define CONFIG_SYS_IBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \
261   - BATL_MEMCOHERENCE)
262   -#define CONFIG_SYS_IBAT2U (CONFIG_SYS_PIGGY_BASE | BATU_BL_128M | \
263   - BATU_VS | BATU_VP)
264   -#define CONFIG_SYS_DBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \
  261 +#define CONFIG_SYS_IBAT2L (CONFIG_SYS_KMBEC_FPGA_BASE | BATL_PP_10 | \
  262 + BATL_MEMCOHERENCE)
  263 +#define CONFIG_SYS_IBAT2U (CONFIG_SYS_KMBEC_FPGA_BASE | BATU_BL_128M | \
  264 + BATU_VS | BATU_VP)
  265 +#define CONFIG_SYS_DBAT2L (CONFIG_SYS_KMBEC_FPGA_BASE | BATL_PP_10 | \
265 266 BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
266 267 #define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
267 268  
include/configs/kmeter1.h
... ... @@ -106,9 +106,11 @@
106 106  
107 107 #define CONFIG_SYS_DDR_TIMING_3 0x00000000
108 108  
109   -#define CONFIG_SYS_PIGGY_BASE 0xE8000000
110   -#define CONFIG_SYS_PIGGY_SIZE 128
111   -#define CONFIG_SYS_PAXE_BASE 0xA0000000
  109 +/* PRIO FPGA */
  110 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000
  111 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128
  112 +/* PAXE FPGA */
  113 +#define CONFIG_SYS_PAXE_BASE 0xA0000000
112 114 #define CONFIG_SYS_PAXE_SIZE 512
113 115  
114 116 /* EEprom support */
include/configs/suvd3.h
... ... @@ -23,98 +23,15 @@
23 23 /*
24 24 * High Level Configuration Options
25 25 */
26   -#define CONFIG_QE /* Has QE */
27   -#define CONFIG_MPC832x /* MPC832x CPU specific */
28 26 #define CONFIG_SUVD3 /* SUVD3 board specific */
29 27 #define CONFIG_HOSTNAME suvd3
30 28 #define CONFIG_KM_BOARD_NAME "suvd3"
31 29  
32 30 #define CONFIG_SYS_TEXT_BASE 0xF0000000
33   -#define CONFIG_KM_DEF_NETDEV \
34   - "netdev=eth0\0"
35 31  
36   -#define CONFIG_KM_DEF_ROOTPATH \
37   - "rootpath=/opt/eldk/ppc_8xx\0"
  32 +/* include common defines/options for all 8321 Keymile boards */
  33 +#include "km8321-common.h"
38 34  
39   -/* include common defines/options for all 83xx Keymile boards */
40   -#include "km83xx-common.h"
41   -
42   -#define CONFIG_MISC_INIT_R 1
43   -
44   -/*
45   - * System IO Config
46   - */
47   -#define CONFIG_SYS_SICRL SICRL_IRQ_CKS
48   -
49   -/*
50   - * Hardware Reset Configuration Word
51   - */
52   -#define CONFIG_SYS_HRCW_LOW (\
53   - HRCWL_LCL_BUS_TO_SCB_CLK_1X1 | \
54   - HRCWL_DDR_TO_SCB_CLK_2X1 | \
55   - HRCWL_CSB_TO_CLKIN_2X1 | \
56   - HRCWL_CORE_TO_CSB_2_5X1 | \
57   - HRCWL_CE_PLL_VCO_DIV_2 | \
58   - HRCWL_CE_TO_PLL_1X3)
59   -
60   -#define CONFIG_SYS_HRCW_HIGH (\
61   - HRCWH_PCI_AGENT | \
62   - HRCWH_PCI_ARBITER_DISABLE | \
63   - HRCWH_CORE_ENABLE | \
64   - HRCWH_FROM_0X00000100 | \
65   - HRCWH_BOOTSEQ_DISABLE | \
66   - HRCWH_SW_WATCHDOG_DISABLE | \
67   - HRCWH_ROM_LOC_LOCAL_16BIT | \
68   - HRCWH_BIG_ENDIAN | \
69   - HRCWH_LALE_NORMAL)
70   -
71   -#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f
72   -#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \
73   - SDRAM_CFG_32_BE | \
74   - SDRAM_CFG_SREN)
75   -#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
76   -#define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
77   -#define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \
78   - (0x200 << SDRAM_INTERVAL_REFINT_SHIFT))
79   -
80   -#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \
81   - CSCONFIG_ODT_WR_CFG | \
82   - CSCONFIG_ROW_BIT_13 | \
83   - CSCONFIG_COL_BIT_10)
84   -
85   -#define CONFIG_SYS_DDR_MODE 0x47860252
86   -#define CONFIG_SYS_DDR_MODE2 0x8080c000
87   -
88   -#define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \
89   - (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \
90   - (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \
91   - (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \
92   - (0 << TIMING_CFG0_WWT_SHIFT) | \
93   - (0 << TIMING_CFG0_RRT_SHIFT) | \
94   - (0 << TIMING_CFG0_WRT_SHIFT) | \
95   - (0 << TIMING_CFG0_RWT_SHIFT))
96   -
97   -#define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_50) | \
98   - (2 << TIMING_CFG1_WRTORD_SHIFT) | \
99   - (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \
100   - (2 << TIMING_CFG1_WRREC_SHIFT) | \
101   - (6 << TIMING_CFG1_REFREC_SHIFT) | \
102   - (2 << TIMING_CFG1_ACTTORW_SHIFT) | \
103   - (6 << TIMING_CFG1_ACTTOPRE_SHIFT) | \
104   - (2 << TIMING_CFG1_PRETOACT_SHIFT))
105   -
106   -#define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \
107   - (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \
108   - (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \
109   - (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \
110   - (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \
111   - (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \
112   - (5 << TIMING_CFG2_CPO_SHIFT))
113   -
114   -#define CONFIG_SYS_DDR_TIMING_3 0x00000000
115   -
116   -#define CONFIG_SYS_PIGGY_BASE 0xE8000000
117   -#define CONFIG_SYS_PIGGY_SIZE 128
118 35 #define CONFIG_SYS_APP1_BASE 0xA0000000
119 36 #define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */
120 37 #define CONFIG_SYS_APP2_BASE 0xB0000000
... ... @@ -124,12 +41,6 @@
124 41 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
125 42  
126 43 /*
127   - * Local Bus Configuration & Clock Setup
128   - */
129   -#define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_1 | LCRR_CLKDIV_2)
130   -#define CONFIG_SYS_LBC_LBCR 0x00000000
131   -
132   -/*
133 44 * Init Local Bus Memory Controller:
134 45 *
135 46 * Bank Bus Machine PortSz Size Device
... ... @@ -182,21 +93,6 @@
182 93 BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
183 94 #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
184 95  
185   -#ifdef CONFIG_PCI
186   -/* PCI MEM space: cacheable */
187   -#define CFG_IBAT6L (CFG_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE)
188   -#define CFG_IBAT6U (CFG_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
189   -#define CFG_DBAT6L CFG_IBAT6L
190   -#define CFG_DBAT6U CFG_IBAT6U
191   -/* PCI MMIO space: cache-inhibit and guarded */
192   -#define CFG_IBAT7L (CFG_PCI1_MMIO_PHYS | BATL_PP_10 | \
193   - BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
194   -#define CFG_IBAT7U (CFG_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
195   -#define CFG_DBAT7L CFG_IBAT7L
196   -#define CFG_DBAT7U CFG_IBAT7U
197   -#else /* CONFIG_PCI */
198   -
199   -/* APP2: icache cacheable, but dcache-inhibit and guarded */
200 96 #define CONFIG_SYS_IBAT6L (CONFIG_SYS_APP2_BASE | BATL_PP_10 | \
201 97 BATL_MEMCOHERENCE)
202 98 #define CONFIG_SYS_IBAT6U (CONFIG_SYS_APP2_BASE | BATU_BL_256M | \
... ... @@ -204,12 +100,6 @@
204 100 #define CONFIG_SYS_DBAT6L (CONFIG_SYS_APP2_BASE | BATL_PP_10 | \
205 101 BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
206 102 #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U
207   -
208   -#define CONFIG_SYS_IBAT7L (0)
209   -#define CONFIG_SYS_IBAT7U (0)
210   -#define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
211   -#define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
212   -#endif /* CONFIG_PCI */
213 103  
214 104 #endif /* __CONFIG_H */
include/configs/tuda1.h
... ... @@ -26,110 +26,20 @@
26 26 /*
27 27 * High Level Configuration Options
28 28 */
29   -#define CONFIG_QE /* Has QE */
30   -#define CONFIG_MPC832x /* MPC832x CPU specific */
31 29 #define CONFIG_TUDA1 /* TUDA1 board specific */
32 30 #define CONFIG_HOSTNAME tuda1
33 31 #define CONFIG_KM_BOARD_NAME "tuda1"
34 32  
35 33 #define CONFIG_SYS_TEXT_BASE 0xF0000000
36   -#define CONFIG_KM_DEF_NETDEV \
37   - "netdev=eth0\0"
38 34  
39   -#define CONFIG_KM_DEF_ROOTPATH \
40   - "rootpath=/opt/eldk/ppc_8xx\0"
  35 +/* include common defines/options for all 8321 Keymile boards */
  36 +#include "km8321-common.h"
41 37  
42   -/* include common defines/options for all 83xx Keymile boards */
43   -#include "km83xx-common.h"
44   -
45   -#define CONFIG_MISC_INIT_R
46   -
47   -/*
48   - * System IO Config
49   - */
50   -#define CONFIG_SYS_SICRL SICRL_IRQ_CKS
51   -
52   -/*
53   - * Hardware Reset Configuration Word
54   - */
55   -#define CONFIG_SYS_HRCW_LOW (\
56   - HRCWL_LCL_BUS_TO_SCB_CLK_1X1 | \
57   - HRCWL_DDR_TO_SCB_CLK_2X1 | \
58   - HRCWL_CSB_TO_CLKIN_2X1 | \
59   - HRCWL_CORE_TO_CSB_2_5X1 | \
60   - HRCWL_CE_PLL_VCO_DIV_2 | \
61   - HRCWL_CE_TO_PLL_1X3)
62   -
63   -#define CONFIG_SYS_HRCW_HIGH (\
64   - HRCWH_PCI_AGENT | \
65   - HRCWH_PCI_ARBITER_DISABLE | \
66   - HRCWH_CORE_ENABLE | \
67   - HRCWH_FROM_0X00000100 | \
68   - HRCWH_BOOTSEQ_DISABLE | \
69   - HRCWH_SW_WATCHDOG_DISABLE | \
70   - HRCWH_ROM_LOC_LOCAL_16BIT | \
71   - HRCWH_BIG_ENDIAN | \
72   - HRCWH_LALE_NORMAL)
73   -
74   -#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f
75   -#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \
76   - SDRAM_CFG_32_BE | \
77   - SDRAM_CFG_2T_EN | \
78   - SDRAM_CFG_SREN)
79   -
80   -#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
81   -#define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
82   -#define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \
83   - (0x200 << SDRAM_INTERVAL_REFINT_SHIFT))
84   -
85   -#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \
86   - CSCONFIG_ODT_WR_CFG | \
87   - CSCONFIG_ROW_BIT_13 | \
88   - CSCONFIG_COL_BIT_10)
89   -
90   -#define CONFIG_SYS_DDR_MODE 0x47860252
91   -#define CONFIG_SYS_DDR_MODE2 0x8080c000
92   -
93   -#define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \
94   - (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \
95   - (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \
96   - (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \
97   - (0 << TIMING_CFG0_WWT_SHIFT) | \
98   - (0 << TIMING_CFG0_RRT_SHIFT) | \
99   - (0 << TIMING_CFG0_WRT_SHIFT) | \
100   - (0 << TIMING_CFG0_RWT_SHIFT))
101   -
102   -#define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_50) | \
103   - (2 << TIMING_CFG1_WRTORD_SHIFT) | \
104   - (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \
105   - (2 << TIMING_CFG1_WRREC_SHIFT) | \
106   - (6 << TIMING_CFG1_REFREC_SHIFT) | \
107   - (2 << TIMING_CFG1_ACTTORW_SHIFT) | \
108   - (6 << TIMING_CFG1_ACTTOPRE_SHIFT) | \
109   - (2 << TIMING_CFG1_PRETOACT_SHIFT))
110   -
111   -#define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \
112   - (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \
113   - (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \
114   - (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \
115   - (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \
116   - (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \
117   - (5 << TIMING_CFG2_CPO_SHIFT))
118   -
119   -#define CONFIG_SYS_DDR_TIMING_3 0x00000000
120   -
121   -
122   -#define CONFIG_SYS_PIGGY_BASE 0xE8000000
123   -#define CONFIG_SYS_PIGGY_SIZE 128
124 38 #define CONFIG_SYS_APP1_BASE 0xA0000000 /* PAXG */
125 39 #define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */
126 40 #define CONFIG_SYS_APP2_BASE 0xB0000000 /* PINC3 */
127 41 #define CONFIG_SYS_APP2_SIZE 256 /* Megabytes */
128 42  
129   -
130   -/* EEprom support */
131   -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
132   -
133 43 /*
134 44 * Local Bus Configuration & Clock Setup
135 45 */
... ... @@ -209,22 +119,6 @@
209 119 BATL_GUARDEDSTORAGE)
210 120 #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
211 121  
212   -#ifdef CONFIG_PCI
213   -/* PCI MEM space: cacheable */
214   -#define CFG_IBAT6L (CFG_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE)
215   -#define CFG_IBAT6U (CFG_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
216   -#define CFG_DBAT6L CFG_IBAT6L
217   -#define CFG_DBAT6U CFG_IBAT6U
218   -/* PCI MMIO space: cache-inhibit and guarded */
219   -#define CFG_IBAT7L (CFG_PCI1_MMIO_PHYS | \
220   - BATL_PP_10 | \
221   - BATL_CACHEINHIBIT | \
222   - BATL_GUARDEDSTORAGE)
223   -#define CFG_IBAT7U (CFG_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
224   -#define CFG_DBAT7L CFG_IBAT7L
225   -#define CFG_DBAT7U CFG_IBAT7U
226   -#else /* CONFIG_PCI */
227   -
228 122 /* PINC3: icache cacheable, but dcache-inhibit and guarded */
229 123 #define CONFIG_SYS_IBAT6L (CONFIG_SYS_APP2_BASE | \
230 124 BATL_PP_10 | \
... ... @@ -243,7 +137,6 @@
243 137 #define CONFIG_SYS_IBAT7U (0)
244 138 #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
245 139 #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
246   -#endif /* CONFIG_PCI */
247 140  
248 141 #endif /* __CONFIG_H */
include/configs/tuxa1.h
... ... @@ -26,115 +26,21 @@
26 26 /*
27 27 * High Level Configuration Options
28 28 */
29   -#define CONFIG_QE /* Has QE */
30   -#define CONFIG_MPC832x /* MPC832x CPU specific */
31 29 #define CONFIG_TUXA1 /* TUXA1 board specific */
32 30 #define CONFIG_HOSTNAME tuxa1
33 31 #define CONFIG_KM_BOARD_NAME "tuxa1"
34 32  
35 33 #define CONFIG_SYS_TEXT_BASE 0xF0000000
36   -#define CONFIG_KM_DEF_NETDEV \
37   - "netdev=eth0\0"
38 34  
39   -#define CONFIG_KM_DEF_ROOTPATH \
40   - "rootpath=/opt/eldk/ppc_8xx\0"
  35 +/* include common defines/options for all 8321 Keymile boards */
  36 +#include "km8321-common.h"
41 37  
42   -/* include common defines/options for all 83xx Keymile boards */
43   -#include "km83xx-common.h"
44   -
45   -#define CONFIG_MISC_INIT_R
46   -
47   -/*
48   - * System IO Config
49   - */
50   -#define CONFIG_SYS_SICRL SICRL_IRQ_CKS
51   -
52   -/*
53   - * Hardware Reset Configuration Word
54   - */
55   -#define CONFIG_SYS_HRCW_LOW (\
56   - HRCWL_LCL_BUS_TO_SCB_CLK_1X1 | \
57   - HRCWL_DDR_TO_SCB_CLK_2X1 | \
58   - HRCWL_CSB_TO_CLKIN_2X1 | \
59   - HRCWL_CORE_TO_CSB_2_5X1 | \
60   - HRCWL_CE_PLL_VCO_DIV_2 | \
61   - HRCWL_CE_TO_PLL_1X3)
62   -
63   -#define CONFIG_SYS_HRCW_HIGH (\
64   - HRCWH_PCI_AGENT | \
65   - HRCWH_PCI_ARBITER_DISABLE | \
66   - HRCWH_CORE_ENABLE | \
67   - HRCWH_FROM_0X00000100 | \
68   - HRCWH_BOOTSEQ_DISABLE | \
69   - HRCWH_SW_WATCHDOG_DISABLE | \
70   - HRCWH_ROM_LOC_LOCAL_16BIT | \
71   - HRCWH_BIG_ENDIAN | \
72   - HRCWH_LALE_NORMAL)
73   -
74   -#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f
75   -#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \
76   - SDRAM_CFG_32_BE | \
77   - SDRAM_CFG_2T_EN | \
78   - SDRAM_CFG_SREN)
79   -#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000
80   -#define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05)
81   -#define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \
82   - (0x200 << SDRAM_INTERVAL_REFINT_SHIFT))
83   -
84   -#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \
85   - CSCONFIG_ODT_WR_CFG | \
86   - CSCONFIG_ROW_BIT_13 | \
87   - CSCONFIG_COL_BIT_10)
88   -
89   -#define CONFIG_SYS_DDR_MODE 0x47860252
90   -#define CONFIG_SYS_DDR_MODE2 0x8080c000
91   -
92   -#define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \
93   - (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \
94   - (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \
95   - (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \
96   - (0 << TIMING_CFG0_WWT_SHIFT) | \
97   - (0 << TIMING_CFG0_RRT_SHIFT) | \
98   - (0 << TIMING_CFG0_WRT_SHIFT) | \
99   - (0 << TIMING_CFG0_RWT_SHIFT))
100   -
101   -#define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_50) | \
102   - (2 << TIMING_CFG1_WRTORD_SHIFT) | \
103   - (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \
104   - (2 << TIMING_CFG1_WRREC_SHIFT) | \
105   - (6 << TIMING_CFG1_REFREC_SHIFT) | \
106   - (2 << TIMING_CFG1_ACTTORW_SHIFT) | \
107   - (6 << TIMING_CFG1_ACTTOPRE_SHIFT) | \
108   - (2 << TIMING_CFG1_PRETOACT_SHIFT))
109   -
110   -#define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \
111   - (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \
112   - (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \
113   - (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \
114   - (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \
115   - (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \
116   - (5 << TIMING_CFG2_CPO_SHIFT))
117   -
118   -#define CONFIG_SYS_DDR_TIMING_3 0x00000000
119   -
120   -#define CONFIG_SYS_PIGGY_BASE 0xE8000000
121   -#define CONFIG_SYS_PIGGY_SIZE 128
122 38 #define CONFIG_SYS_LPXF_BASE 0xA0000000 /* LPXF */
123 39 #define CONFIG_SYS_LPXF_SIZE 256 /* Megabytes */
124 40 #define CONFIG_SYS_PINC2_BASE 0xB0000000 /* PINC2 */
125 41 #define CONFIG_SYS_PINC2_SIZE 256 /* Megabytes */
126 42  
127   -
128   -/* EEprom support */
129   -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
130   -
131 43 /*
132   - * Local Bus Configuration & Clock Setup
133   - */
134   -#define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_1 | LCRR_CLKDIV_2)
135   -#define CONFIG_SYS_LBC_LBCR 0x00000000
136   -
137   -/*
138 44 * Init Local Bus Memory Controller:
139 45 *
140 46 * Bank Bus Machine PortSz Size Device
... ... @@ -201,20 +107,6 @@
201 107 BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
202 108 #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U
203 109  
204   -#ifdef CONFIG_PCI
205   -/* PCI MEM space: cacheable */
206   -#define CFG_IBAT6L (CFG_PCI1_MEM_PHYS | BATL_PP_10 | BATL_MEMCOHERENCE)
207   -#define CFG_IBAT6U (CFG_PCI1_MEM_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
208   -#define CFG_DBAT6L CFG_IBAT6L
209   -#define CFG_DBAT6U CFG_IBAT6U
210   -/* PCI MMIO space: cache-inhibit and guarded */
211   -#define CFG_IBAT7L (CFG_PCI1_MMIO_PHYS | BATL_PP_10 | \
212   - BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)
213   -#define CFG_IBAT7U (CFG_PCI1_MMIO_PHYS | BATU_BL_256M | BATU_VS | BATU_VP)
214   -#define CFG_DBAT7L CFG_IBAT7L
215   -#define CFG_DBAT7U CFG_IBAT7U
216   -#else /* CONFIG_PCI */
217   -
218 110 /* PINC2: icache cacheable, but dcache-inhibit and guarded */
219 111 #define CONFIG_SYS_IBAT6L (CONFIG_SYS_PINC2_BASE | BATL_PP_10 | \
220 112 BATL_MEMCOHERENCE)
... ... @@ -228,7 +120,6 @@
228 120 #define CONFIG_SYS_IBAT7U (0)
229 121 #define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L
230 122 #define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U
231   -#endif /* CONFIG_PCI */
232 123  
233 124 #endif /* __CONFIG_H */