From: Michal Simek Date: Fri, 6 Nov 2015 09:22:37 +0000 (+0100) Subject: ARM64: zynqmp: Fix bootmode SD_MODE1 X-Git-Tag: v2016.03-rc1~46^2~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2d9925bce3060c91f2495e741a1220eb827338c0;p=u-boot ARM64: zynqmp: Fix bootmode SD_MODE1 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 Acked-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index a1d3fef24e..ac23625325 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -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"); diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 03f74508ef..2d9f020f50 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -156,8 +156,10 @@ "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} " \