summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-13 21:22:01 (GMT)
committerSimon Glass <sjg@chromium.org>2016-11-26 00:59:30 (GMT)
commit71634f289de5850503738635cc96753c9b2c5d09 (patch)
tree2d64e3193229aa0e69202dd593c655cf0340789a /drivers/mtd/spi
parentd844efec472d7ea16b229d1c2c854bed70082278 (diff)
downloadu-boot-fsl-qoriq-71634f289de5850503738635cc96753c9b2c5d09.tar.xz
spi: Add of-platdata support to SPI and SPI flash
Some boards may want to use these subsystems with of-platdata in SPL. Add support for this by avoiding any device tree access in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mtd/spi')
-rw-r--r--drivers/mtd/spi/spi_flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 2576c2c..94c0b00 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -1138,7 +1138,7 @@ int spi_flash_scan(struct spi_flash *flash)
return ret;
#endif
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
ret = spi_flash_decode_fdt(gd->fdt_blob, flash);
if (ret) {
debug("SF: FDT decode error\n");