diff mbox series

[1/3] include: env: ti: mmc: Change name_fdt usage to fdtfile

Message ID 20240628-b4-upstream-streamline-platform-v1-1-17659af992c1@ti.com
State Superseded
Delegated to: Tom Rini
Headers show
Series Fix findfdt for j722s and am62p | expand

Commit Message

Manorit Chawdhry June 28, 2024, 8:23 a.m. UTC
name_fdt is kept for backward compatibility but it depends on EEPROM
detection logic and some of the platforms like J7AHP/AM69 don't have
that anymore which causes boot failure.

Replacing name_fdt usage to fdtfile as fdtfile is populated based on
CONFIG_DEFAULT_DEVICE_TREE.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
---
 include/env/ti/mmc.env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nishanth Menon June 28, 2024, 1:05 p.m. UTC | #1
On 13:53-20240628, Manorit Chawdhry wrote:
> name_fdt is kept for backward compatibility but it depends on EEPROM
> detection logic and some of the platforms like J7AHP/AM69 don't have
> that anymore which causes boot failure.
> 
> Replacing name_fdt usage to fdtfile as fdtfile is populated based on
> CONFIG_DEFAULT_DEVICE_TREE.
> 
> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
> ---
>  include/env/ti/mmc.env | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env
> index 0256a2d2aaca..037a09010ce4 100644
> --- a/include/env/ti/mmc.env
> +++ b/include/env/ti/mmc.env
> @@ -16,7 +16,7 @@ importbootenv=echo Importing environment from mmc${mmcdev} ...;
>  loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
>  loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
>  loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
> -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt}
> +get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}

Did you check the other users of mmc.env file? How about legacy boards like k2g?

>  envboot=if mmc dev ${mmcdev}; then
>  	if mmc rescan; then
>  		echo SD/MMC found on device ${mmcdev};
> 
> -- 
> 2.45.1
>
Manorit Chawdhry July 1, 2024, 5:04 a.m. UTC | #2
Hi Nishanth,

On 08:05-20240628, Nishanth Menon wrote:
> On 13:53-20240628, Manorit Chawdhry wrote:
> > name_fdt is kept for backward compatibility but it depends on EEPROM
> > detection logic and some of the platforms like J7AHP/AM69 don't have
> > that anymore which causes boot failure.
> > 
> > Replacing name_fdt usage to fdtfile as fdtfile is populated based on
> > CONFIG_DEFAULT_DEVICE_TREE.
> > 
> > Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
> > ---
> >  include/env/ti/mmc.env | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env
> > index 0256a2d2aaca..037a09010ce4 100644
> > --- a/include/env/ti/mmc.env
> > +++ b/include/env/ti/mmc.env
> > @@ -16,7 +16,7 @@ importbootenv=echo Importing environment from mmc${mmcdev} ...;
> >  loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
> >  loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
> >  loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
> > -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt}
> > +get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
> 
> Did you check the other users of mmc.env file? How about legacy boards like k2g?

Am not sure about the status of migration to ti_set_fdt_env for k2g
platforms. Though I see k2g redefining get_fdt_mmc with name_fdt itself
so hoping that this change wouldn't affect them. If they also migrate to
ti_set_fdt_env then I think for them also this change would work and the
override can be deleted later.

Regards,
Manorit

> 
> >  envboot=if mmc dev ${mmcdev}; then
> >  	if mmc rescan; then
> >  		echo SD/MMC found on device ${mmcdev};
> > 
> > -- 
> > 2.45.1
> > 
> 
> -- 
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
diff mbox series

Patch

diff --git a/include/env/ti/mmc.env b/include/env/ti/mmc.env
index 0256a2d2aaca..037a09010ce4 100644
--- a/include/env/ti/mmc.env
+++ b/include/env/ti/mmc.env
@@ -16,7 +16,7 @@  importbootenv=echo Importing environment from mmc${mmcdev} ...;
 loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
 loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
 loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
-get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt}
+get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
 envboot=if mmc dev ${mmcdev}; then
 	if mmc rescan; then
 		echo SD/MMC found on device ${mmcdev};