spi: Add of-platdata support to SPI and SPI flash
[platform/kernel/u-boot.git] / drivers / mtd / spi / spi_flash.c
index 2576c2c..94c0b00 100644 (file)
@@ -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");