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 <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
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;
params->page_size <<= 1;
}
}
+#endif
spi_nor_late_init_fixups(nor, params);