summaryrefslogtreecommitdiff
path: root/board/xilinx
diff options
context:
space:
mode:
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>2019-12-16 04:44:26 -0700
committerMichal Simek <michal.simek@xilinx.com>2020-01-14 09:05:52 +0100
commit7c5b7bb1d7205f6c48419cd72c070386a19ca745 (patch)
treefb6178aaa770b16a867e1de4f16aea61840ef15a /board/xilinx
parent3dd0f8cccd6dae9740df1755ab261e72355a892d (diff)
downloadu-boot-7c5b7bb1d7205f6c48419cd72c070386a19ca745.tar.gz
arm64: versal: Fix emmc boot mode boot_target issue
Emmc boot devcie is mounted to sdhci@f1050000 controller on versal, while in emmc boot mode, boot tragets are set to mmc0. So removed mmc0 and using the dev seq number from the sdhci@f1050000 controller. Dev seq number is setup based on DT aliases that's why needs to be setup at run time. 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/versal/board.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 23bb6b9623..45724478a2 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -130,7 +130,14 @@ int board_late_init(void)
break;
case EMMC_MODE:
puts("EMMC_MODE\n");
- mode = "mmc0";
+ if (uclass_get_device_by_name(UCLASS_MMC,
+ "sdhci@f1050000", &dev)) {
+ puts("Boot from EMMC but without SD1 enabled!\n");
+ return -1;
+ }
+ debug("mmc1 device found at %p, seq %d\n", dev, dev->seq);
+ mode = "mmc";
+ bootseq = dev->seq;
break;
case SD_MODE:
puts("SD_MODE\n");