On Thu, Feb 19, 2026 at 10:52:20PM -0500, Sean Anderson wrote:
> On 2/19/26 22:12, Fabio Estevam wrote:
> > From: Fabio Estevam <[email protected]>
> > 
> > Add support for loading the next stage from an MTD device in SPL.
> > 
> > Introduce CONFIG_SPL_MTD_LOAD and a generic SPL MTD loader
> > implementation that uses the MTD subsystem to read the U-Boot payload.
> > 
> > The loader works with any MTD-backed storage, including raw NAND and
> > SPI NAND, without being tied to a specific NAND type.
> > 
> > The payload offset defaults to CONFIG_SYS_MTD_U_BOOT_OFFS and can be
> > overridden via the device tree property:
> > 
> >      u-boot,spl-payload-offset
> > 
> > To support both raw NAND and SPI NAND boot flows, the loader is
> > registered for BOOT_DEVICE_NAND and BOOT_DEVICE_SPI. This allows it
> > to operate correctly on platforms where the ROM reports either NAND
> > or SPI as the boot source while using the same MTD-based loading
> > infrastructure.
> > 
> > The required NAND core and SPI NAND drivers are built for SPL when
> > CONFIG_SPL_MTD_LOAD is enabled.
> > 
> > This provides reusable infrastructure for boards that boot from MTD
> > devices without relying on SPI-specific or NAND-specific SPL loaders.
> > 
> > Signed-off-by: Fabio Estevam <[email protected]>
[snip]
> > diff --git a/common/spl/Makefile b/common/spl/Makefile
> > index 4c9482bd3096..67fc1cd1b396 100644
> > --- a/common/spl/Makefile
> > +++ b/common/spl/Makefile
> > @@ -35,6 +35,7 @@ obj-$(CONFIG_$(PHASE_)NVME) += spl_nvme.o
> >   obj-$(CONFIG_$(PHASE_)SEMIHOSTING) += spl_semihosting.o
> >   obj-$(CONFIG_$(PHASE_)DFU) += spl_dfu.o
> >   obj-$(CONFIG_$(PHASE_)SPI_LOAD) += spl_spi.o
> > +obj-$(CONFIG_SPL_MTD_LOAD) += spl_mtd.o
> 
> Does this need a $(PHASE_)? (I don't know, but the others have it)

For consistency yes, even if we're unlikely to need this in TPL too.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to