Skip to content
Commit b7f06056 authored by Marek Behún's avatar Marek Behún Committed by Jagan Teki
Browse files

mtd: spi-nor: allow registering multiple MTDs when DM is enabled



Currently when the SPI_FLASH_MTD config option is enabled, only one SPI
can be registered as MTD at any time - it is the last one probed (since
with old non-DM model only one SPI NOR could be probed at any time).

When DM is enabled, allow for registering multiple SPI NORs as MTDs by
utilizing the nor->mtd structure, which is filled in by spi_nor_scan
anyway, instead of filling a separate struct mtd_info.

Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
Reviewed-by: default avatarPali Rohár <pali@kernel.org>
Reviewed-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Tested-by: default avatarPatrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: default avatarJagan Teki <jagan@amarulasolutions.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
parent dc339bf7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment