[PATCH] arm64: zynqmp: Fix emmc boot mode boot_target sequennce

Michal Simek monstr at monstr.eu
Mon Jan 6 07:58:29 CET 2020


Ășt 17. 12. 2019 v 14:47 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 mmc at 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 at xilinx.com>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
>  board/xilinx/zynqmp/zynqmp.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index aac2eb7bc1a2..b72eade43eea 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 at ff160000", &dev) &&
> +                   uclass_get_device_by_name(UCLASS_MMC,
> +                                             "sdhci at 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");
> --
> 2.24.0
>

Applied but with fixed subject.

Thanks,
Michal

-- 
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