]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
am33xx: Fix fetching of mmc1 bootmode from bootrom for AM33XX
authorJoel A Fernandes <joelagnel@ti.com>
Tue, 18 Sep 2012 04:30:51 +0000 (04:30 +0000)
committerTom Rini <trini@ti.com>
Mon, 1 Oct 2012 17:02:15 +0000 (10:02 -0700)
U-boot should not ignore getting the bootmode passed on from the bootrom.
With this, U-boot SPL knows it was loaded from MMC1 and use this info to
read full U-boot from MMC1 as well.

Cc: pprakash@ti.com
Cc: trini@ti.com
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
arch/arm/cpu/armv7/omap-common/lowlevel_init.S
arch/arm/include/asm/arch-am33xx/spl.h

index 9766563d02d66565e552660ff697fb8e7101cf11..358107776d54337a898f383eb5c68d00acf9f992 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include <asm/arch/omap.h>
+#include <asm/arch/spl.h>
 #include <linux/linkage.h>
 
 ENTRY(save_boot_params)
@@ -59,9 +60,9 @@ ENTRY(save_boot_params)
        strb    r2, [r3, #BOOT_DEVICE_OFFSET]   @ spl_boot_device <- r1
 
        /* boot mode is passed only for devices that can raw/fat mode */
-       cmp     r2, #2
+       cmp     r2, #BOOT_DEVICE_XIP
        blt     2f
-       cmp     r2, #7
+       cmp     r2, #BOOT_DEVICE_MMC2
        bgt     2f
        /* Store the boot mode (raw/FAT) in omap_bootmode */
        ldr     r2, [r0, #DEV_DESC_PTR_OFFSET]  @ get the device descriptor ptr
index dc838823d3269cdee8800f28b9752ca6f2b65771..63ed10b257a01cacccc85858ffa6e09e116f80d1 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef        _ASM_ARCH_SPL_H_
 #define        _ASM_SPL_H_
 
+#define BOOT_DEVICE_XIP        2
 #define BOOT_DEVICE_NAND       5
 #define BOOT_DEVICE_MMC1       8
 #define BOOT_DEVICE_MMC2       9       /* eMMC or daughter card */