summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-10-31 11:47:25 -0600
committerTom Rini <[email protected]>2024-10-31 13:34:29 -0600
commite61ea9f2e5d2967826c2c6e3edba961064fbbaa1 (patch)
treebe0a8f1d9580e17de1dbb559eb4bae77023f1b38 /drivers
parent1d147b74f437fb0e85821e8271fe52bc5fd30194 (diff)
mtd: spi-nor: Guard SPI_STACKED_PARALLEL with DM_SPI check
While we want to compile the SPI_STACKED_PARALLEL code everywhere we can, it must first be guarded with an #if for DM_SPI as not all cases where we have this code built, such as in SPL, will have the relevant DM_SPI option enabled. Fixes: 43423cdc5dc1 ("mtd: spi-nor: Always build SPI_STACKED_PARALLEL code") Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/spi/spi-nor-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index a3a62fff213..ec841fb13bd 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -3166,6 +3166,7 @@ static int spi_nor_init_params(struct spi_nor *nor,
spi_nor_post_sfdp_fixups(nor, params);
}
+#if CONFIG_IS_ENABLED(DM_SPI)
if (CONFIG_IS_ENABLED(SPI_STACKED_PARALLEL)) {
u64 flash_size[SNOR_FLASH_CNT_MAX] = { 0 };
struct udevice *dev = nor->spi->dev;
@@ -3227,6 +3228,7 @@ static int spi_nor_init_params(struct spi_nor *nor,
params->page_size <<= 1;
}
}
+#endif
spi_nor_late_init_fixups(nor, params);