Commit 660a2e650d718fa01ad0e5da7907c2064c2e3cbe

Authored by Heiko Schocher
Committed by Tom Rini
1 parent 2fff63c2a5

arm, da85x: update for the ipam390 board

- switch to correct ecc layout used by the RBL
  enable CONFIG_NAND_6BYTES_OOB_FREE_10BYTES_ECC
- update default environment
- change A2CR to correct value for UART boot mode
- adapt cs3cfg timings for nand
- change LED bootmode signalization

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>

Showing 3 changed files with 32 additions and 34 deletions Side-by-side Diff

board/Barix/ipam390/ipam390-ais-uart.cfg
... ... @@ -109,7 +109,7 @@
109 109 ;NANDFCR = 0x00000000
110 110 [EMIF25ASYNC]
111 111 A1CR = 0x00000000
112   -A2CR = 0x3FFFFFFE
  112 +A2CR = 0x04202110
113 113 A3CR = 0x00000000
114 114 A4CR = 0x00000000
115 115 NANDFCR = 0x00000012
board/Barix/ipam390/ipam390.c
... ... @@ -264,7 +264,7 @@
264 264 static int green;
265 265  
266 266 if (red == 0)
267   - red = init_led(CONFIG_IPAM390_GPIO_LED_RED, "red", LED_OFF);
  267 + red = init_led(CONFIG_IPAM390_GPIO_LED_RED, "red", LED_ON);
268 268 if (red != CONFIG_IPAM390_GPIO_LED_RED)
269 269 return;
270 270 if (green == 0)
271 271  
... ... @@ -277,10 +277,10 @@
277 277 case BOOTSTAGE_ID_RUN_OS:
278 278 /*
279 279 * set normal state
280   - * LED Red : off
  280 + * LED Red : on
281 281 * LED green: off
282 282 */
283   - gpio_set_value(red, LED_OFF);
  283 + gpio_set_value(red, LED_ON);
284 284 gpio_set_value(green, LED_OFF);
285 285 break;
286 286 case BOOTSTAGE_ID_MAIN_LOOP:
... ... @@ -326,23 +326,12 @@
326 326 if (!bootmode)
327 327 if (ret == 0)
328 328 bootmode = 1;
329   - if (bootmode) {
330   - /*
331   - * Booting U-Boot
332   - * LED Red : on
333   - * LED green: off
334   - */
335   - init_led(CONFIG_IPAM390_GPIO_LED_RED, "red", LED_ON);
336   - init_led(CONFIG_IPAM390_GPIO_LED_GREEN, "green", LED_OFF);
337   - } else {
338   - /*
339   - * Booting Linux
340   - * LED Red : off
341   - * LED green: off
342   - */
343   - init_led(CONFIG_IPAM390_GPIO_LED_RED, "red", LED_OFF);
344   - init_led(CONFIG_IPAM390_GPIO_LED_GREEN, "green", LED_OFF);
345   - }
  329 + /*
  330 + * LED red : on
  331 + * LED green: off
  332 + */
  333 + init_led(CONFIG_IPAM390_GPIO_LED_RED, "red", LED_ON);
  334 + init_led(CONFIG_IPAM390_GPIO_LED_GREEN, "green", LED_OFF);
346 335 return bootmode;
347 336 }
348 337 #endif
include/configs/ipam390.h
... ... @@ -122,13 +122,13 @@
122 122 (3 << DV_DDR_SDCR_IBANK_SHIFT) | \
123 123 (2 << DV_DDR_SDCR_PAGESIZE_SHIFT))
124 124  
125   -#define CONFIG_SYS_DA850_CS3CFG (DAVINCI_ABCR_WSETUP(2) | \
  125 +#define CONFIG_SYS_DA850_CS3CFG (DAVINCI_ABCR_WSETUP(1) | \
126 126 DAVINCI_ABCR_WSTROBE(2) | \
127   - DAVINCI_ABCR_WHOLD(1) | \
  127 + DAVINCI_ABCR_WHOLD(0) | \
128 128 DAVINCI_ABCR_RSETUP(1) | \
129   - DAVINCI_ABCR_RSTROBE(4) | \
130   - DAVINCI_ABCR_RHOLD(0) | \
131   - DAVINCI_ABCR_TA(1) | \
  129 + DAVINCI_ABCR_RSTROBE(2) | \
  130 + DAVINCI_ABCR_RHOLD(1) | \
  131 + DAVINCI_ABCR_TA(0) | \
132 132 DAVINCI_ABCR_ASIZE_8BIT)
133 133  
134 134  
... ... @@ -161,6 +161,7 @@
161 161 #undef CONFIG_SYS_NAND_HW_ECC
162 162 #define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
163 163 #define CONFIG_SYS_NAND_HW_ECC_OOBFIRST
  164 +#define CONFIG_NAND_6BYTES_OOB_FREE_10BYTES_ECC
164 165 #define CONFIG_SYS_NAND_5_ADDR_CYCLE
165 166 #define CONFIG_SYS_NAND_PAGE_SIZE (2 << 10)
166 167 #define CONFIG_SYS_NAND_BLOCK_SIZE (128 << 10)
... ... @@ -173,11 +174,10 @@
173 174 CONFIG_SYS_MALLOC_LEN - \
174 175 GENERATED_GBL_DATA_SIZE)
175 176 #define CONFIG_SYS_NAND_ECCPOS { \
176   - 24, 25, 26, 27, 28, \
177   - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, \
178   - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, \
179   - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, \
180   - 59, 60, 61, 62, 63 }
  177 + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, \
  178 + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, \
  179 + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, \
  180 + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}
181 181 #define CONFIG_SYS_NAND_PAGE_COUNT 64
182 182 #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
183 183 #define CONFIG_SYS_NAND_ECCSIZE 512
184 184  
185 185  
186 186  
187 187  
188 188  
... ... @@ -230,15 +230,24 @@
230 230 #define CONFIG_CMDLINE_TAG
231 231 #define CONFIG_REVISION_TAG
232 232 #define CONFIG_SETUP_MEMORY_TAGS
233   -#define CONFIG_BOOTARGS \
234   - "mem=128M console=ttyS0,115200n8 root=/dev/mtdblock0p4 rw noinitrd ip=dhcp"
235   -#define CONFIG_BOOTDELAY 3
  233 +#define CONFIG_BOOTDELAY 2
236 234 #define CONFIG_EXTRA_ENV_SETTINGS \
  235 + "defbootargs=setenv bootargs mem=128M console=ttyS0,115200n8 " \
  236 + "root=/dev/mtdblock5 rw noinitrd " \
  237 + "rootfstype=jffs2 noinitrd\0" \
237 238 "hwconfig=dsp:wake=yes\0" \
  239 + "bootcmd=nboot kernel;run defbootargs addmtd;bootm 0xc0700000\0" \
  240 + "bootfile=uImage\0" \
238 241 "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
  242 + "mtddevname=uboot-env\0" \
  243 + "mtddevnum=0\0" \
239 244 "mtdids=" MTDIDS_DEFAULT "\0" \
240 245 "mtdparts=" MTDPARTS_DEFAULT "\0" \
  246 + "u-boot=/tftpboot/ipam390/u-boot.ais\0" \
  247 + "upd_uboot=tftp c0000000 ${u-boot};nand erase.part u-boot;" \
  248 + "nand write c0000000 20000 ${filesize}\0" \
241 249 "setbootparms=nand read c0100000 200000 400000;" \
  250 + "run defbootargs addmtd;" \
242 251 "spl export atags c0100000;" \
243 252 "nand erase.part bootparms;" \
244 253 "nand write c0000100 180000 20000\0" \