> -----Original Message-----
> From: Michael Nazzareno Trimarchi <[email protected]>
> Sent: Friday, 28 February 2025 3:00 pm
> To: Maniyam, Dinesh <[email protected]>
> Cc: [email protected]; Marek <[email protected]>; Simon
> <[email protected]>; Tom Rini <[email protected]>; Dario
> Binacchi <[email protected]>; Johan Jonker
> <[email protected]>; Michal Simek <[email protected]>; Arseniy
> Krasnov <[email protected]>; Alexander Dahl <[email protected]>;
> William Zhang <[email protected]>; Igor Prusov
> <[email protected]>; Meng, Tingting <[email protected]>;
> Chee, Tien Fong <[email protected]>; Hea, Kok Kiang
> <[email protected]>; Ng, Boon Khai <[email protected]>; Yuslaimi,
> Alif Zakuan <[email protected]>; Zamri, Muhammad Hazim Izzat
> <[email protected]>; Lim, Jit Loon
> <[email protected]>; Tang, Sieu Mun <[email protected]>
> Subject: Re: [resend v3 17/19] drivers: mtd: nand: Enabled Kconfig and 
> Makefile
> for SPL_NAND_FRAMEWORK
> 
> Hi
> 
> On Fri, Feb 28, 2025 at 5:02 AM Maniyam, Dinesh <[email protected]>
> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Michael Nazzareno Trimarchi <[email protected]>
> > > Sent: Friday, 28 February 2025 5:30 am
> > > To: Maniyam, Dinesh <[email protected]>
> > > Cc: [email protected]; Marek <[email protected]>; Simon
> > > <[email protected]>; Tom Rini <[email protected]>;
> > > Dario Binacchi <[email protected]>; Johan Jonker
> > > <[email protected]>; Michal Simek <[email protected]>; Arseniy
> > > Krasnov <[email protected]>; Alexander Dahl
> > > <[email protected]>; William Zhang <[email protected]>; Igor
> > > Prusov <[email protected]>; Meng, Tingting
> > > <[email protected]>; Chee, Tien Fong
> > > <[email protected]>; Hea, Kok Kiang
> > > <[email protected]>; Ng, Boon Khai <[email protected]>;
> > > Yuslaimi, Alif Zakuan <[email protected]>; Zamri,
> > > Muhammad Hazim Izzat <[email protected]>; Lim,
> > > Jit Loon <[email protected]>; Tang, Sieu Mun
> > > <[email protected]>
> > > Subject: Re: [resend v3 17/19] drivers: mtd: nand: Enabled Kconfig
> > > and Makefile for SPL_NAND_FRAMEWORK
> > >
> > > Hi
> > >
> > > On Wed, Feb 26, 2025 at 5:20 PM <[email protected]> wrote:
> > > >
> > > > From: Dinesh Maniyam <[email protected]>
> > > >
> > > > Enable the Kconfig and Makefile for the SPL_NAND_FRAMEWORK support
> > > > in
> > > > agilex5 family device. This will include all the basic files
> > > > needed to use the existing nand spl support.
> > > >
> > > > Signed-off-by: Dinesh Maniyam <[email protected]>
> > > > ---
> > > >  drivers/mtd/nand/raw/Kconfig  |  7 +++++++
> > > > drivers/mtd/nand/raw/Makefile | 10 ++++++++++
> > > >  2 files changed, 17 insertions(+)
> > > >
> > > > diff --git a/drivers/mtd/nand/raw/Kconfig
> > > > b/drivers/mtd/nand/raw/Kconfig index a9515c7b74..d6ac730224 100644
> > > > --- a/drivers/mtd/nand/raw/Kconfig
> > > > +++ b/drivers/mtd/nand/raw/Kconfig
> > > > @@ -837,4 +837,11 @@ config SYS_NAND_HW_ECC_OOBFIRST
> > > >
> > > >  endif  # if SPL
> > > >
> > > > +config SPL_NAND_FRAMEWORK
> > > > +       bool "Compile the entire NAND framework into the SPL"
> > > > +       help
> > > > +         Some drivers require a lot of functionality from the NAND 
> > > > framework
> > > > +         core when used in SPL. This option allows compiling the full 
> > > > NAND
> > > > +         framework into the SPL instead of it's reduced version.
> > > > +
> > >
> > > This seems not relevant for this series and even I don't like the
> > > idea to have it
> > >
> > > Michael
> > >
> >
> > I agree. I can drop this commit.
> > We already have configs to enable the necessary files to be part SPL nand 
> > build.
> > However, dropping this commit will cause a compilation failure, To
> > overcome this, shall modify the socfpga_agilex5_nand2_defconfig and
> > mtd/nand/raw/Kconfig files to include the relevant files to be part of
> > the SPL nand build.
> > Would you like me to resubmit patch 13 & patch 16?
> >
> 
> But the order is totally wrong, I mean the patch that include this defconfig 
> come
> before the add on new symbol.  So the commit
> eb19dec2d55b57ab99cd75b15b04f69ee457ffc9
> can not build
> 
> I mean we should have a bit of bisect ability here.
> 
> You should able to build with this
> 
> iff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index
> 01d181bf476..7ab840a9e53 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -195,6 +195,11 @@ config NAND_CADENCE
>         depends on OF_CONTROL && DM_MTD
>         select SYS_NAND_SELF_INIT
>         select SPL_SYS_NAND_SELF_INIT
> +       select SPL_NAND_BASE
> +       select SPL_NAND_DRIVERS
> +       select SPL_NAND_IDENT
> +       select SPL_NAND_INIT
> +       select SPL_NAND_ECC
>         imply CMD_NAND
>         help
>           Enable the driver for NAND flash on platforms using a Cadence NAND 
> diff --
> git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile index
> 936b54e3ff3..34cba77046a 100644
> --- a/drivers/mtd/nand/raw/Makefile
> +++ b/drivers/mtd/nand/raw/Makefile
> @@ -3,18 +3,8 @@
>  # (C) Copyright 2006
>  # Wolfgang Denk, DENX Software Engineering, [email protected].
> 
> -nand-framework-objs := nand.o nand_bbt.o nand_ids.o nand_util.o \
> -                      nand_ecc.o nand_base.o nand_timings.o nand_amd.o \
> -                      nand_hynix.o nand_macronix.o nand_micron.o \
> -                      nand_samsung.o nand_toshiba.o
> -
>  ifdef CONFIG_XPL_BUILD
> 
> -ifdef CONFIG_SPL_NAND_FRAMEWORK
> -obj-y += $(nand-framework-objs)
> -NORMAL_DRIVERS=y
> -endif
> -
>  ifdef CONFIG_SPL_NAND_DRIVERS
>  NORMAL_DRIVERS=y
>  endif
> 
> Michael

