From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Fri, 18 May 2018 11:18:09 +0200 Subject: [U-Boot] [PATCH v1] arm64: zynqmp: Setup the first boot_target at run time In-Reply-To: <2bc9e383d9dc713bb3e277dd113dde8de5ad8484.1526633002.git.michal.simek@xilinx.com> References: <2bc9e383d9dc713bb3e277dd113dde8de5ad8484.1526633002.git.michal.simek@xilinx.com> Message-ID: <25e49fd2-e792-4629-4af8-a1fc73287fe7@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/18/2018 10:43 AM, Michal Simek wrote: > Detect mmc alias at run time for setting up proper boot_targets sequence. > The first target has to correspond with boot mode. > > The purpose of this patch is to get rid of CONFIG_ZYNQ_SDHCI0/1 > parameters in full U-Boot. > Unfortunately this patch can't remove it because there is missing > mmc implementation for SPL_DM_SEQ_ALIAS. > > Also xilinx_zynqmp.h only setup boot commands for mmc0 and mmc1. > It means using aliases with higher number won't work. But switching > between mmc0 and mmc1 should work properly. > > Signed-off-by: Michal Simek > --- > > Changes in v1: > - No change from RFC. Current setup has all mmc boot commands > that's why it shouldn't be an issue to add this to the tree. > > Not sure how exactly to tune BOOT_TARGET_DEVICES_MMC to have functions > for different aliases ID. I can simply setup devnum based on dev->seq > and also generate the whole bootcmd_mmc0 > > bootcmd_mmc0=setenv devnum 0; run mmc_boot > bootcmd_mmc1=setenv devnum 1; run mmc_boot > > The second patch is doing that. > But still if you setup alias to higher number mmc core is not mmc dev > command is not able to work with it. That's a bigger discussion really: How to have distro boot deal with devices we don't predict during compile time yet? I think independent of that this patch is definitely already an improvement: Reviewed-by: Alexander Graf Alex