diff options
author | T Karthik Reddy <t.karthik.reddy@xilinx.com> | 2019-12-17 06:41:42 -0700 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-01-14 09:05:52 +0100 |
commit | 18be60b8bce2ce4ab38da6f1be9aa8f22557129e (patch) | |
tree | ed70c5196119944925277bee45e2a93e2bce2c94 /board/xilinx | |
parent | 7c5b7bb1d7205f6c48419cd72c070386a19ca745 (diff) | |
download | u-boot-18be60b8bce2ce4ab38da6f1be9aa8f22557129e.tar.gz |
arm64: zynqmp: Fix emmc boot mode boot_target sequence
Emmc boot devcie is mounted to mmc@ff160000 controller on zynqmp.
Detect mmc alias at run time for setting up proper boot_targets
sequence instead of setting boot_targets manually.
Removed setting "modeboot" variable as it not longer need as we
switched to distro boot.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx')
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index aac2eb7bc1..b72eade43e 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -580,8 +580,17 @@ int board_late_init(void) break; case EMMC_MODE: puts("EMMC_MODE\n"); - mode = "mmc0"; - env_set("modeboot", "emmcboot"); + if (uclass_get_device_by_name(UCLASS_MMC, + "mmc@ff160000", &dev) && + uclass_get_device_by_name(UCLASS_MMC, + "sdhci@ff160000", &dev)) { + puts("Boot from EMMC but without SD0 enabled!\n"); + return -1; + } + debug("mmc0 device found at %p, seq %d\n", dev, dev->seq); + + mode = "mmc"; + bootseq = dev->seq; break; case SD_MODE: puts("SD_MODE\n"); |