[PATCH v1 1/2] mtd: Add flash_node in struct mtd_info

Tom Rini trini at konsulko.com
Mon Apr 11 22:14:55 CEST 2022


On Mon, Mar 21, 2022 at 09:13:36AM +0100, Patrice Chotard wrote:

> Currently, add_mtd_partitions_of() can be used only if dev field of
> mtd_info struct is populated. It's the case, for example, for a spi nor
> flash, which has a DT compatible "jedec,spi-nor" and an associated
> device. mtd->dev is populated in spi_nor_scan().
> 
> But in case of a raw nand node, mtd_info's dev field can't be populated
> as flash node has no compatible, so no associated device.
> add_mtd_partitions_of() can't be used to parse "partitions" subnode.
> 
> To remove this constraint, add an ofnode field in mtd_info struct
> which reference the DT flash node. This new field is populated by
> nand_scan_tail(). This new field will be used by add_mtd_partitions_of()
> to parse the flash node for "partitions" defined in DT.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
> Cc: Farhan Ali <farhan.ali at broadcom.com>
> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Cc: Jagan Teki <jagan at amarulasolutions.com>
> Cc: Marek Behun <marek.behun at nic.cz>
> Cc: Miquel Raynal <miquel.raynal at bootlin.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Wolfgang Denk <wd at denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220411/eb15fa93/attachment.sig>


More information about the U-Boot mailing list