]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/arm/mach-sunxi/board.c
sunxi: Support booting from SPI flash
[karo-tx-uboot.git] / arch / arm / mach-sunxi / board.c
index 66e028ec1467d657a1c408f6bd80b9b8dd50cc45..3f5116bcb689cc635e9f5a030babe732a1740676 100644 (file)
@@ -223,6 +223,11 @@ u32 spl_boot_device(void)
        if (!is_boot0_magic(SPL_ADDR + 4)) /* eGON.BT0 */
                return BOOT_DEVICE_BOARD;
 
+#ifdef CONFIG_SPL_SPI_SUNXI
+       if (readb(SPL_ADDR + 0x28) == SUNXI_BOOTED_FROM_SPI)
+               return BOOT_DEVICE_SPI;
+#endif
+
        /* The BROM will try to boot from mmc0 first, so try that first. */
 #ifdef CONFIG_MMC
        mmc_initialize(gd->bd);