diff options
author | Michal Simek <michal.simek@xilinx.com> | 2015-11-06 12:22:37 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-01-27 17:55:57 +0300 |
commit | 2d9925bce3060c91f2495e741a1220eb827338c0 (patch) | |
tree | a7d8d61ce32fa92539c59ae0023995b742e4e174 | |
parent | 78678feeacc32f4fca9cb9a4aa9168396d8101c6 (diff) | |
download | u-boot-2d9925bce3060c91f2495e741a1220eb827338c0.tar.xz |
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 <ckohn@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 5 | ||||
-rw-r--r-- | include/configs/xilinx_zynqmp.h | 6 |
2 files changed, 8 insertions, 3 deletions
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} " \ |