]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM64: zynqmp: Fix bootmode SD_MODE1
authorMichal Simek <michal.simek@xilinx.com>
Fri, 6 Nov 2015 09:22:37 +0000 (10:22 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 27 Jan 2016 14:55:57 +0000 (15:55 +0100)
When only sdhci1 IP is enabled and SD_MODE1 bootmode is selected
U-Boot using sdboot1 variable which refers to mmc dev 1.
But this device doesn't exist because only one controller is available.

This patch fix logic around sdboot mode with using sdbootdev internal
variable.

Reported-by: Chris Kohn <ckohn@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynqmp/zynqmp.c
include/configs/xilinx_zynqmp.h

index a1d3fef24e8e9bbf569c4b08783811439a3c03e0..ac23625325902f94141f796d2cbcabc91ebdf667 100644 (file)
@@ -103,7 +103,10 @@ int board_late_init(void)
                break;
        case SD_MODE1:
                puts("SD_MODE1\n");
-               setenv("modeboot", "sdboot1");
+#if defined(CONFIG_ZYNQ_SDHCI0) && defined(CONFIG_ZYNQ_SDHCI1)
+               setenv("sdbootdev", "1");
+#endif
+               setenv("modeboot", "sdboot");
                break;
        case NAND_MODE:
                puts("NAND_MODE\n");
index 03f74508efeaf6539a7eb7e7dbe72a6c9d022a70..2d9f020f50d7a04f757c15e7df98ea432abfb520 100644 (file)
        "kernel_addr=0x80000\0" \
        "fdt_addr=0x7000000\0" \
        "fdt_high=0x10000000\0" \
-       "sdboot=mmcinfo && load mmc 0:0 $fdt_addr system.dtb && " \
-               "load mmc 0:0 $kernel_addr Image && booti $kernel_addr - $fdt_addr\0" \
+       "sdbootdev=0\0"\
+       "sdboot=mmc dev $sdbootdev && mmcinfo && load mmc $sdbootdev:$partid $fdt_addr system.dtb && " \
+               "load mmc $sdbootdev:$partid $kernel_addr Image && " \
+               "booti $kernel_addr - $fdt_addr\0" \
        DFU_ALT_INFO
 
 #define CONFIG_BOOTARGS                "setenv bootargs console=ttyPS0,${baudrate} " \