> -----Original Message----- > From: Michael Nazzareno Trimarchi <mich...@amarulasolutions.com> > Sent: Friday, 28 February 2025 3:00 pm > To: Maniyam, Dinesh <dinesh.mani...@intel.com> > Cc: u-boot@lists.denx.de; Marek <ma...@denx.de>; Simon > <simon.k.r.goldschm...@gmail.com>; Tom Rini <tr...@konsulko.com>; Dario > Binacchi <dario.binac...@amarulasolutions.com>; Johan Jonker > <jbx6...@gmail.com>; Michal Simek <michal.si...@amd.com>; Arseniy > Krasnov <avkras...@salutedevices.com>; Alexander Dahl <a...@thorsis.com>; > William Zhang <william.zh...@broadcom.com>; Igor Prusov > <ivpru...@salutedevices.com>; Meng, Tingting <tingting.m...@intel.com>; > Chee, Tien Fong <tien.fong.c...@intel.com>; Hea, Kok Kiang > <kok.kiang....@intel.com>; Ng, Boon Khai <boon.khai...@intel.com>; Yuslaimi, > Alif Zakuan <alif.zakuan.yusla...@intel.com>; Zamri, Muhammad Hazim Izzat > <muhammad.hazim.izzat.za...@intel.com>; Lim, Jit Loon > <jit.loon....@intel.com>; Tang, Sieu Mun <sieu.mun.t...@intel.com> > 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 <dinesh.mani...@intel.com> > wrote: > > > > > > > > > -----Original Message----- > > > From: Michael Nazzareno Trimarchi <mich...@amarulasolutions.com> > > > Sent: Friday, 28 February 2025 5:30 am > > > To: Maniyam, Dinesh <dinesh.mani...@intel.com> > > > Cc: u-boot@lists.denx.de; Marek <ma...@denx.de>; Simon > > > <simon.k.r.goldschm...@gmail.com>; Tom Rini <tr...@konsulko.com>; > > > Dario Binacchi <dario.binac...@amarulasolutions.com>; Johan Jonker > > > <jbx6...@gmail.com>; Michal Simek <michal.si...@amd.com>; Arseniy > > > Krasnov <avkras...@salutedevices.com>; Alexander Dahl > > > <a...@thorsis.com>; William Zhang <william.zh...@broadcom.com>; Igor > > > Prusov <ivpru...@salutedevices.com>; Meng, Tingting > > > <tingting.m...@intel.com>; Chee, Tien Fong > > > <tien.fong.c...@intel.com>; Hea, Kok Kiang > > > <kok.kiang....@intel.com>; Ng, Boon Khai <boon.khai...@intel.com>; > > > Yuslaimi, Alif Zakuan <alif.zakuan.yusla...@intel.com>; Zamri, > > > Muhammad Hazim Izzat <muhammad.hazim.izzat.za...@intel.com>; Lim, > > > Jit Loon <jit.loon....@intel.com>; Tang, Sieu Mun > > > <sieu.mun.t...@intel.com> > > > 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 <dinesh.mani...@intel.com> wrote: > > > > > > > > From: Dinesh Maniyam <dinesh.mani...@intel.com> > > > > > > > > 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 <dinesh.mani...@intel.com> > > > > --- > > > > 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, w...@denx.de. > > -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, w...@denx.de. > > > > > > > > +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 > > > mich...@amarulasolutions.com __________________________________ > > > > > > Amarula Solutions BV > > > Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 > > > i...@amarulasolutions.com www.amarulasolutions.com > > > > -- > Michael Nazzareno Trimarchi > Co-Founder & Chief Executive Officer > M. +39 347 913 2170 > mich...@amarulasolutions.com > __________________________________ > > Amarula Solutions BV > Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 > i...@amarulasolutions.com www.amarulasolutions.com