summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/spi/Makefile')
-rw-r--r--drivers/mtd/spi/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index a10c8506af..2605e57e07 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -14,7 +14,10 @@ COBJS-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o
COBJS-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o
endif
-COBJS-$(CONFIG_SPI_FLASH) += spi_flash_probe_legacy.o spi_flash_ops.o spi_flash.o
+ifdef CONFIG_CMD_SF
+COBJS-y += spi_flash.o
+endif
+COBJS-$(CONFIG_SPI_FLASH) += spi_flash_probe.o spi_flash_ops.o
COBJS-$(CONFIG_SPI_FLASH_ATMEL) += atmel.o
COBJS-$(CONFIG_SPI_FLASH_EON) += eon.o
COBJS-$(CONFIG_SPI_FLASH_GIGADEVICE) += gigadevice.o