public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Sean Anderson <seanga2@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>,
	michael@amarulasolutions.com, u-boot@lists.denx.de,
	dinesh.maniyam@altera.com, a-dutta@ti.com, a-nandan@ti.com,
	jonas@kwiboo.se, Fabio Estevam <festevam@nabladev.com>
Subject: Re: [PATCH v2] spl: Add generic SPL MTD loader support
Date: Fri, 20 Feb 2026 08:35:16 -0600	[thread overview]
Message-ID: <20260220143516.GQ3233182@bill-the-cat> (raw)
In-Reply-To: <fecf9c20-f5a5-d9f6-ddc0-dc8db483922d@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]

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 <festevam@nabladev.com>
> > 
> > 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 <festevam@nabladev.com>
[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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-02-20 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-20  3:12 [PATCH v2] spl: Add generic SPL MTD loader support Fabio Estevam
2026-02-20  3:52 ` Sean Anderson
2026-02-20 14:35   ` Tom Rini [this message]
2026-02-25 19:45   ` Sean Anderson
2026-02-26  0:08     ` Fabio Estevam
2026-02-26  5:10       ` Sean Anderson
2026-02-26  5:34         ` Maniyam, Dinesh
2026-02-26 12:04           ` Fabio Estevam
2026-02-20  7:20 ` Santhosh Kumar K
2026-02-25 15:46 ` Quentin Schulz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260220143516.GQ3233182@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=a-dutta@ti.com \
    --cc=a-nandan@ti.com \
    --cc=dinesh.maniyam@altera.com \
    --cc=festevam@gmail.com \
    --cc=festevam@nabladev.com \
    --cc=jonas@kwiboo.se \
    --cc=michael@amarulasolutions.com \
    --cc=seanga2@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox