Commit 6defdc0b5552ab1af4a66a8abac8196cbb6b9e15
Exists in
v2017.01-smarct4x
and in
37 other branches
Merge branch 'master' of git://git.denx.de/u-boot-ti
Showing 42 changed files Side-by-side Diff
- arch/arm/cpu/armv7/keystone/clock-k2e.c
- arch/arm/cpu/armv7/keystone/clock-k2hk.c
- arch/arm/cpu/armv7/keystone/clock.c
- arch/arm/cpu/armv7/omap-common/emif-common.c
- arch/arm/cpu/armv7/omap-common/hwinit-common.c
- arch/arm/cpu/armv7/omap5/hw_data.c
- arch/arm/cpu/armv7/omap5/sdram.c
- arch/arm/include/asm/arch-keystone/clock-k2e.h
- arch/arm/include/asm/arch-keystone/clock-k2hk.h
- arch/arm/include/asm/arch-keystone/clock.h
- arch/arm/include/asm/arch-keystone/hardware.h
- arch/arm/include/asm/arch-omap5/mem.h
- board/compulab/cm_t54/cm_t54.c
- board/ti/am335x/Kconfig
- board/ti/am335x/board.c
- board/ti/am335x/mux.c
- board/ti/am43xx/board.c
- board/ti/am43xx/mux.c
- board/ti/dra7xx/evm.c
- board/ti/dra7xx/mux_data.h
- board/ti/ks2_evm/board_k2e.c
- board/ti/ks2_evm/board_k2hk.c
- common/Makefile
- configs/am335x_evm_defconfig
- configs/am335x_evm_nor_defconfig
- configs/am335x_evm_norboot_defconfig
- configs/am335x_evm_spiboot_defconfig
- configs/am335x_evm_uart1_defconfig
- configs/am335x_evm_uart2_defconfig
- configs/am335x_evm_uart3_defconfig
- configs/am335x_evm_uart4_defconfig
- configs/am335x_evm_uart5_defconfig
- configs/am335x_evm_usbspl_defconfig
- doc/README.cfi
- include/configs/am335x_evm.h
- include/configs/am43xx_evm.h
- include/configs/cm_t54.h
- include/configs/dra7xx_evm.h
- include/configs/pcm051.h
- include/configs/tam3517-common.h
- include/configs/ti_armv7_common.h
- include/configs/tseries.h
arch/arm/cpu/armv7/keystone/clock-k2e.c
... | ... | @@ -17,6 +17,22 @@ |
17 | 17 | [DDR3_PLL] = {KS2_DDR3APLLCTL0, KS2_DDR3APLLCTL1}, |
18 | 18 | }; |
19 | 19 | |
20 | +int dev_speeds[] = { | |
21 | + SPD800, | |
22 | + SPD850, | |
23 | + SPD1000, | |
24 | + SPD1250, | |
25 | + SPD1350, | |
26 | + SPD1400, | |
27 | + SPD1500, | |
28 | + SPD1400, | |
29 | + SPD1350, | |
30 | + SPD1250, | |
31 | + SPD1000, | |
32 | + SPD850, | |
33 | + SPD800 | |
34 | +}; | |
35 | + | |
20 | 36 | /** |
21 | 37 | * pll_freq_get - get pll frequency |
22 | 38 | * Fout = Fref * NF(mult) / NR(prediv) / OD |
arch/arm/cpu/armv7/keystone/clock-k2hk.c
... | ... | @@ -19,6 +19,38 @@ |
19 | 19 | [DDR3B_PLL] = {KS2_DDR3BPLLCTL0, KS2_DDR3BPLLCTL1}, |
20 | 20 | }; |
21 | 21 | |
22 | +int dev_speeds[] = { | |
23 | + SPD800, | |
24 | + SPD1000, | |
25 | + SPD1200, | |
26 | + SPD800, | |
27 | + SPD800, | |
28 | + SPD800, | |
29 | + SPD800, | |
30 | + SPD800, | |
31 | + SPD1200, | |
32 | + SPD1000, | |
33 | + SPD800, | |
34 | + SPD800, | |
35 | + SPD800, | |
36 | +}; | |
37 | + | |
38 | +int arm_speeds[] = { | |
39 | + SPD800, | |
40 | + SPD1000, | |
41 | + SPD1200, | |
42 | + SPD1350, | |
43 | + SPD1400, | |
44 | + SPD800, | |
45 | + SPD1400, | |
46 | + SPD1350, | |
47 | + SPD1200, | |
48 | + SPD1000, | |
49 | + SPD800, | |
50 | + SPD800, | |
51 | + SPD800, | |
52 | +}; | |
53 | + | |
22 | 54 | /** |
23 | 55 | * pll_freq_get - get pll frequency |
24 | 56 | * Fout = Fref * NF(mult) / NR(prediv) / OD |
arch/arm/cpu/armv7/keystone/clock.c
... | ... | @@ -11,6 +11,8 @@ |
11 | 11 | #include <asm/arch/clock.h> |
12 | 12 | #include <asm/arch/clock_defs.h> |
13 | 13 | |
14 | +#define MAX_SPEEDS 13 | |
15 | + | |
14 | 16 | static void wait_for_completion(const struct pll_init_data *data) |
15 | 17 | { |
16 | 18 | int i; |
... | ... | @@ -218,4 +220,45 @@ |
218 | 220 | for (i = 0; i < num_pll; i++) |
219 | 221 | init_pll(&config[i]); |
220 | 222 | } |
223 | + | |
224 | +static int get_max_speed(u32 val, int *speeds) | |
225 | +{ | |
226 | + int j; | |
227 | + | |
228 | + if (!val) | |
229 | + return speeds[0]; | |
230 | + | |
231 | + for (j = 1; j < MAX_SPEEDS; j++) { | |
232 | + if (val == 1) | |
233 | + return speeds[j]; | |
234 | + val >>= 1; | |
235 | + } | |
236 | + | |
237 | + return SPD800; | |
238 | +} | |
239 | + | |
240 | +#ifdef CONFIG_SOC_K2HK | |
241 | +static u32 read_efuse_bootrom(void) | |
242 | +{ | |
243 | + return (cpu_revision() > 1) ? __raw_readl(KS2_EFUSE_BOOTROM) : | |
244 | + __raw_readl(KS2_REV1_DEVSPEED); | |
245 | +} | |
246 | +#else | |
247 | +static inline u32 read_efuse_bootrom(void) | |
248 | +{ | |
249 | + return __raw_readl(KS2_EFUSE_BOOTROM); | |
250 | +} | |
251 | +#endif | |
252 | + | |
253 | +inline int get_max_dev_speed(void) | |
254 | +{ | |
255 | + return get_max_speed(read_efuse_bootrom() & 0xffff, dev_speeds); | |
256 | +} | |
257 | + | |
258 | +#ifndef CONFIG_SOC_K2E | |
259 | +inline int get_max_arm_speed(void) | |
260 | +{ | |
261 | + return get_max_speed((read_efuse_bootrom() >> 16) & 0xffff, arm_speeds); | |
262 | +} | |
263 | +#endif |
arch/arm/cpu/armv7/omap-common/emif-common.c
... | ... | @@ -242,46 +242,10 @@ |
242 | 242 | __udelay(130); |
243 | 243 | } |
244 | 244 | |
245 | -static void dra7_ddr3_leveling(u32 base, const struct emif_regs *regs) | |
246 | -{ | |
247 | - struct emif_reg_struct *emif = (struct emif_reg_struct *)base; | |
248 | - | |
249 | - u32 fifo_reg; | |
250 | - | |
251 | - fifo_reg = readl(&emif->emif_ddr_fifo_misaligned_clear_1); | |
252 | - writel(fifo_reg | 0x00000100, | |
253 | - &emif->emif_ddr_fifo_misaligned_clear_1); | |
254 | - | |
255 | - fifo_reg = readl(&emif->emif_ddr_fifo_misaligned_clear_2); | |
256 | - writel(fifo_reg | 0x00000100, | |
257 | - &emif->emif_ddr_fifo_misaligned_clear_2); | |
258 | - | |
259 | - /* Launch Full leveling */ | |
260 | - writel(DDR3_FULL_LVL, &emif->emif_rd_wr_lvl_ctl); | |
261 | - | |
262 | - /* Wait till full leveling is complete */ | |
263 | - readl(&emif->emif_rd_wr_lvl_ctl); | |
264 | - __udelay(130); | |
265 | - | |
266 | - /* Read data eye leveling no of samples */ | |
267 | - config_data_eye_leveling_samples(base); | |
268 | - | |
269 | - /* | |
270 | - * Disable leveling. This is because if leveling is kept | |
271 | - * enabled, then PHY triggers a false leveling during | |
272 | - * EMIF-idle scenario which results in wrong delay | |
273 | - * values getting updated. After this the EMIF becomes | |
274 | - * unaccessible. So disable it after the first time | |
275 | - */ | |
276 | - writel(0x0, &emif->emif_rd_wr_lvl_rmp_ctl); | |
277 | -} | |
278 | - | |
279 | 245 | static void ddr3_leveling(u32 base, const struct emif_regs *regs) |
280 | 246 | { |
281 | 247 | if (is_omap54xx()) |
282 | 248 | omap5_ddr3_leveling(base, regs); |
283 | - else | |
284 | - dra7_ddr3_leveling(base, regs); | |
285 | 249 | } |
286 | 250 | |
287 | 251 | static void ddr3_init(u32 base, const struct emif_regs *regs) |
... | ... | @@ -1383,7 +1347,7 @@ |
1383 | 1347 | } |
1384 | 1348 | |
1385 | 1349 | if (sdram_type == EMIF_SDRAM_TYPE_DDR3 && |
1386 | - (!in_sdram && !warm_reset())) { | |
1350 | + (!in_sdram && !warm_reset()) && (!is_dra7xx())) { | |
1387 | 1351 | if (emif1_enabled) |
1388 | 1352 | do_bug0039_workaround(EMIF1_BASE); |
1389 | 1353 | if (emif2_enabled) |
arch/arm/cpu/armv7/omap-common/hwinit-common.c
arch/arm/cpu/armv7/omap5/hw_data.c
... | ... | @@ -556,7 +556,7 @@ |
556 | 556 | .ctrl_ddrio_1 = 0x84210840, |
557 | 557 | .ctrl_ddrio_2 = 0x84210000, |
558 | 558 | .ctrl_emif_sdram_config_ext = 0x0001C1A7, |
559 | - .ctrl_emif_sdram_config_ext_final = 0x000101A7, | |
559 | + .ctrl_emif_sdram_config_ext_final = 0x0001C1A7, | |
560 | 560 | .ctrl_ddr_ctrl_ext_0 = 0xA2000000, |
561 | 561 | }; |
562 | 562 |
arch/arm/cpu/armv7/omap5/sdram.c
... | ... | @@ -145,18 +145,18 @@ |
145 | 145 | .sdram_tim1 = 0xCCCF36B3, |
146 | 146 | .sdram_tim2 = 0x308F7FDA, |
147 | 147 | .sdram_tim3 = 0x027F88A8, |
148 | - .read_idle_ctrl = 0x00050000, | |
148 | + .read_idle_ctrl = 0x00050001, | |
149 | 149 | .zq_config = 0x0007190B, |
150 | 150 | .temp_alert_config = 0x00000000, |
151 | - .emif_ddr_phy_ctlr_1_init = 0x0024400A, | |
152 | - .emif_ddr_phy_ctlr_1 = 0x0024400A, | |
151 | + .emif_ddr_phy_ctlr_1_init = 0x0E24400A, | |
152 | + .emif_ddr_phy_ctlr_1 = 0x0E24400A, | |
153 | 153 | .emif_ddr_ext_phy_ctrl_1 = 0x10040100, |
154 | - .emif_ddr_ext_phy_ctrl_2 = 0x00B000B0, | |
155 | - .emif_ddr_ext_phy_ctrl_3 = 0x00B000B0, | |
156 | - .emif_ddr_ext_phy_ctrl_4 = 0x00B000B0, | |
157 | - .emif_ddr_ext_phy_ctrl_5 = 0x00B000B0, | |
154 | + .emif_ddr_ext_phy_ctrl_2 = 0x00BB00BB, | |
155 | + .emif_ddr_ext_phy_ctrl_3 = 0x00BB00BB, | |
156 | + .emif_ddr_ext_phy_ctrl_4 = 0x00BB00BB, | |
157 | + .emif_ddr_ext_phy_ctrl_5 = 0x00BB00BB, | |
158 | 158 | .emif_rd_wr_lvl_rmp_win = 0x00000000, |
159 | - .emif_rd_wr_lvl_rmp_ctl = 0x80000000, | |
159 | + .emif_rd_wr_lvl_rmp_ctl = 0x00000000, | |
160 | 160 | .emif_rd_wr_lvl_ctl = 0x00000000, |
161 | 161 | .emif_rd_wr_exec_thresh = 0x00000305 |
162 | 162 | }; |
163 | 163 | |
164 | 164 | |
165 | 165 | |
... | ... | @@ -169,18 +169,18 @@ |
169 | 169 | .sdram_tim1 = 0xCCCF36B3, |
170 | 170 | .sdram_tim2 = 0x308F7FDA, |
171 | 171 | .sdram_tim3 = 0x027F88A8, |
172 | - .read_idle_ctrl = 0x00050000, | |
172 | + .read_idle_ctrl = 0x00050001, | |
173 | 173 | .zq_config = 0x0007190B, |
174 | 174 | .temp_alert_config = 0x00000000, |
175 | - .emif_ddr_phy_ctlr_1_init = 0x0024400A, | |
176 | - .emif_ddr_phy_ctlr_1 = 0x0024400A, | |
175 | + .emif_ddr_phy_ctlr_1_init = 0x0E24400A, | |
176 | + .emif_ddr_phy_ctlr_1 = 0x0E24400A, | |
177 | 177 | .emif_ddr_ext_phy_ctrl_1 = 0x10040100, |
178 | - .emif_ddr_ext_phy_ctrl_2 = 0x00B000B0, | |
179 | - .emif_ddr_ext_phy_ctrl_3 = 0x00B000B0, | |
180 | - .emif_ddr_ext_phy_ctrl_4 = 0x00B000B0, | |
181 | - .emif_ddr_ext_phy_ctrl_5 = 0x00B000B0, | |
178 | + .emif_ddr_ext_phy_ctrl_2 = 0x00BB00BB, | |
179 | + .emif_ddr_ext_phy_ctrl_3 = 0x00BB00BB, | |
180 | + .emif_ddr_ext_phy_ctrl_4 = 0x00BB00BB, | |
181 | + .emif_ddr_ext_phy_ctrl_5 = 0x00BB00BB, | |
182 | 182 | .emif_rd_wr_lvl_rmp_win = 0x00000000, |
183 | - .emif_rd_wr_lvl_rmp_ctl = 0x80000000, | |
183 | + .emif_rd_wr_lvl_rmp_ctl = 0x00000000, | |
184 | 184 | .emif_rd_wr_lvl_ctl = 0x00000000, |
185 | 185 | .emif_rd_wr_exec_thresh = 0x00000305 |
186 | 186 | }; |
187 | 187 | |
... | ... | @@ -394,24 +394,24 @@ |
394 | 394 | |
395 | 395 | const u32 |
396 | 396 | dra_ddr3_ext_phy_ctrl_const_base_es1_emif1[] = { |
397 | - 0x00B000B0, | |
398 | - 0x00400040, | |
399 | - 0x00400040, | |
400 | - 0x00400040, | |
401 | - 0x00400040, | |
402 | - 0x00400040, | |
403 | - 0x00800080, | |
404 | - 0x00800080, | |
405 | - 0x00800080, | |
406 | - 0x00800080, | |
407 | - 0x00800080, | |
397 | + 0x00BB00BB, | |
398 | + 0x00440044, | |
399 | + 0x00440044, | |
400 | + 0x00440044, | |
401 | + 0x00440044, | |
402 | + 0x00440044, | |
403 | + 0x007F007F, | |
404 | + 0x007F007F, | |
405 | + 0x007F007F, | |
406 | + 0x007F007F, | |
407 | + 0x007F007F, | |
408 | 408 | 0x00600060, |
409 | 409 | 0x00600060, |
410 | 410 | 0x00600060, |
411 | 411 | 0x00600060, |
412 | 412 | 0x00600060, |
413 | - 0x00800080, | |
414 | - 0x00800080, | |
413 | + 0x00000000, | |
414 | + 0x00600020, | |
415 | 415 | 0x40010080, |
416 | 416 | 0x08102040, |
417 | 417 | 0x0, |
... | ... | @@ -439,7 +439,7 @@ |
439 | 439 | 0x00600060, |
440 | 440 | 0x00600060, |
441 | 441 | 0x00600060, |
442 | - 0x0, | |
442 | + 0x00000000, | |
443 | 443 | 0x00600020, |
444 | 444 | 0x40010080, |
445 | 445 | 0x08102040, |
arch/arm/include/asm/arch-keystone/clock-k2e.h
... | ... | @@ -56,10 +56,26 @@ |
56 | 56 | DDR3_PLL, |
57 | 57 | }; |
58 | 58 | |
59 | +enum { | |
60 | + SPD800, | |
61 | + SPD850, | |
62 | + SPD1000, | |
63 | + SPD1250, | |
64 | + SPD1350, | |
65 | + SPD1400, | |
66 | + SPD1500, | |
67 | + SPD_RSV | |
68 | +}; | |
69 | + | |
59 | 70 | #define CORE_PLL_800 {CORE_PLL, 16, 1, 2} |
71 | +#define CORE_PLL_850 {CORE_PLL, 17, 1, 2} | |
60 | 72 | #define CORE_PLL_1000 {CORE_PLL, 20, 1, 2} |
61 | 73 | #define CORE_PLL_1200 {CORE_PLL, 24, 1, 2} |
62 | 74 | #define PASS_PLL_1000 {PASS_PLL, 20, 1, 2} |
75 | +#define CORE_PLL_1250 {CORE_PLL, 25, 1, 2} | |
76 | +#define CORE_PLL_1350 {CORE_PLL, 27, 1, 2} | |
77 | +#define CORE_PLL_1400 {CORE_PLL, 28, 1, 2} | |
78 | +#define CORE_PLL_1500 {CORE_PLL, 30, 1, 2} | |
63 | 79 | #define DDR3_PLL_200 {DDR3_PLL, 4, 1, 2} |
64 | 80 | #define DDR3_PLL_400 {DDR3_PLL, 16, 1, 4} |
65 | 81 | #define DDR3_PLL_800 {DDR3_PLL, 16, 1, 2} |
arch/arm/include/asm/arch-keystone/clock-k2hk.h
... | ... | @@ -63,21 +63,35 @@ |
63 | 63 | DDR3B_PLL, |
64 | 64 | }; |
65 | 65 | |
66 | +enum { | |
67 | + SPD800, | |
68 | + SPD1000, | |
69 | + SPD1200, | |
70 | + SPD1350, | |
71 | + SPD1400, | |
72 | + SPD_RSV | |
73 | +}; | |
74 | + | |
66 | 75 | #define CORE_PLL_799 {CORE_PLL, 13, 1, 2} |
67 | 76 | #define CORE_PLL_983 {CORE_PLL, 16, 1, 2} |
77 | +#define CORE_PLL_999 {CORE_PLL, 122, 15, 1} | |
68 | 78 | #define CORE_PLL_1167 {CORE_PLL, 19, 1, 2} |
69 | 79 | #define CORE_PLL_1228 {CORE_PLL, 20, 1, 2} |
80 | +#define CORE_PLL_1200 {CORE_PLL, 625, 32, 2} | |
70 | 81 | #define PASS_PLL_1228 {PASS_PLL, 20, 1, 2} |
71 | 82 | #define PASS_PLL_983 {PASS_PLL, 16, 1, 2} |
72 | 83 | #define PASS_PLL_1050 {PASS_PLL, 205, 12, 2} |
73 | 84 | #define TETRIS_PLL_500 {TETRIS_PLL, 8, 1, 2} |
74 | 85 | #define TETRIS_PLL_750 {TETRIS_PLL, 12, 1, 2} |
86 | +#define TETRIS_PLL_800 {TETRIS_PLL, 32, 5, 1} | |
75 | 87 | #define TETRIS_PLL_687 {TETRIS_PLL, 11, 1, 2} |
76 | 88 | #define TETRIS_PLL_625 {TETRIS_PLL, 10, 1, 2} |
77 | 89 | #define TETRIS_PLL_812 {TETRIS_PLL, 13, 1, 2} |
78 | 90 | #define TETRIS_PLL_875 {TETRIS_PLL, 14, 1, 2} |
91 | +#define TETRIS_PLL_1000 {TETRIS_PLL, 40, 5, 1} | |
79 | 92 | #define TETRIS_PLL_1188 {TETRIS_PLL, 19, 2, 1} |
80 | 93 | #define TETRIS_PLL_1200 {TETRIS_PLL, 48, 5, 1} |
94 | +#define TETRIS_PLL_1350 {TETRIS_PLL, 54, 5, 1} | |
81 | 95 | #define TETRIS_PLL_1375 {TETRIS_PLL, 22, 2, 1} |
82 | 96 | #define TETRIS_PLL_1400 {TETRIS_PLL, 56, 5, 1} |
83 | 97 | #define DDR3_PLL_200(x) {DDR3##x##_PLL, 4, 1, 2} |
arch/arm/include/asm/arch-keystone/clock.h
... | ... | @@ -38,12 +38,16 @@ |
38 | 38 | }; |
39 | 39 | |
40 | 40 | extern const struct keystone_pll_regs keystone_pll_regs[]; |
41 | +extern int dev_speeds[]; | |
42 | +extern int arm_speeds[]; | |
41 | 43 | |
42 | 44 | void init_plls(int num_pll, struct pll_init_data *config); |
43 | 45 | void init_pll(const struct pll_init_data *data); |
44 | 46 | unsigned long clk_get_rate(unsigned int clk); |
45 | 47 | unsigned long clk_round_rate(unsigned int clk, unsigned long hz); |
46 | 48 | int clk_set_rate(unsigned int clk, unsigned long hz); |
49 | +int get_max_dev_speed(void); | |
50 | +int get_max_arm_speed(void); | |
47 | 51 | |
48 | 52 | #endif |
49 | 53 | #endif |
arch/arm/include/asm/arch-keystone/hardware.h
... | ... | @@ -138,6 +138,10 @@ |
138 | 138 | /* Flag from ks2_debug options to check if DSPs need to stay ON */ |
139 | 139 | #define DBG_LEAVE_DSPS_ON 0x1 |
140 | 140 | |
141 | +/* Device speed */ | |
142 | +#define KS2_REV1_DEVSPEED (KS2_DEVICE_STATE_CTRL_BASE + 0xc98) | |
143 | +#define KS2_EFUSE_BOOTROM (KS2_DEVICE_STATE_CTRL_BASE + 0xc90) | |
144 | + | |
141 | 145 | /* Queue manager */ |
142 | 146 | #define KS2_QM_MANAGER_BASE 0x02a02000 |
143 | 147 | #define KS2_QM_DESC_SETUP_BASE 0x02a03000 |
arch/arm/include/asm/arch-omap5/mem.h
... | ... | @@ -46,13 +46,13 @@ |
46 | 46 | #define M_NAND_GPMC_CONFIG6 0x16000f80 |
47 | 47 | #define M_NAND_GPMC_CONFIG7 0x00000008 |
48 | 48 | |
49 | -#define STNOR_GPMC_CONFIG1 0x00001200 | |
50 | -#define STNOR_GPMC_CONFIG2 0x00101000 | |
51 | -#define STNOR_GPMC_CONFIG3 0x00030301 | |
52 | -#define STNOR_GPMC_CONFIG4 0x10041004 | |
53 | -#define STNOR_GPMC_CONFIG5 0x000C1010 | |
49 | +#define STNOR_GPMC_CONFIG1 0x00001000 | |
50 | +#define STNOR_GPMC_CONFIG2 0x001f1f00 | |
51 | +#define STNOR_GPMC_CONFIG3 0x001f1f01 | |
52 | +#define STNOR_GPMC_CONFIG4 0x1f011f01 | |
53 | +#define STNOR_GPMC_CONFIG5 0x001d1f1f | |
54 | 54 | #define STNOR_GPMC_CONFIG6 0x08070280 |
55 | -#define STNOR_GPMC_CONFIG7 0x00000F48 | |
55 | +#define STNOR_GPMC_CONFIG7 0x00000048 | |
56 | 56 | |
57 | 57 | /* max number of GPMC Chip Selects */ |
58 | 58 | #define GPMC_MAX_CS 8 |
board/compulab/cm_t54/cm_t54.c
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | */ |
44 | 44 | int board_init(void) |
45 | 45 | { |
46 | - gd->bd->bi_boot_params = (CONFIG_SYS_SDRAM_BASE + 0x100); /* boot param addr */ | |
46 | + gd->bd->bi_boot_params = (CONFIG_SYS_SDRAM_BASE + 0x100); | |
47 | 47 | |
48 | 48 | return 0; |
49 | 49 | } |
... | ... | @@ -89,7 +89,7 @@ |
89 | 89 | * If booted from eMMC boot partition then force eMMC |
90 | 90 | * FIRST boot partition to be env storage |
91 | 91 | */ |
92 | - if (bootmode == BOOT_DEVICE_MMC2_2) | |
92 | + if (bootmode == BOOT_DEVICE_MMC2) | |
93 | 93 | bootpart = 1; |
94 | 94 | |
95 | 95 | return bootpart; |
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 | return 0; |
170 | 170 | |
171 | 171 | ret = cl_eeprom_read_mac_addr(enetaddr); |
172 | - if (!ret || !is_valid_ether_addr(enetaddr)) | |
172 | + if (ret || !is_valid_ether_addr(enetaddr)) | |
173 | 173 | generate_mac_addr(enetaddr); |
174 | 174 | |
175 | 175 | if (!is_valid_ether_addr(enetaddr)) |
board/ti/am335x/Kconfig
... | ... | @@ -20,5 +20,14 @@ |
20 | 20 | string |
21 | 21 | default "am335x_evm" |
22 | 22 | |
23 | +config CONS_INDEX | |
24 | + int "UART used for console" | |
25 | + default 1 | |
26 | + help | |
27 | + The AM335x SoC has a total of 6 UARTs (UART0 to UART5 as referenced | |
28 | + in documentation, etc) available to it. Depending on your specific | |
29 | + board you may want something other than UART0 as for example the IDK | |
30 | + uses UART3 so enter 4 here. | |
31 | + | |
23 | 32 | endif |
board/ti/am335x/board.c
... | ... | @@ -383,24 +383,19 @@ |
383 | 383 | |
384 | 384 | void set_uart_mux_conf(void) |
385 | 385 | { |
386 | -#ifdef CONFIG_SERIAL1 | |
386 | +#if CONFIG_CONS_INDEX == 1 | |
387 | 387 | enable_uart0_pin_mux(); |
388 | -#endif /* CONFIG_SERIAL1 */ | |
389 | -#ifdef CONFIG_SERIAL2 | |
388 | +#elif CONFIG_CONS_INDEX == 2 | |
390 | 389 | enable_uart1_pin_mux(); |
391 | -#endif /* CONFIG_SERIAL2 */ | |
392 | -#ifdef CONFIG_SERIAL3 | |
390 | +#elif CONFIG_CONS_INDEX == 3 | |
393 | 391 | enable_uart2_pin_mux(); |
394 | -#endif /* CONFIG_SERIAL3 */ | |
395 | -#ifdef CONFIG_SERIAL4 | |
392 | +#elif CONFIG_CONS_INDEX == 4 | |
396 | 393 | enable_uart3_pin_mux(); |
397 | -#endif /* CONFIG_SERIAL4 */ | |
398 | -#ifdef CONFIG_SERIAL5 | |
394 | +#elif CONFIG_CONS_INDEX == 5 | |
399 | 395 | enable_uart4_pin_mux(); |
400 | -#endif /* CONFIG_SERIAL5 */ | |
401 | -#ifdef CONFIG_SERIAL6 | |
396 | +#elif CONFIG_CONS_INDEX == 6 | |
402 | 397 | enable_uart5_pin_mux(); |
403 | -#endif /* CONFIG_SERIAL6 */ | |
398 | +#endif | |
404 | 399 | } |
405 | 400 | |
406 | 401 | void set_mux_conf_regs(void) |
board/ti/am335x/mux.c
... | ... | @@ -171,91 +171,75 @@ |
171 | 171 | {-1}, |
172 | 172 | }; |
173 | 173 | |
174 | +#ifdef CONFIG_NAND | |
174 | 175 | static struct module_pin_mux nand_pin_mux[] = { |
175 | - {OFFSET(gpmc_ad0), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD0 */ | |
176 | - {OFFSET(gpmc_ad1), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD1 */ | |
177 | - {OFFSET(gpmc_ad2), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD2 */ | |
178 | - {OFFSET(gpmc_ad3), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD3 */ | |
179 | - {OFFSET(gpmc_ad4), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD4 */ | |
180 | - {OFFSET(gpmc_ad5), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD5 */ | |
181 | - {OFFSET(gpmc_ad6), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD6 */ | |
182 | - {OFFSET(gpmc_ad7), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* NAND AD7 */ | |
183 | - {OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* NAND WAIT */ | |
184 | - {OFFSET(gpmc_wpn), (MODE(7) | PULLUP_EN | RXACTIVE)}, /* NAND_WPN */ | |
185 | - {OFFSET(gpmc_csn0), (MODE(0) | PULLUDEN)}, /* NAND_CS0 */ | |
186 | - {OFFSET(gpmc_advn_ale), (MODE(0) | PULLUDEN)}, /* NAND_ADV_ALE */ | |
187 | - {OFFSET(gpmc_oen_ren), (MODE(0) | PULLUDEN)}, /* NAND_OE */ | |
188 | - {OFFSET(gpmc_wen), (MODE(0) | PULLUDEN)}, /* NAND_WEN */ | |
189 | - {OFFSET(gpmc_be0n_cle), (MODE(0) | PULLUDEN)}, /* NAND_BE_CLE */ | |
176 | + {OFFSET(gpmc_ad0), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD0 */ | |
177 | + {OFFSET(gpmc_ad1), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD1 */ | |
178 | + {OFFSET(gpmc_ad2), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD2 */ | |
179 | + {OFFSET(gpmc_ad3), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD3 */ | |
180 | + {OFFSET(gpmc_ad4), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD4 */ | |
181 | + {OFFSET(gpmc_ad5), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD5 */ | |
182 | + {OFFSET(gpmc_ad6), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD6 */ | |
183 | + {OFFSET(gpmc_ad7), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD7 */ | |
184 | +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT | |
185 | + {OFFSET(gpmc_ad8), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD8 */ | |
186 | + {OFFSET(gpmc_ad9), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD9 */ | |
187 | + {OFFSET(gpmc_ad10), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD10 */ | |
188 | + {OFFSET(gpmc_ad11), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD11 */ | |
189 | + {OFFSET(gpmc_ad12), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD12 */ | |
190 | + {OFFSET(gpmc_ad13), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD13 */ | |
191 | + {OFFSET(gpmc_ad14), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD14 */ | |
192 | + {OFFSET(gpmc_ad15), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD15 */ | |
193 | +#endif | |
194 | + {OFFSET(gpmc_wait0), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* nWAIT */ | |
195 | + {OFFSET(gpmc_wpn), (MODE(7) | PULLUP_EN)}, /* nWP */ | |
196 | + {OFFSET(gpmc_csn0), (MODE(0) | PULLUP_EN)}, /* nCS */ | |
197 | + {OFFSET(gpmc_wen), (MODE(0) | PULLDOWN_EN)}, /* WEN */ | |
198 | + {OFFSET(gpmc_oen_ren), (MODE(0) | PULLDOWN_EN)}, /* OE */ | |
199 | + {OFFSET(gpmc_advn_ale), (MODE(0) | PULLDOWN_EN)}, /* ADV_ALE */ | |
200 | + {OFFSET(gpmc_be0n_cle), (MODE(0) | PULLDOWN_EN)}, /* BE_CLE */ | |
190 | 201 | {-1}, |
191 | 202 | }; |
192 | - | |
193 | -#if defined(CONFIG_NOR) && !defined(CONFIG_NOR_BOOT) | |
203 | +#elif defined(CONFIG_NOR) | |
194 | 204 | static struct module_pin_mux bone_norcape_pin_mux[] = { |
195 | - {OFFSET(lcd_data0), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A0 */ | |
196 | - {OFFSET(lcd_data1), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A1 */ | |
197 | - {OFFSET(lcd_data2), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A2 */ | |
198 | - {OFFSET(lcd_data3), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A3 */ | |
199 | - {OFFSET(lcd_data4), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A4 */ | |
200 | - {OFFSET(lcd_data5), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A5 */ | |
201 | - {OFFSET(lcd_data6), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A6 */ | |
202 | - {OFFSET(lcd_data7), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A7 */ | |
203 | - {OFFSET(lcd_vsync), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A8 */ | |
204 | - {OFFSET(lcd_hsync), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A9 */ | |
205 | - {OFFSET(lcd_pclk), MODE(1)| PULLUDEN | RXACTIVE}, /* NOR_A10 */ | |
206 | - {OFFSET(lcd_ac_bias_en), MODE(1)| PULLUDEN | RXACTIVE}, /* NOR_A11 */ | |
207 | - {OFFSET(lcd_data8), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A12 */ | |
208 | - {OFFSET(lcd_data9), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A13 */ | |
209 | - {OFFSET(lcd_data10), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A14 */ | |
210 | - {OFFSET(lcd_data11), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A15 */ | |
211 | - {OFFSET(lcd_data12), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A16 */ | |
212 | - {OFFSET(lcd_data13), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A17 */ | |
213 | - {OFFSET(lcd_data14), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A18 */ | |
214 | - {OFFSET(lcd_data15), MODE(1) | PULLUDEN | RXACTIVE}, /* NOR_A19 */ | |
215 | - {OFFSET(gpmc_ad0), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD0 */ | |
216 | - {OFFSET(gpmc_ad1), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD1 */ | |
217 | - {OFFSET(gpmc_ad2), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD2 */ | |
218 | - {OFFSET(gpmc_ad3), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD3 */ | |
219 | - {OFFSET(gpmc_ad4), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD4 */ | |
220 | - {OFFSET(gpmc_ad5), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD5 */ | |
221 | - {OFFSET(gpmc_ad6), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD6 */ | |
222 | - {OFFSET(gpmc_ad7), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD7 */ | |
223 | - {OFFSET(gpmc_ad8), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD8 */ | |
224 | - {OFFSET(gpmc_ad9), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD9 */ | |
225 | - {OFFSET(gpmc_ad10), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD10 */ | |
226 | - {OFFSET(gpmc_ad11), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD11 */ | |
227 | - {OFFSET(gpmc_ad12), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD12 */ | |
228 | - {OFFSET(gpmc_ad13), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD13 */ | |
229 | - {OFFSET(gpmc_ad14), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD14 */ | |
230 | - {OFFSET(gpmc_ad15), MODE(0) | PULLUDEN | RXACTIVE}, /* NOR_AD15 */ | |
231 | - | |
232 | - {OFFSET(gpmc_csn0), (MODE(0) | PULLUDEN) | RXACTIVE}, /* NOR_CE */ | |
233 | - {OFFSET(gpmc_advn_ale), (MODE(0) | PULLUDEN) | RXACTIVE}, /* NOR_ADVN_ALE */ | |
234 | - {OFFSET(gpmc_oen_ren), (MODE(0) | PULLUDEN | RXACTIVE)},/* NOR_OE */ | |
235 | - {OFFSET(gpmc_be0n_cle), (MODE(0) | PULLUDEN | RXACTIVE)},/* NOR_BE0N_CLE */ | |
236 | - {OFFSET(gpmc_wen), (MODE(0) | PULLUDEN | RXACTIVE)}, /* NOR_WEN */ | |
237 | - {OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUDEN)}, /* NOR WAIT */ | |
205 | + {OFFSET(gpmc_a0), MODE(0) | PULLUDDIS}, /* NOR_A0 */ | |
206 | + {OFFSET(gpmc_a1), MODE(0) | PULLUDDIS}, /* NOR_A1 */ | |
207 | + {OFFSET(gpmc_a2), MODE(0) | PULLUDDIS}, /* NOR_A2 */ | |
208 | + {OFFSET(gpmc_a3), MODE(0) | PULLUDDIS}, /* NOR_A3 */ | |
209 | + {OFFSET(gpmc_a4), MODE(0) | PULLUDDIS}, /* NOR_A4 */ | |
210 | + {OFFSET(gpmc_a5), MODE(0) | PULLUDDIS}, /* NOR_A5 */ | |
211 | + {OFFSET(gpmc_a6), MODE(0) | PULLUDDIS}, /* NOR_A6 */ | |
212 | + {OFFSET(gpmc_a7), MODE(0) | PULLUDDIS}, /* NOR_A7 */ | |
213 | + {OFFSET(gpmc_ad0), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD0 */ | |
214 | + {OFFSET(gpmc_ad1), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD1 */ | |
215 | + {OFFSET(gpmc_ad2), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD2 */ | |
216 | + {OFFSET(gpmc_ad3), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD3 */ | |
217 | + {OFFSET(gpmc_ad4), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD4 */ | |
218 | + {OFFSET(gpmc_ad5), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD5 */ | |
219 | + {OFFSET(gpmc_ad6), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD6 */ | |
220 | + {OFFSET(gpmc_ad7), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD7 */ | |
221 | + {OFFSET(gpmc_ad8), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD8 */ | |
222 | + {OFFSET(gpmc_ad9), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD9 */ | |
223 | + {OFFSET(gpmc_ad10), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD10 */ | |
224 | + {OFFSET(gpmc_ad11), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD11 */ | |
225 | + {OFFSET(gpmc_ad12), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD12 */ | |
226 | + {OFFSET(gpmc_ad13), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD13 */ | |
227 | + {OFFSET(gpmc_ad14), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD14 */ | |
228 | + {OFFSET(gpmc_ad15), MODE(0) | PULLUDDIS | RXACTIVE}, /* NOR_AD15 */ | |
229 | + {OFFSET(gpmc_csn0), MODE(0) | PULLUDEN | PULLUP_EN}, /* CE */ | |
230 | + {OFFSET(gpmc_advn_ale), MODE(0) | PULLUDEN | PULLDOWN_EN}, /* ALE */ | |
231 | + {OFFSET(gpmc_oen_ren), MODE(0) | PULLUDEN | PULLDOWN_EN},/* OEn_REN */ | |
232 | + {OFFSET(gpmc_be0n_cle), MODE(0) | PULLUDEN | PULLDOWN_EN},/* unused */ | |
233 | + {OFFSET(gpmc_wen), MODE(0) | PULLUDEN | PULLDOWN_EN}, /* WEN */ | |
234 | + {OFFSET(gpmc_wait0), MODE(0) | PULLUDEN | PULLUP_EN | RXACTIVE},/*WAIT*/ | |
238 | 235 | {-1}, |
239 | 236 | }; |
240 | 237 | #endif |
241 | 238 | |
242 | 239 | #if defined(CONFIG_NOR_BOOT) |
243 | -static struct module_pin_mux norboot_pin_mux[] = { | |
244 | - {OFFSET(lcd_data1), MODE(1) | PULLUDDIS}, | |
245 | - {OFFSET(lcd_data2), MODE(1) | PULLUDDIS}, | |
246 | - {OFFSET(lcd_data3), MODE(1) | PULLUDDIS}, | |
247 | - {OFFSET(lcd_data4), MODE(1) | PULLUDDIS}, | |
248 | - {OFFSET(lcd_data5), MODE(1) | PULLUDDIS}, | |
249 | - {OFFSET(lcd_data6), MODE(1) | PULLUDDIS}, | |
250 | - {OFFSET(lcd_data7), MODE(1) | PULLUDDIS}, | |
251 | - {OFFSET(lcd_data8), MODE(1) | PULLUDDIS}, | |
252 | - {OFFSET(lcd_data9), MODE(1) | PULLUDDIS}, | |
253 | - {-1}, | |
254 | -}; | |
255 | - | |
256 | 240 | void enable_norboot_pin_mux(void) |
257 | 241 | { |
258 | - configure_module_pin_mux(norboot_pin_mux); | |
242 | + configure_module_pin_mux(bone_norcape_pin_mux); | |
259 | 243 | } |
260 | 244 | #endif |
261 | 245 | |
262 | 246 | |
... | ... | @@ -336,12 +320,13 @@ |
336 | 320 | configure_module_pin_mux(i2c1_pin_mux); |
337 | 321 | configure_module_pin_mux(mii1_pin_mux); |
338 | 322 | configure_module_pin_mux(mmc0_pin_mux); |
339 | -#ifndef CONFIG_NOR | |
323 | +#if defined(CONFIG_NAND) | |
324 | + configure_module_pin_mux(nand_pin_mux); | |
325 | +#elif defined(CONFIG_NOR) | |
326 | + configure_module_pin_mux(bone_norcape_pin_mux); | |
327 | +#else | |
340 | 328 | configure_module_pin_mux(mmc1_pin_mux); |
341 | 329 | #endif |
342 | -#if defined(CONFIG_NOR) && !defined(CONFIG_NOR_BOOT) | |
343 | - configure_module_pin_mux(bone_norcape_pin_mux); | |
344 | -#endif | |
345 | 330 | } else if (board_is_gp_evm(header)) { |
346 | 331 | /* General Purpose EVM */ |
347 | 332 | unsigned short profile = detect_daughter_board_profile(); |
348 | 333 | |
349 | 334 | |
... | ... | @@ -351,19 +336,16 @@ |
351 | 336 | if (profile & ~PROFILE_2) |
352 | 337 | configure_module_pin_mux(i2c1_pin_mux); |
353 | 338 | /* Profiles 2 & 3 don't have NAND */ |
339 | +#ifdef CONFIG_NAND | |
354 | 340 | if (profile & ~(PROFILE_2 | PROFILE_3)) |
355 | 341 | configure_module_pin_mux(nand_pin_mux); |
342 | +#endif | |
356 | 343 | else if (profile == PROFILE_2) { |
357 | 344 | configure_module_pin_mux(mmc1_pin_mux); |
358 | 345 | configure_module_pin_mux(spi0_pin_mux); |
359 | 346 | } |
360 | 347 | } else if (board_is_idk(header)) { |
361 | - /* | |
362 | - * Industrial Motor Control (IDK) | |
363 | - * note: IDK console is on UART3 by default. | |
364 | - * So u-boot mus be build with CONFIG_SERIAL4 and | |
365 | - * CONFIG_CONS_INDEX=4 | |
366 | - */ | |
348 | + /* Industrial Motor Control (IDK) */ | |
367 | 349 | configure_module_pin_mux(mii1_pin_mux); |
368 | 350 | configure_module_pin_mux(mmc0_no_cd_pin_mux); |
369 | 351 | } else if (board_is_evm_sk(header)) { |
370 | 352 | |
... | ... | @@ -377,7 +359,13 @@ |
377 | 359 | configure_module_pin_mux(i2c1_pin_mux); |
378 | 360 | configure_module_pin_mux(mii1_pin_mux); |
379 | 361 | configure_module_pin_mux(mmc0_pin_mux); |
362 | +#if defined(CONFIG_NAND) | |
363 | + configure_module_pin_mux(nand_pin_mux); | |
364 | +#elif defined(CONFIG_NOR) | |
365 | + configure_module_pin_mux(bone_norcape_pin_mux); | |
366 | +#else | |
380 | 367 | configure_module_pin_mux(mmc1_pin_mux); |
368 | +#endif | |
381 | 369 | } else { |
382 | 370 | puts("Unknown board, cannot configure pinmux."); |
383 | 371 | hang(); |
board/ti/am43xx/board.c
... | ... | @@ -626,6 +626,7 @@ |
626 | 626 | modena_init0_bw_integer, modena_init0_watermark_0; |
627 | 627 | |
628 | 628 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; |
629 | + gpmc_init(); | |
629 | 630 | |
630 | 631 | /* Clear all important bits for DSS errata that may need to be tweaked*/ |
631 | 632 | mreqprio_0 = readl(&cdev->mreqprio_0) & MREQPRIO_0_SAB_INIT1_MASK & |
board/ti/am43xx/mux.c
... | ... | @@ -73,7 +73,38 @@ |
73 | 73 | {-1}, |
74 | 74 | }; |
75 | 75 | |
76 | -static struct module_pin_mux qspi_pin_mux[] = { | |
76 | +#ifdef CONFIG_NAND | |
77 | +static struct module_pin_mux nand_pin_mux[] = { | |
78 | + {OFFSET(gpmc_ad0), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD0 */ | |
79 | + {OFFSET(gpmc_ad1), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD1 */ | |
80 | + {OFFSET(gpmc_ad2), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD2 */ | |
81 | + {OFFSET(gpmc_ad3), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD3 */ | |
82 | + {OFFSET(gpmc_ad4), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD4 */ | |
83 | + {OFFSET(gpmc_ad5), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD5 */ | |
84 | + {OFFSET(gpmc_ad6), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD6 */ | |
85 | + {OFFSET(gpmc_ad7), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD7 */ | |
86 | +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT | |
87 | + {OFFSET(gpmc_ad8), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD8 */ | |
88 | + {OFFSET(gpmc_ad9), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD9 */ | |
89 | + {OFFSET(gpmc_ad10), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD10 */ | |
90 | + {OFFSET(gpmc_ad11), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD11 */ | |
91 | + {OFFSET(gpmc_ad12), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD12 */ | |
92 | + {OFFSET(gpmc_ad13), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD13 */ | |
93 | + {OFFSET(gpmc_ad14), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD14 */ | |
94 | + {OFFSET(gpmc_ad15), (MODE(0) | PULLUDDIS | RXACTIVE)}, /* AD15 */ | |
95 | +#endif | |
96 | + {OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* Wait */ | |
97 | + {OFFSET(gpmc_wpn), (MODE(7) | PULLUP_EN)}, /* Write Protect */ | |
98 | + {OFFSET(gpmc_csn0), (MODE(0) | PULLUP_EN)}, /* Chip-Select */ | |
99 | + {OFFSET(gpmc_wen), (MODE(0) | PULLDOWN_EN)}, /* Write Enable */ | |
100 | + {OFFSET(gpmc_oen_ren), (MODE(0) | PULLDOWN_EN)}, /* Read Enable */ | |
101 | + {OFFSET(gpmc_advn_ale), (MODE(0) | PULLDOWN_EN)}, /* Addr Latch Enable*/ | |
102 | + {OFFSET(gpmc_be0n_cle), (MODE(0) | PULLDOWN_EN)}, /* Byte Enable */ | |
103 | + {-1}, | |
104 | +}; | |
105 | +#endif | |
106 | + | |
107 | +static __maybe_unused struct module_pin_mux qspi_pin_mux[] = { | |
77 | 108 | {OFFSET(gpmc_csn0), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_CS0 */ |
78 | 109 | {OFFSET(gpmc_csn3), (MODE(2) | PULLUP_EN | RXACTIVE)}, /* QSPI_CLK */ |
79 | 110 | {OFFSET(gpmc_advn_ale), (MODE(3) | PULLUP_EN | RXACTIVE)}, /* QSPI_D0 */ |
80 | 111 | |
81 | 112 | |
82 | 113 | |
... | ... | @@ -97,12 +128,22 @@ |
97 | 128 | if (board_is_gpevm()) { |
98 | 129 | configure_module_pin_mux(gpio5_7_pin_mux); |
99 | 130 | configure_module_pin_mux(rgmii1_pin_mux); |
131 | +#if defined(CONFIG_NAND) | |
132 | + configure_module_pin_mux(nand_pin_mux); | |
133 | +#endif | |
100 | 134 | } else if (board_is_sk()) { |
101 | 135 | configure_module_pin_mux(rgmii1_pin_mux); |
136 | +#if defined(CONFIG_NAND) | |
137 | + printf("Error: NAND flash not present on this board\n"); | |
138 | +#endif | |
102 | 139 | configure_module_pin_mux(qspi_pin_mux); |
103 | 140 | } else if (board_is_eposevm()) { |
104 | 141 | configure_module_pin_mux(rmii1_pin_mux); |
142 | +#if defined(CONFIG_NAND) | |
143 | + configure_module_pin_mux(nand_pin_mux); | |
144 | +#else | |
105 | 145 | configure_module_pin_mux(qspi_pin_mux); |
146 | +#endif | |
106 | 147 | } |
107 | 148 | } |
108 | 149 |
board/ti/dra7xx/evm.c
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | #include <common.h> |
14 | 14 | #include <palmas.h> |
15 | 15 | #include <sata.h> |
16 | +#include <asm/gpio.h> | |
17 | +#include <asm/arch/gpio.h> | |
16 | 18 | #include <asm/arch/sys_proto.h> |
17 | 19 | #include <asm/arch/mmc_host_def.h> |
18 | 20 | #include <asm/arch/sata.h> |
... | ... | @@ -26,6 +28,9 @@ |
26 | 28 | |
27 | 29 | DECLARE_GLOBAL_DATA_PTR; |
28 | 30 | |
31 | +/* GPIO 7_11 */ | |
32 | +#define GPIO_DDR_VTT_EN 203 | |
33 | + | |
29 | 34 | const struct omap_sysinfo sysinfo = { |
30 | 35 | "Board: DRA7xx\n" |
31 | 36 | }; |
... | ... | @@ -270,6 +275,32 @@ |
270 | 275 | printf("Error %d registering CPSW switch\n", ret); |
271 | 276 | |
272 | 277 | return ret; |
278 | +} | |
279 | +#endif | |
280 | + | |
281 | +#ifdef CONFIG_BOARD_EARLY_INIT_F | |
282 | +/* VTT regulator enable */ | |
283 | +static inline void vtt_regulator_enable(void) | |
284 | +{ | |
285 | + if (omap_hw_init_context() == OMAP_INIT_CONTEXT_UBOOT_AFTER_SPL) | |
286 | + return; | |
287 | + | |
288 | + /* Do not enable VTT for DRA722 */ | |
289 | + if (omap_revision() == DRA722_ES1_0) | |
290 | + return; | |
291 | + | |
292 | + /* | |
293 | + * EVM Rev G and later use gpio7_11 for DDR3 termination. | |
294 | + * This is safe enough to do on older revs. | |
295 | + */ | |
296 | + gpio_request(GPIO_DDR_VTT_EN, "ddr_vtt_en"); | |
297 | + gpio_direction_output(GPIO_DDR_VTT_EN, 1); | |
298 | +} | |
299 | + | |
300 | +int board_early_init_f(void) | |
301 | +{ | |
302 | + vtt_regulator_enable(); | |
303 | + return 0; | |
273 | 304 | } |
274 | 305 | #endif |
board/ti/dra7xx/mux_data.h
... | ... | @@ -21,6 +21,37 @@ |
21 | 21 | {MMC1_DAT3, (IEN | PTU | PDIS | M0)}, /* MMC1_DAT3 */ |
22 | 22 | {MMC1_SDCD, (FSC | IEN | PTU | PDIS | M0)}, /* MMC1_SDCD */ |
23 | 23 | {MMC1_SDWP, (FSC | IEN | PTD | PEN | M14)}, /* MMC1_SDWP */ |
24 | +#if defined(CONFIG_NOR) | |
25 | + /* NOR only pin-mux */ | |
26 | + {GPMC_A0 , M0 | IDIS | PDIS}, /* nor.GPMC_A[0 ] */ | |
27 | + {GPMC_A1 , M0 | IDIS | PDIS}, /* nor.GPMC_A[1 ] */ | |
28 | + {GPMC_A2 , M0 | IDIS | PDIS}, /* nor.GPMC_A[2 ] */ | |
29 | + {GPMC_A3 , M0 | IDIS | PDIS}, /* nor.GPMC_A[3 ] */ | |
30 | + {GPMC_A4 , M0 | IDIS | PDIS}, /* nor.GPMC_A[4 ] */ | |
31 | + {GPMC_A5 , M0 | IDIS | PDIS}, /* nor.GPMC_A[5 ] */ | |
32 | + {GPMC_A6 , M0 | IDIS | PDIS}, /* nor.GPMC_A[6 ] */ | |
33 | + {GPMC_A7 , M0 | IDIS | PDIS}, /* nor.GPMC_A[7 ] */ | |
34 | + {GPMC_A8 , M0 | IDIS | PDIS}, /* nor.GPMC_A[8 ] */ | |
35 | + {GPMC_A9 , M0 | IDIS | PDIS}, /* nor.GPMC_A[9 ] */ | |
36 | + {GPMC_A10 , M0 | IDIS | PDIS}, /* nor.GPMC_A[10] */ | |
37 | + {GPMC_A11 , M0 | IDIS | PDIS}, /* nor.GPMC_A[11] */ | |
38 | + {GPMC_A12 , M0 | IDIS | PDIS}, /* nor.GPMC_A[12] */ | |
39 | + {GPMC_A13 , M0 | IDIS | PDIS}, /* nor.GPMC_A[13] */ | |
40 | + {GPMC_A14 , M0 | IDIS | PDIS}, /* nor.GPMC_A[14] */ | |
41 | + {GPMC_A15 , M0 | IDIS | PDIS}, /* nor.GPMC_A[15] */ | |
42 | + {GPMC_A16 , M0 | IDIS | PDIS}, /* nor.GPMC_A[16] */ | |
43 | + {GPMC_A17 , M0 | IDIS | PDIS}, /* nor.GPMC_A[17] */ | |
44 | + {GPMC_A18 , M0 | IDIS | PDIS}, /* nor.GPMC_A[18] */ | |
45 | + {GPMC_A19 , M0 | IDIS | PDIS}, /* nor.GPMC_A[19] */ | |
46 | + {GPMC_A20 , M0 | IDIS | PDIS}, /* nor.GPMC_A[20] */ | |
47 | + {GPMC_A21 , M0 | IDIS | PDIS}, /* nor.GPMC_A[21] */ | |
48 | + {GPMC_A22 , M0 | IDIS | PDIS}, /* nor.GPMC_A[22] */ | |
49 | + {GPMC_A23 , M0 | IDIS | PDIS}, /* nor.GPMC_A[23] */ | |
50 | + {GPMC_A24 , M0 | IDIS | PDIS}, /* nor.GPMC_A[24] */ | |
51 | + {GPMC_A25 , M0 | IDIS | PDIS}, /* nor.GPMC_A[25] */ | |
52 | + {GPMC_A26 , M0 | IDIS | PDIS}, /* nor.GPMC_A[26] */ | |
53 | +#else | |
54 | + /* eMMC pinmux */ | |
24 | 55 | {GPMC_A19, (IEN | PTU | PDIS | M1)}, /* mmc2_dat4 */ |
25 | 56 | {GPMC_A20, (IEN | PTU | PDIS | M1)}, /* mmc2_dat5 */ |
26 | 57 | {GPMC_A21, (IEN | PTU | PDIS | M1)}, /* mmc2_dat6 */ |
... | ... | @@ -31,6 +62,7 @@ |
31 | 62 | {GPMC_A26, (IEN | PTU | PDIS | M1)}, /* mmc2_dat2 */ |
32 | 63 | {GPMC_A27, (IEN | PTU | PDIS | M1)}, /* mmc2_dat3 */ |
33 | 64 | {GPMC_CS1, (IEN | PTU | PDIS | M1)}, /* mmm2_cmd */ |
65 | +#endif | |
34 | 66 | #if (CONFIG_CONS_INDEX == 1) |
35 | 67 | {UART1_RXD, (FSC | IEN | PTU | PDIS | M0)}, /* UART1_RXD */ |
36 | 68 | {UART1_TXD, (FSC | IEN | PTU | PDIS | M0)}, /* UART1_TXD */ |
... | ... | @@ -68,6 +100,33 @@ |
68 | 100 | {VIN2A_D21, (IEN | M3)}, |
69 | 101 | {VIN2A_D22, (IEN | M3)}, |
70 | 102 | {VIN2A_D23, (IEN | M3)}, |
103 | +#if defined(CONFIG_NAND) || defined(CONFIG_NOR) | |
104 | + /* NAND / NOR pin-mux */ | |
105 | + {GPMC_AD0 , M0 | IEN | PDIS}, /* GPMC_AD0 */ | |
106 | + {GPMC_AD1 , M0 | IEN | PDIS}, /* GPMC_AD1 */ | |
107 | + {GPMC_AD2 , M0 | IEN | PDIS}, /* GPMC_AD2 */ | |
108 | + {GPMC_AD3 , M0 | IEN | PDIS}, /* GPMC_AD3 */ | |
109 | + {GPMC_AD4 , M0 | IEN | PDIS}, /* GPMC_AD4 */ | |
110 | + {GPMC_AD5 , M0 | IEN | PDIS}, /* GPMC_AD5 */ | |
111 | + {GPMC_AD6 , M0 | IEN | PDIS}, /* GPMC_AD6 */ | |
112 | + {GPMC_AD7 , M0 | IEN | PDIS}, /* GPMC_AD7 */ | |
113 | + {GPMC_AD8 , M0 | IEN | PDIS}, /* GPMC_AD8 */ | |
114 | + {GPMC_AD9 , M0 | IEN | PDIS}, /* GPMC_AD9 */ | |
115 | + {GPMC_AD10, M0 | IEN | PDIS}, /* GPMC_AD10 */ | |
116 | + {GPMC_AD11, M0 | IEN | PDIS}, /* GPMC_AD11 */ | |
117 | + {GPMC_AD12, M0 | IEN | PDIS}, /* GPMC_AD12 */ | |
118 | + {GPMC_AD13, M0 | IEN | PDIS}, /* GPMC_AD13 */ | |
119 | + {GPMC_AD14, M0 | IEN | PDIS}, /* GPMC_AD14 */ | |
120 | + {GPMC_AD15, M0 | IEN | PDIS}, /* GPMC_AD15 */ | |
121 | + {GPMC_CS0, M0 | IDIS | PEN | PTU}, /* GPMC chip-select */ | |
122 | + {GPMC_ADVN_ALE, M0 | IDIS | PEN | PTD}, /* GPMC Addr latch */ | |
123 | + {GPMC_OEN_REN, M0 | IDIS | PEN | PTU}, /* GPMC Read enable */ | |
124 | + {GPMC_WEN, M0 | IDIS | PEN | PTU}, /* GPMC Write enable_n */ | |
125 | + {GPMC_BEN0, M0 | IDIS | PEN | PTD}, /* GPMC Byte/Column En */ | |
126 | + {GPMC_WAIT0, M0 | IEN | PEN | PTU}, /* GPMC Wait/Ready */ | |
127 | + /* GPMC_WPN (Write Protect) is controlled by DIP Switch SW10(12) */ | |
128 | +#else | |
129 | + /* QSPI pin-mux */ | |
71 | 130 | {GPMC_A13, (IEN | PDIS | M1)}, /* QSPI1_RTCLK */ |
72 | 131 | {GPMC_A14, (IEN | PDIS | M1)}, /* QSPI1_D[3] */ |
73 | 132 | {GPMC_A15, (IEN | PDIS | M1)}, /* QSPI1_D[2] */ |
74 | 133 | |
... | ... | @@ -78,7 +137,9 @@ |
78 | 137 | {GPMC_A4, (IEN | PDIS | M1)}, /* QSPI1_CS3 */ |
79 | 138 | {GPMC_CS2, (IEN | PTU | PDIS | M1)}, /* QSPI1_CS0 */ |
80 | 139 | {GPMC_CS3, (IEN | PTU | PDIS | M1)}, /* QSPI1_CS1*/ |
140 | +#endif /* CONFIG_NAND || CONFIG_NOR */ | |
81 | 141 | {USB2_DRVVBUS, (M0 | IEN | FSC) }, |
142 | + {SPI1_CS1, (PEN | IDIS | M14) }, | |
82 | 143 | }; |
83 | 144 | #endif /* _MUX_DATA_DRA7XX_H_ */ |
board/ti/ks2_evm/board_k2e.c
... | ... | @@ -25,15 +25,30 @@ |
25 | 25 | [usb_clk] = 100000000, |
26 | 26 | }; |
27 | 27 | |
28 | -static struct pll_init_data pll_config[] = { | |
29 | - CORE_PLL_1200, | |
30 | - PASS_PLL_1000, | |
28 | +static struct pll_init_data core_pll_config[] = { | |
29 | + CORE_PLL_800, | |
30 | + CORE_PLL_850, | |
31 | + CORE_PLL_1000, | |
32 | + CORE_PLL_1250, | |
33 | + CORE_PLL_1350, | |
34 | + CORE_PLL_1400, | |
35 | + CORE_PLL_1500, | |
31 | 36 | }; |
32 | 37 | |
38 | + | |
39 | +static struct pll_init_data pa_pll_config = | |
40 | + PASS_PLL_1000; | |
41 | + | |
33 | 42 | #if defined(CONFIG_BOARD_EARLY_INIT_F) |
34 | 43 | int board_early_init_f(void) |
35 | 44 | { |
36 | - init_plls(ARRAY_SIZE(pll_config), pll_config); | |
45 | + int speed; | |
46 | + | |
47 | + speed = get_max_dev_speed(); | |
48 | + init_pll(&core_pll_config[speed]); | |
49 | + | |
50 | + init_pll(&pa_pll_config); | |
51 | + | |
37 | 52 | return 0; |
38 | 53 | } |
39 | 54 | #endif |
board/ti/ks2_evm/board_k2hk.c
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | */ |
9 | 9 | |
10 | 10 | #include <common.h> |
11 | +#include <asm/arch/clock.h> | |
11 | 12 | #include <asm/arch/hardware.h> |
12 | 13 | #include <asm/arch/emac_defs.h> |
13 | 14 | |
14 | 15 | |
15 | 16 | |
... | ... | @@ -28,12 +29,23 @@ |
28 | 29 | [rp1_clk] = 123456789 |
29 | 30 | }; |
30 | 31 | |
31 | -static struct pll_init_data pll_config[] = { | |
32 | - CORE_PLL_1228, | |
33 | - PASS_PLL_983, | |
32 | +static struct pll_init_data core_pll_config[] = { | |
33 | + CORE_PLL_799, | |
34 | + CORE_PLL_999, | |
35 | + CORE_PLL_1200, | |
36 | +}; | |
37 | + | |
38 | +static struct pll_init_data tetris_pll_config[] = { | |
39 | + TETRIS_PLL_800, | |
40 | + TETRIS_PLL_1000, | |
34 | 41 | TETRIS_PLL_1200, |
42 | + TETRIS_PLL_1350, | |
43 | + TETRIS_PLL_1400, | |
35 | 44 | }; |
36 | 45 | |
46 | +static struct pll_init_data pa_pll_config = | |
47 | + PASS_PLL_983; | |
48 | + | |
37 | 49 | #ifdef CONFIG_DRIVER_TI_KEYSTONE_NET |
38 | 50 | struct eth_priv_t eth_priv_cfg[] = { |
39 | 51 | { |
... | ... | @@ -75,7 +87,16 @@ |
75 | 87 | #ifdef CONFIG_BOARD_EARLY_INIT_F |
76 | 88 | int board_early_init_f(void) |
77 | 89 | { |
78 | - init_plls(ARRAY_SIZE(pll_config), pll_config); | |
90 | + int speed; | |
91 | + | |
92 | + speed = get_max_dev_speed(); | |
93 | + init_pll(&core_pll_config[speed]); | |
94 | + | |
95 | + init_pll(&pa_pll_config); | |
96 | + | |
97 | + speed = get_max_arm_speed(); | |
98 | + init_pll(&tetris_pll_config[speed]); | |
99 | + | |
79 | 100 | return 0; |
80 | 101 | } |
81 | 102 | #endif |
common/Makefile
... | ... | @@ -219,10 +219,6 @@ |
219 | 219 | obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o |
220 | 220 | obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o |
221 | 221 | obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o |
222 | -# environment | |
223 | -obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o | |
224 | -obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o | |
225 | -obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o | |
226 | 222 | ifdef CONFIG_SPL_USB_HOST_SUPPORT |
227 | 223 | obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o |
228 | 224 | obj-$(CONFIG_USB_STORAGE) += usb_storage.o |
229 | 225 | |
... | ... | @@ -230,14 +226,16 @@ |
230 | 226 | ifdef CONFIG_SPL_SATA_SUPPORT |
231 | 227 | obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o |
232 | 228 | endif |
233 | -ifneq ($(CONFIG_SPL_NET_SUPPORT),y) | |
229 | +# environment | |
230 | +ifdef CONFIG_SPL_ENV_SUPPORT | |
231 | +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o | |
232 | +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o | |
233 | +obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o | |
234 | 234 | obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o |
235 | 235 | obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o |
236 | 236 | obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o |
237 | 237 | obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o |
238 | 238 | obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o |
239 | -else | |
240 | -obj-y += env_nowhere.o | |
241 | 239 | endif |
242 | 240 | endif |
243 | 241 | # core command |
configs/am335x_evm_defconfig
configs/am335x_evm_nor_defconfig
configs/am335x_evm_norboot_defconfig
configs/am335x_evm_spiboot_defconfig
configs/am335x_evm_uart1_defconfig
configs/am335x_evm_uart2_defconfig
configs/am335x_evm_uart3_defconfig
configs/am335x_evm_uart4_defconfig
configs/am335x_evm_uart5_defconfig
configs/am335x_evm_usbspl_defconfig
doc/README.cfi
... | ... | @@ -27,4 +27,17 @@ |
27 | 27 | |
28 | 28 | see also: |
29 | 29 | http://www.mail-archive.com/u-boot@lists.denx.de/msg24368.html |
30 | + | |
31 | + | |
32 | +Config Option | |
33 | + | |
34 | + CONFIG_SYS_MAX_FLASH_SECT: Number of sectors available on Flash device | |
35 | + | |
36 | + CONFIG_SYS_FLASH_CFI_WIDTH: Data-width of the flash device | |
37 | + | |
38 | + CONFIG_CMD_FLASH: Enables Flash command library | |
39 | + | |
40 | + CONFIG_FLASH_CFI_DRIVER: Enables CFI Flash driver | |
41 | + | |
42 | + CONFIG_FLASH_CFI_MTD: Enables MTD frame work for NOR Flash devices |
include/configs/am335x_evm.h
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | "${optargs} " \ |
62 | 62 | "root=${nandroot} " \ |
63 | 63 | "rootfstype=${nandrootfstype}\0" \ |
64 | - "nandroot=ubi0:rootfs rw ubi.mtd=7,2048,2048\0" \" \ | |
64 | + "nandroot=ubi0:rootfs rw ubi.mtd=9,2048,2048\0" \" \ | |
65 | 65 | "nandrootfstype=ubifs rootwait=1\0" \ |
66 | 66 | "nandboot=echo Booting from nand ...; " \ |
67 | 67 | "run nandargs; " \ |
68 | 68 | |
69 | 69 | |
70 | 70 | |
... | ... | @@ -223,22 +223,20 @@ |
223 | 223 | /* USB gadget RNDIS */ |
224 | 224 | #define CONFIG_SPL_MUSB_NEW_SUPPORT |
225 | 225 | |
226 | -/* General network SPL, both CPSW and USB gadget RNDIS */ | |
227 | -#define CONFIG_SPL_NET_SUPPORT | |
228 | -#define CONFIG_SPL_ENV_SUPPORT | |
229 | -#define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL" | |
230 | - | |
231 | 226 | #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds" |
227 | +#endif | |
232 | 228 | |
233 | 229 | #ifdef CONFIG_NAND |
234 | -#define CONFIG_NAND_OMAP_GPMC | |
235 | -#define CONFIG_NAND_OMAP_ELM | |
230 | +/* NAND: device related configs */ | |
236 | 231 | #define CONFIG_SYS_NAND_5_ADDR_CYCLE |
237 | 232 | #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ |
238 | 233 | CONFIG_SYS_NAND_PAGE_SIZE) |
239 | 234 | #define CONFIG_SYS_NAND_PAGE_SIZE 2048 |
240 | 235 | #define CONFIG_SYS_NAND_OOBSIZE 64 |
241 | 236 | #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) |
237 | +/* NAND: driver related configs */ | |
238 | +#define CONFIG_NAND_OMAP_GPMC | |
239 | +#define CONFIG_NAND_OMAP_ELM | |
242 | 240 | #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS |
243 | 241 | #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ |
244 | 242 | 10, 11, 12, 13, 14, 15, 16, 17, \ |
245 | 243 | |
... | ... | @@ -252,15 +250,34 @@ |
252 | 250 | #define CONFIG_SYS_NAND_ECCBYTES 14 |
253 | 251 | #define CONFIG_SYS_NAND_ONFI_DETECTION |
254 | 252 | #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW |
255 | -#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE | |
256 | -#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 | |
253 | +#define MTDIDS_DEFAULT "nand0=nand.0" | |
254 | +#define MTDPARTS_DEFAULT "mtdparts=nand.0:" \ | |
255 | + "128k(NAND.SPL)," \ | |
256 | + "128k(NAND.SPL.backup1)," \ | |
257 | + "128k(NAND.SPL.backup2)," \ | |
258 | + "128k(NAND.SPL.backup3)," \ | |
259 | + "256k(NAND.u-boot-spl-os)," \ | |
260 | + "1m(NAND.u-boot)," \ | |
261 | + "128k(NAND.u-boot-env)," \ | |
262 | + "128k(NAND.u-boot-env.backup1)," \ | |
263 | + "8m(NAND.kernel)," \ | |
264 | + "-(NAND.rootfs)" | |
265 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x000c0000 | |
266 | +#undef CONFIG_ENV_IS_NOWHERE | |
267 | +#define CONFIG_ENV_IS_IN_NAND | |
268 | +#define CONFIG_ENV_OFFSET 0x001c0000 | |
269 | +#define CONFIG_ENV_OFFSET_REDUND 0x001e0000 | |
270 | +#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE | |
271 | +/* NAND: SPL related configs */ | |
272 | +#ifdef CONFIG_SPL_NAND_SUPPORT | |
273 | +#define CONFIG_SPL_NAND_AM33XX_BCH | |
274 | +#endif | |
257 | 275 | #ifdef CONFIG_SPL_OS_BOOT |
258 | 276 | #define CONFIG_CMD_SPL_NAND_OFS 0x00080000 /* os parameters */ |
259 | 277 | #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000 /* kernel offset */ |
260 | 278 | #define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 |
261 | 279 | #endif |
262 | -#endif | |
263 | -#endif | |
280 | +#endif /* !CONFIG_NAND */ | |
264 | 281 | |
265 | 282 | /* |
266 | 283 | * For NOR boot, we must set this to the start of where NOR is mapped |
... | ... | @@ -314,10 +331,10 @@ |
314 | 331 | /* disable EFI partitions and partition UUID support */ |
315 | 332 | #undef CONFIG_PARTITION_UUIDS |
316 | 333 | #undef CONFIG_EFI_PARTITION |
317 | -/* | |
318 | - * Disable CPSW SPL support so we fit within the 101KiB limit. | |
319 | - */ | |
320 | -#undef CONFIG_SPL_ETH_SUPPORT | |
334 | +/* General network SPL */ | |
335 | +#define CONFIG_SPL_NET_SUPPORT | |
336 | +#define CONFIG_SPL_ENV_SUPPORT | |
337 | +#define CONFIG_SPL_NET_VCI_STRING "AM335x U-Boot SPL" | |
321 | 338 | #endif |
322 | 339 | |
323 | 340 | /* USB Device Firmware Update support */ |
... | ... | @@ -399,6 +416,7 @@ |
399 | 416 | #elif defined(CONFIG_EMMC_BOOT) |
400 | 417 | #undef CONFIG_ENV_IS_NOWHERE |
401 | 418 | #define CONFIG_ENV_IS_IN_MMC |
419 | +#define CONFIG_SPL_ENV_SUPPORT | |
402 | 420 | #define CONFIG_SYS_MMC_ENV_DEV 1 |
403 | 421 | #define CONFIG_SYS_MMC_ENV_PART 2 |
404 | 422 | #define CONFIG_ENV_OFFSET 0x0 |
... | ... | @@ -416,23 +434,6 @@ |
416 | 434 | #define CONFIG_PHY_GIGE |
417 | 435 | #define CONFIG_PHYLIB |
418 | 436 | #define CONFIG_PHY_SMSC |
419 | - | |
420 | -/* NAND support */ | |
421 | -#ifdef CONFIG_NAND | |
422 | -#define CONFIG_CMD_NAND | |
423 | -#if !defined(CONFIG_SPI_BOOT) && !defined(CONFIG_NOR_BOOT) | |
424 | -#define MTDIDS_DEFAULT "nand0=omap2-nand.0" | |
425 | -#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:128k(SPL)," \ | |
426 | - "128k(SPL.backup1)," \ | |
427 | - "128k(SPL.backup2)," \ | |
428 | - "128k(SPL.backup3),1792k(u-boot)," \ | |
429 | - "128k(u-boot-spl-os)," \ | |
430 | - "128k(u-boot-env),5m(kernel),-(rootfs)" | |
431 | -#define CONFIG_ENV_IS_IN_NAND | |
432 | -#define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */ | |
433 | -#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */ | |
434 | -#endif | |
435 | -#endif | |
436 | 437 | |
437 | 438 | /* |
438 | 439 | * NOR Size = 16 MiB |
include/configs/am43xx_evm.h
... | ... | @@ -265,5 +265,69 @@ |
265 | 265 | #define CONFIG_SPL_NET_SUPPORT |
266 | 266 | #define CONFIG_SYS_RX_ETH_BUFFER 64 |
267 | 267 | |
268 | +/* NAND support */ | |
269 | +#ifdef CONFIG_NAND | |
270 | +/* NAND: device related configs */ | |
271 | +#define CONFIG_SYS_NAND_PAGE_SIZE 4096 | |
272 | +#define CONFIG_SYS_NAND_OOBSIZE 224 | |
273 | +#define CONFIG_SYS_NAND_BLOCK_SIZE (256*1024) | |
274 | +#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ | |
275 | + CONFIG_SYS_NAND_PAGE_SIZE) | |
276 | +#define CONFIG_SYS_NAND_5_ADDR_CYCLE | |
277 | +/* NAND: driver related configs */ | |
278 | +#define CONFIG_NAND_OMAP_GPMC | |
279 | +#define CONFIG_NAND_OMAP_ELM | |
280 | +#define CONFIG_SYS_NAND_ONFI_DETECTION | |
281 | +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH16_CODE_HW | |
282 | +#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS | |
283 | +#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ | |
284 | + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, \ | |
285 | + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, \ | |
286 | + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \ | |
287 | + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \ | |
288 | + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, \ | |
289 | + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, \ | |
290 | + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, \ | |
291 | + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, \ | |
292 | + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, \ | |
293 | + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, \ | |
294 | + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, \ | |
295 | + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, \ | |
296 | + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, \ | |
297 | + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, \ | |
298 | + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, \ | |
299 | + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, \ | |
300 | + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, \ | |
301 | + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, \ | |
302 | + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, \ | |
303 | + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, \ | |
304 | + } | |
305 | +#define CONFIG_SYS_NAND_ECCSIZE 512 | |
306 | +#define CONFIG_SYS_NAND_ECCBYTES 26 | |
307 | +#define MTDIDS_DEFAULT "nand0=nand.0" | |
308 | +#define MTDPARTS_DEFAULT "mtdparts=nand.0:" \ | |
309 | + "256k(NAND.SPL)," \ | |
310 | + "256k(NAND.SPL.backup1)," \ | |
311 | + "256k(NAND.SPL.backup2)," \ | |
312 | + "256k(NAND.SPL.backup3)," \ | |
313 | + "512k(NAND.u-boot-spl-os)," \ | |
314 | + "1m(NAND.u-boot)," \ | |
315 | + "256k(NAND.u-boot-env)," \ | |
316 | + "256k(NAND.u-boot-env.backup1)," \ | |
317 | + "7m(NAND.kernel)," \ | |
318 | + "-(NAND.rootfs)" | |
319 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00180000 | |
320 | +/* NAND: SPL related configs */ | |
321 | +#ifdef CONFIG_SPL_NAND_SUPPORT | |
322 | +#define CONFIG_SPL_NAND_AM33XX_BCH | |
323 | +#endif | |
324 | +/* NAND: SPL falcon mode configs */ | |
325 | +#ifdef CONFIG_SPL_OS_BOOT | |
326 | +#define CONFIG_CMD_SPL_NAND_OFS 0x00100000 /* os parameters */ | |
327 | +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00300000 /* kernel offset */ | |
328 | +#define CONFIG_CMD_SPL_WRITE_SIZE CONFIG_SYS_NAND_BLOCK_SIZE | |
329 | +#endif | |
330 | +#endif /* !CONFIG_NAND */ | |
331 | + | |
268 | 332 | #endif /* __CONFIG_AM43XX_EVM_H */ |
include/configs/cm_t54.h
include/configs/dra7xx_evm.h
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 | #define __CONFIG_DRA7XX_EVM_H |
14 | 14 | |
15 | 15 | #define CONFIG_DRA7XX |
16 | +#define CONFIG_BOARD_EARLY_INIT_F | |
16 | 17 | |
17 | 18 | #ifndef CONFIG_QSPI_BOOT |
18 | 19 | /* MMC ENV related defines */ |
... | ... | @@ -142,6 +143,94 @@ |
142 | 143 | #define CONFIG_SYS_SCSI_MAX_LUN 1 |
143 | 144 | #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ |
144 | 145 | CONFIG_SYS_SCSI_MAX_LUN) |
146 | + | |
147 | +/* NAND support */ | |
148 | +#ifdef CONFIG_NAND | |
149 | +/* NAND: device related configs */ | |
150 | +#define CONFIG_SYS_NAND_PAGE_SIZE 2048 | |
151 | +#define CONFIG_SYS_NAND_OOBSIZE 64 | |
152 | +#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) | |
153 | +#define CONFIG_SYS_NAND_BUSWIDTH_16BIT | |
154 | +#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ | |
155 | + CONFIG_SYS_NAND_PAGE_SIZE) | |
156 | +#define CONFIG_SYS_NAND_5_ADDR_CYCLE | |
157 | +/* NAND: driver related configs */ | |
158 | +#define CONFIG_NAND_OMAP_GPMC | |
159 | +#define CONFIG_NAND_OMAP_ELM | |
160 | +#define CONFIG_SYS_NAND_ONFI_DETECTION | |
161 | +#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW | |
162 | +#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS | |
163 | +#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ | |
164 | + 10, 11, 12, 13, 14, 15, 16, 17, \ | |
165 | + 18, 19, 20, 21, 22, 23, 24, 25, \ | |
166 | + 26, 27, 28, 29, 30, 31, 32, 33, \ | |
167 | + 34, 35, 36, 37, 38, 39, 40, 41, \ | |
168 | + 42, 43, 44, 45, 46, 47, 48, 49, \ | |
169 | + 50, 51, 52, 53, 54, 55, 56, 57, } | |
170 | +#define CONFIG_SYS_NAND_ECCSIZE 512 | |
171 | +#define CONFIG_SYS_NAND_ECCBYTES 14 | |
172 | +#define MTDIDS_DEFAULT "nand0=nand.0" | |
173 | +#define MTDPARTS_DEFAULT "mtdparts=nand.0:" \ | |
174 | + "128k(NAND.SPL)," \ | |
175 | + "128k(NAND.SPL.backup1)," \ | |
176 | + "128k(NAND.SPL.backup2)," \ | |
177 | + "128k(NAND.SPL.backup3)," \ | |
178 | + "256k(NAND.u-boot-spl-os)," \ | |
179 | + "1m(NAND.u-boot)," \ | |
180 | + "128k(NAND.u-boot-env)," \ | |
181 | + "128k(NAND.u-boot-env.backup1)," \ | |
182 | + "8m(NAND.kernel)," \ | |
183 | + "-(NAND.rootfs)" | |
184 | +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x000c0000 | |
185 | +/* NAND: SPL related configs */ | |
186 | +#ifdef CONFIG_SPL_NAND_SUPPORT | |
187 | +#define CONFIG_SPL_NAND_AM33XX_BCH | |
188 | +#endif | |
189 | +/* NAND: SPL falcon mode configs */ | |
190 | +#ifdef CONFIG_SPL_OS_BOOT | |
191 | +#define CONFIG_CMD_SPL_NAND_OFS 0x00080000 /* os-boot params*/ | |
192 | +#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x00200000 /* kernel offset */ | |
193 | +#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000 | |
194 | +#endif | |
195 | +#endif /* !CONFIG_NAND */ | |
196 | + | |
197 | +/* Parallel NOR Support */ | |
198 | +#if defined(CONFIG_NOR) | |
199 | +/* NOR: device related configs */ | |
200 | +#define CONFIG_SYS_MAX_FLASH_SECT 512 | |
201 | +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT | |
202 | +#define CONFIG_SYS_FLASH_SIZE (64 * 1024 * 1024) /* 64 MB */ | |
203 | +/* #define CONFIG_INIT_IGNORE_ERROR */ | |
204 | +#undef CONFIG_SYS_NO_FLASH | |
205 | +#define CONFIG_CMD_FLASH | |
206 | +#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE | |
207 | +#define CONFIG_SYS_FLASH_PROTECTION | |
208 | +#define CONFIG_SYS_FLASH_CFI | |
209 | +#define CONFIG_FLASH_CFI_DRIVER | |
210 | +#define CONFIG_FLASH_CFI_MTD | |
211 | +#define CONFIG_SYS_MAX_FLASH_BANKS 1 | |
212 | +#define CONFIG_SYS_FLASH_BASE (0x08000000) | |
213 | +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE | |
214 | +/* Reduce SPL size by removing unlikey targets */ | |
215 | +#ifdef CONFIG_NOR_BOOT | |
216 | +#define CONFIG_ENV_IS_IN_FLASH | |
217 | +#define CONFIG_ENV_SECT_SIZE (128 * 1024) /* 128 KiB */ | |
218 | +#define MTDIDS_DEFAULT "nor0=physmap-flash.0" | |
219 | +#define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:" \ | |
220 | + "128k(NOR.SPL)," \ | |
221 | + "128k(NOR.SPL.backup1)," \ | |
222 | + "128k(NOR.SPL.backup2)," \ | |
223 | + "128k(NOR.SPL.backup3)," \ | |
224 | + "256k(NOR.u-boot-spl-os)," \ | |
225 | + "1m(NOR.u-boot)," \ | |
226 | + "128k(NOR.u-boot-env)," \ | |
227 | + "128k(NOR.u-boot-env.backup1)," \ | |
228 | + "8m(NOR.kernel)," \ | |
229 | + "-(NOR.rootfs)" | |
230 | +#define CONFIG_ENV_OFFSET 0x001c0000 | |
231 | +#define CONFIG_ENV_OFFSET_REDUND 0x001e0000 | |
232 | +#endif | |
233 | +#endif /* NOR support */ | |
145 | 234 | |
146 | 235 | #endif /* __CONFIG_DRA7XX_EVM_H */ |
include/configs/pcm051.h
... | ... | @@ -19,35 +19,13 @@ |
19 | 19 | #ifndef __CONFIG_PCM051_H |
20 | 20 | #define __CONFIG_PCM051_H |
21 | 21 | |
22 | -#define CONFIG_AM33XX | |
23 | -#define CONFIG_OMAP | |
24 | -#define CONFIG_OMAP_COMMON | |
22 | +#include <configs/ti_am335x_common.h> | |
25 | 23 | |
26 | -#include <asm/arch/omap.h> | |
27 | - | |
28 | 24 | #define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ |
29 | -#define CONFIG_SYS_MALLOC_LEN (1024 << 10) | |
30 | -#define CONFIG_SYS_LONGHELP /* undef to save memory */ | |
31 | -#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ | |
32 | -#define CONFIG_SYS_PROMPT "U-Boot# " | |
33 | -#define CONFIG_SYS_NO_FLASH | |
34 | 25 | #define MACH_TYPE_PCM051 4144 /* Until the next sync */ |
35 | 26 | #define CONFIG_MACH_TYPE MACH_TYPE_PCM051 |
36 | 27 | |
37 | -#define CONFIG_OF_LIBFDT | |
38 | -#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ | |
39 | -#define CONFIG_SETUP_MEMORY_TAGS | |
40 | -#define CONFIG_INITRD_TAG | |
41 | - | |
42 | -/* commands to include */ | |
43 | -#include <config_cmd_default.h> | |
44 | - | |
45 | -#define CONFIG_CMD_ASKENV | |
46 | -#define CONFIG_VERSION_VARIABLE | |
47 | - | |
48 | 28 | /* set to negative value for no autoboot */ |
49 | -#define CONFIG_BOOTDELAY 1 | |
50 | -#define CONFIG_ENV_VARS_UBOOT_CONFIG | |
51 | 29 | #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG |
52 | 30 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
53 | 31 | "loadaddr=0x80007fc0\0" \ |
... | ... | @@ -104,21 +82,6 @@ |
104 | 82 | #define V_OSCK 25000000 /* Clock output from T2 */ |
105 | 83 | #define V_SCLK (V_OSCK) |
106 | 84 | |
107 | -#define CONFIG_CMD_ECHO | |
108 | - | |
109 | -/* max number of command args */ | |
110 | -#define CONFIG_SYS_MAXARGS 16 | |
111 | - | |
112 | -/* Console I/O Buffer Size */ | |
113 | -#define CONFIG_SYS_CBSIZE 512 | |
114 | - | |
115 | -/* Print Buffer Size */ | |
116 | -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \ | |
117 | - + sizeof(CONFIG_SYS_PROMPT) + 16) | |
118 | - | |
119 | -/* Boot Argument Buffer Size */ | |
120 | -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE | |
121 | - | |
122 | 85 | /* |
123 | 86 | * memtest works on 8 MB in DRAM after skipping 32MB from |
124 | 87 | * start addr of ram disk |
125 | 88 | |
126 | 89 | |
... | ... | @@ -127,41 +90,13 @@ |
127 | 90 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START \ |
128 | 91 | + (8 * 1024 * 1024)) |
129 | 92 | |
130 | -#define CONFIG_SYS_LOAD_ADDR 0x80007fc0 /* Default load address */ | |
131 | - | |
132 | -#define CONFIG_MMC | |
133 | -#define CONFIG_GENERIC_MMC | |
134 | -#define CONFIG_OMAP_HSMMC | |
135 | -#define CONFIG_CMD_MMC | |
136 | -#define CONFIG_DOS_PARTITION | |
137 | -#define CONFIG_CMD_FAT | |
138 | -#define CONFIG_CMD_EXT2 | |
139 | - | |
140 | -#define CONFIG_SPI | |
141 | -#define CONFIG_OMAP3_SPI | |
142 | -#define CONFIG_MTD_DEVICE | |
143 | 93 | #define CONFIG_SPI_FLASH |
144 | 94 | #define CONFIG_SPI_FLASH_WINBOND |
145 | 95 | #define CONFIG_CMD_SF |
146 | 96 | #define CONFIG_SF_DEFAULT_SPEED 24000000 |
147 | 97 | |
148 | - /* Physical Memory Map */ | |
149 | -#define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ | |
150 | -#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 19) /* 512MiB */ | |
151 | - | |
152 | -#define CONFIG_SYS_SDRAM_BASE 0x80000000 | |
153 | -#define CONFIG_SYS_INIT_SP_ADDR (NON_SECURE_SRAM_END - \ | |
154 | - GENERATED_GBL_DATA_SIZE) | |
155 | - /* Platform/Board specific defs */ | |
156 | -#define CONFIG_SYS_TIMERBASE 0x48040000 /* Use Timer2 */ | |
157 | -#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */ | |
158 | - | |
159 | 98 | #define CONFIG_CONS_INDEX 1 |
160 | 99 | /* NS16550 Configuration */ |
161 | -#define CONFIG_SYS_NS16550 | |
162 | -#define CONFIG_SYS_NS16550_SERIAL | |
163 | -#define CONFIG_SYS_NS16550_REG_SIZE (-4) | |
164 | -#define CONFIG_SYS_NS16550_CLK (48000000) | |
165 | 100 | #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ |
166 | 101 | #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ |
167 | 102 | #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */ |
168 | 103 | |
169 | 104 | |
170 | 105 | |
171 | 106 | |
... | ... | @@ -170,65 +105,26 @@ |
170 | 105 | #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */ |
171 | 106 | |
172 | 107 | /* I2C Configuration */ |
173 | -#define CONFIG_I2C | |
174 | -#define CONFIG_CMD_I2C | |
175 | -#define CONFIG_SYS_I2C | |
176 | -#define CONFIG_SYS_OMAP24_I2C_SPEED 100000 | |
177 | -#define CONFIG_SYS_OMAP24_I2C_SLAVE 1 | |
178 | -#define CONFIG_SYS_I2C_OMAP24XX | |
179 | 108 | #define CONFIG_CMD_EEPROM |
180 | 109 | #define CONFIG_ENV_EEPROM_IS_ON_I2C |
181 | 110 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */ |
182 | 111 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 |
183 | 112 | #define CONFIG_SYS_I2C_MULTI_EEPROMS |
184 | 113 | |
185 | -#define CONFIG_OMAP_GPIO | |
186 | - | |
187 | -#define CONFIG_BAUDRATE 115200 | |
188 | 114 | #define CONFIG_SYS_BAUDRATE_TABLE { 110, 300, 600, 1200, 2400, \ |
189 | 115 | 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 } |
190 | 116 | |
191 | 117 | /* CPU */ |
192 | -#define CONFIG_ARCH_CPU_INIT | |
193 | - | |
194 | -#define CONFIG_ENV_OVERWRITE | |
195 | -#define CONFIG_SYS_CONSOLE_INFO_QUIET | |
196 | - | |
197 | 118 | #define CONFIG_ENV_IS_NOWHERE |
198 | 119 | |
199 | -/* Defines for SPL */ | |
200 | -#define CONFIG_SPL_FRAMEWORK | |
201 | -#define CONFIG_SPL_BOARD_INIT | |
202 | -/* | |
203 | - * Place the image at the start of the ROM defined image space. | |
204 | - * We limit our size to the ROM-defined downloaded image area, and use the | |
205 | - * rest of the space for stack. | |
206 | - */ | |
207 | -#define CONFIG_SPL_TEXT_BASE 0x402F0400 | |
208 | -#define CONFIG_SPL_MAX_SIZE (0x4030C000 - CONFIG_SPL_TEXT_BASE) | |
209 | -#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR | |
210 | - | |
211 | -#define CONFIG_SPL_BSS_START_ADDR 0x80000000 | |
212 | -#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ | |
213 | - | |
214 | -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ | |
215 | -#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ | |
216 | -#define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION 1 | |
217 | -#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME "u-boot.img" | |
218 | -#define CONFIG_SPL_MMC_SUPPORT | |
219 | -#define CONFIG_SPL_FAT_SUPPORT | |
220 | -#define CONFIG_SPL_I2C_SUPPORT | |
221 | - | |
222 | -#define CONFIG_SPL_LIBCOMMON_SUPPORT | |
223 | -#define CONFIG_SPL_LIBDISK_SUPPORT | |
224 | -#define CONFIG_SPL_LIBGENERIC_SUPPORT | |
225 | -#define CONFIG_SPL_SERIAL_SUPPORT | |
226 | -#define CONFIG_SPL_GPIO_SUPPORT | |
227 | 120 | #define CONFIG_SPL_YMODEM_SUPPORT |
228 | 121 | #define CONFIG_SPL_NET_SUPPORT |
229 | 122 | #define CONFIG_SPL_ENV_SUPPORT |
230 | 123 | #define CONFIG_SPL_NET_VCI_STRING "pcm051 U-Boot SPL" |
231 | 124 | #define CONFIG_SPL_ETH_SUPPORT |
125 | +#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds" | |
126 | + | |
127 | +#ifdef CONFIG_SPI_BOOT | |
232 | 128 | #define CONFIG_SPL_SPI_SUPPORT |
233 | 129 | #define CONFIG_SPL_SPI_FLASH_SUPPORT |
234 | 130 | #define CONFIG_SPL_SPI_LOAD |
... | ... | @@ -236,23 +132,6 @@ |
236 | 132 | #define CONFIG_SPL_SPI_CS 0 |
237 | 133 | #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 |
238 | 134 | #define CONFIG_SYS_SPI_U_BOOT_SIZE 0x40000 |
239 | -#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds" | |
240 | - | |
241 | -/* | |
242 | - * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM | |
243 | - * 64 bytes before this address should be set aside for u-boot.img's | |
244 | - * header. That is 0x800FFFC0--0x80100000 should not be used for any | |
245 | - * other needs. | |
246 | - */ | |
247 | -#define CONFIG_SYS_TEXT_BASE 0x80800000 | |
248 | -#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 | |
249 | -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000 | |
250 | - | |
251 | -/* Since SPL did pll and ddr initialization for us, | |
252 | - * we don't need to do it twice. | |
253 | - */ | |
254 | -#ifndef CONFIG_SPL_BUILD | |
255 | -#define CONFIG_SKIP_LOWLEVEL_INIT | |
256 | 135 | #endif |
257 | 136 | |
258 | 137 | /* |
... | ... | @@ -282,17 +161,6 @@ |
282 | 161 | /* Unsupported features */ |
283 | 162 | #undef CONFIG_USE_IRQ |
284 | 163 | |
285 | -#define CONFIG_CMD_NET | |
286 | -#define CONFIG_CMD_DHCP | |
287 | -#define CONFIG_CMD_PING | |
288 | -#define CONFIG_DRIVER_TI_CPSW | |
289 | -#define CONFIG_MII | |
290 | -#define CONFIG_BOOTP_DNS | |
291 | -#define CONFIG_BOOTP_DNS2 | |
292 | -#define CONFIG_BOOTP_SEND_HOSTNAME | |
293 | -#define CONFIG_BOOTP_GATEWAY | |
294 | -#define CONFIG_BOOTP_SUBNETMASK | |
295 | -#define CONFIG_NET_RETRY_COUNT 10 | |
296 | 164 | #define CONFIG_NET_MULTI |
297 | 165 | #define CONFIG_PHY_GIGE |
298 | 166 | #define CONFIG_PHYLIB |
include/configs/tam3517-common.h
include/configs/ti_armv7_common.h
... | ... | @@ -202,15 +202,18 @@ |
202 | 202 | #define CONFIG_SPL_OS_BOOT |
203 | 203 | |
204 | 204 | /* |
205 | - * Place the image at the start of the ROM defined image space. | |
206 | - * We limit our size to the ROM-defined downloaded image area, and use the | |
207 | - * rest of the space for stack. We load U-Boot itself into memory at | |
208 | - * 0x80800000 for legacy reasons (to not conflict with older SPLs). We | |
209 | - * have our BSS be placed 1MiB after this, to allow for the default | |
210 | - * Linux kernel address of 0x80008000 to work, in the Falcon Mode case. | |
211 | - * We have the SPL malloc pool at the end of the BSS area. | |
205 | + * Place the image at the start of the ROM defined image space (per | |
206 | + * CONFIG_SPL_TEXT_BASE and we limit our size to the ROM-defined | |
207 | + * downloaded image area. We initalize DRAM as soon as we can so that | |
208 | + * we can place stack, malloc and BSS there. We load U-Boot itself into | |
209 | + * memory at 0x80800000 for legacy reasons (to not conflict with older | |
210 | + * SPLs). We have our BSS be placed 2MiB after this, to allow for the | |
211 | + * default Linux kernel address of 0x80008000 to work with most sized | |
212 | + * kernels, in the Falcon Mode case. We have the SPL malloc pool at the | |
213 | + * end of the BSS area. We place our stack at 32MiB after the start of | |
214 | + * DRAM to allow room for all of the above. | |
212 | 215 | */ |
213 | -#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR | |
216 | +#define CONFIG_SPL_STACK (CONFIG_SYS_SDRAM_BASE + (32 << 20)) | |
214 | 217 | #ifndef CONFIG_SYS_TEXT_BASE |
215 | 218 | #define CONFIG_SYS_TEXT_BASE 0x80800000 |
216 | 219 | #endif |
include/configs/tseries.h
... | ... | @@ -243,8 +243,12 @@ |
243 | 243 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
244 | 244 | |
245 | 245 | #elif defined(CONFIG_NAND) |
246 | -#undef CONFIG_ENV_IS_NOWHERE | |
246 | +/* No NAND env support in SPL */ | |
247 | +#ifdef CONFIG_SPL_BUILD | |
248 | +#define CONFIG_ENV_IS_NOWHERE | |
249 | +#else | |
247 | 250 | #define CONFIG_ENV_IS_IN_NAND |
251 | +#endif | |
248 | 252 | #define CONFIG_ENV_OFFSET 0x120000 /* TODO: Adresse definieren */ |
249 | 253 | #define CONFIG_SYS_ENV_SECT_SIZE CONFIG_ENV_SIZE |
250 | 254 | #else |