From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Thu, 26 Apr 2018 10:20:32 +0200 Subject: [U-Boot] [RFC PATCH 1/2] arm64: zynqmp: Setup the first boot_target at run time In-Reply-To: References: <8fad3265d924092e94aae75d4141a61872a61685.1524659886.git.michal.simek@xilinx.com> <400a89bc-2a36-fcdb-d75a-604d237a8b43@xilinx.com> Message-ID: <82009620-d55a-3c1d-a18c-69a968740dcf@xilinx.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On 26.4.2018 09:08, Alexander Graf wrote: >=20 >=20 >> Am 26.04.2018 um 08:25 schrieb Michal Simek : >> >>> On 26.4.2018 08:14, Alexander Graf wrote: >>> >>> >>>> On 25.04.18 14:38, Michal Simek wrote: >>>> Detect mmc alias at run time for setting up proper boot_targets sequen= ce. >>>> 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 >>>> --- >>>> >>>> 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=3Dsetenv devnum 0; run mmc_boot >>>> bootcmd_mmc1=3Dsetenv 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. >>> >>> I don't understand this sentence. >> >> Imagine case that you have mmc1000 =3D &sdhci0; >> That 1000 is integer and u-boot is in hex that's why 1000 =3D 0x3e8. >> >> It means boot_targets will start with "mmc3e8 +static one" >> >> That's why >> bootcmd_mmc3e8=3Dsetenv devnum 3e8; run mmc_boot >> >> needs to be generated. But xilinx_zynqmp.h is only setting these lines >> for mmc0 and mmc1. >=20 > Ok, so what we really want is a distro.c file and corresponding boot_targ= et lines that generate boot target variables for every device enumerated in= the system on boot. >=20 > The reason we don=E2=80=98t have that yet I guess is because most targets= target one SoC/board that has a known set of devices. The more generic we = make things, the more we have to enumerate at runtime. >=20 yes, and do this only in case of when variables are not restored. It means only when default one are used. And it is really a question if make sense to change current distro default or just wait for EBBR. For zynqmp device itself using mmc0/mmc1 should be enough. Thanks, Michal