[PATCH] arm64: versal: Fix emmc boot mode boot_target issue
Michal Simek
monstr at monstr.eu
Thu Jan 16 08:31:44 CET 2020
Ășt 17. 12. 2019 v 11:16 odesĂlatel Michal Simek
<michal.simek at xilinx.com> napsal:
>
> From: T Karthik Reddy <t.karthik.reddy at xilinx.com>
>
> Emmc boot devcie is mounted to sdhci at 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 at 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 at xilinx.com>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
> board/xilinx/versal/board.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
> index 23bb6b962387..45724478a25e 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 at 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");
> --
> 2.24.0
>
Applied.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
More information about the U-Boot
mailing list