Yes, defconfig should come after adding the symbol.
Will take note of this.
I can build with your suggestion. Will add a new patch
to include your suggestion.

Dinesh
> >
> > > >  endif  # if MTD_RAW_NAND
> > > > diff --git a/drivers/mtd/nand/raw/Makefile
> > > > b/drivers/mtd/nand/raw/Makefile index 58fde3272f..0a32e184dc
> > > > 100644
> > > > --- a/drivers/mtd/nand/raw/Makefile
> > > > +++ b/drivers/mtd/nand/raw/Makefile
> > > > @@ -3,8 +3,18 @@
> > > >  # (C) Copyright 2006
> > > >  # Wolfgang Denk, DENX Software Engineering, [email protected].
> > > >
> > > > +nand-framework-objs := nand.o nand_bbt.o nand_ids.o nand_util.o \
> > > > +                      nand_ecc.o nand_base.o nand_timings.o nand_amd.o 
> > > > \
> > > > +                      nand_hynix.o nand_macronix.o nand_micron.o \
> > > > +                      nand_samsung.o nand_toshiba.o
> > > > +
> > > >  ifdef CONFIG_SPL_BUILD
> > > >
> > > > +ifdef CONFIG_SPL_NAND_FRAMEWORK
> > > > +obj-y += $(nand-framework-objs)
> > > > +NORMAL_DRIVERS=y
> > > > +endif
> > > > +
> > > >  ifdef CONFIG_SPL_NAND_DRIVERS
> > > >  NORMAL_DRIVERS=y
> > > >  endif
> > > > --
> > > > 2.19.0
> > > >
> > >
> > >
> > > --
> > > Michael Nazzareno Trimarchi
> > > Co-Founder & Chief Executive Officer M. +39 347 913 2170
> > > [email protected] __________________________________
> > >
> > > Amarula Solutions BV
> > > Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172
> > > [email protected] www.amarulasolutions.com
> 
> 
> 
> --
> Michael Nazzareno Trimarchi
> Co-Founder & Chief Executive Officer
> M. +39 347 913 2170
> [email protected]
> __________________________________
> 
> Amarula Solutions BV
> Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172
> [email protected] www.amarulasolutions.com

Reply via email to