On Wed, Jan 24, 2024 at 11:27:12AM +0300, Dan Carpenter wrote:
> On Wed, Jan 24, 2024 at 12:19:29PM +0530, MD Danish Anwar wrote:
> > When CONFIG_TI_ICSSG_PRUETH is enabled, add config name check for the
> > icssg2 overlay in board_fit_config_match() API.
> > 
> > Signed-off-by: MD Danish Anwar <danishan...@ti.com>
> > ---
> >  board/ti/am65x/evm.c | 11 +++++++----
> >  1 file changed, 7 insertions(+), 4 deletions(-)
> > 
> > diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
> > index df209021c1..0b661f0084 100644
> > --- a/board/ti/am65x/evm.c
> > +++ b/board/ti/am65x/evm.c
> > @@ -90,10 +90,13 @@ int dram_init_banksize(void)
> >  #ifdef CONFIG_SPL_LOAD_FIT
> >  int board_fit_config_name_match(const char *name)
> >  {
> > -#ifdef CONFIG_TARGET_AM654_A53_EVM
> > -   if (!strcmp(name, "k3-am654-base-board"))
> > -           return 0;
> > -#endif
> > +   if (IS_ENABLED(CONFIG_TI_ICSSG_PRUETH)) {
> > +           if (!strcmp(name, "k3-am654-icssg2"))
> > +                   return 0;
> > +   } else {
> > +           if (!strcmp(name, "k3-am654-base-board"))
> > +                   return 0;
> > +   }
> >  
> >     return -1;
> >  }
> 
> It probably should support both configs being enabled.
> 
>       if (IS_ENABLED(CONFIG_TI_ICSSG_PRUETH) &&
>           strcmp(name, "k3-am654-icssg2") == 0)
>               return 0;
> 
>       if (IS_ENABLED(TARGET_AM654_A53_EVM) &&
>           strcmp(name, "k3-am654-base-board"))

I reversed this strcmp()...

        strcmp(name, "k3-am654-base-board") == 0)

regards,
dan carpenter

Reply via email to