arm: am33xx: Handle NAND+I2C boot-device the same way as NAND
authorStefan Roese <sr@denx.de>
Wed, 12 Nov 2014 10:57:33 +0000 (11:57 +0100)
committerTom Rini <trini@ti.com>
Fri, 5 Dec 2014 02:28:31 +0000 (21:28 -0500)
Re-map NAND&I2C boot-device to the "normal" NAND boot-device.
Otherwise the SPL boot IF can't handle this device correctly.
Somehow booting with Hynix 4GBit NAND H27U4G8 on Siemens
Draco leads to this boot-device passed to SPL from the BootROM.

With this change, Draco boots just fine into main U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
arch/arm/cpu/armv7/omap-common/boot-common.c
arch/arm/include/asm/arch-am33xx/spl.h

index b819fe2e6427c54ebfe97b6c6d032a54ba36364b..cb18908867dd06d2494a2ef8dce9776313dfe663 100644 (file)
@@ -33,8 +33,19 @@ void save_omap_boot_params(void)
         * used. But it not correct to assume that romcode structure
         * encoding would be same as u-boot. So use the defined offsets.
         */
-       gd->arch.omap_boot_params.omap_bootdevice = boot_device =
-                                  *((u8 *)(rom_params + BOOT_DEVICE_OFFSET));
+       boot_device = *((u8 *)(rom_params + BOOT_DEVICE_OFFSET));
+
+#if defined(BOOT_DEVICE_NAND_I2C)
+       /*
+        * Re-map NAND&I2C boot-device to the "normal" NAND boot-device.
+        * Otherwise the SPL boot IF can't handle this device correctly.
+        * Somehow booting with Hynix 4GBit NAND H27U4G8 on Siemens
+        * Draco leads to this boot-device passed to SPL from the BootROM.
+        */
+       if (boot_device == BOOT_DEVICE_NAND_I2C)
+               boot_device = BOOT_DEVICE_NAND;
+#endif
+       gd->arch.omap_boot_params.omap_bootdevice = boot_device;
 
        gd->arch.omap_boot_params.ch_flags =
                                *((u8 *)(rom_params + CH_FLAGS_OFFSET));
index 8543f4399c856c9a345fd1d94076e3ff59888083..e756418a59d957a3aafdbbe11f3d9ad6e566ad55 100644 (file)
@@ -25,6 +25,7 @@
 #else
 #define BOOT_DEVICE_XIP        2
 #define BOOT_DEVICE_NAND       5
+#define BOOT_DEVICE_NAND_I2C   6
 #if defined(CONFIG_AM33XX)
 #define BOOT_DEVICE_MMC1       8
 #define BOOT_DEVICE_MMC2       9       /* eMMC or daughter card */