summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-13 23:42:06 -0600
committerSimon Glass <sjg@chromium.org>2014-10-22 10:36:50 -0600
commit4c2dbefde58917205af51a2c20b3069e01e55cf4 (patch)
treee144692e3657ecd26f77c19dab4f90312b75d3e1 /drivers/mtd/spi/Makefile
parentae242cbfd0fc2b9e791688b3d9d6a19900ff3d31 (diff)
downloadu-boot-imx-4c2dbefde58917205af51a2c20b3069e01e55cf4.zip
u-boot-imx-4c2dbefde58917205af51a2c20b3069e01e55cf4.tar.gz
u-boot-imx-4c2dbefde58917205af51a2c20b3069e01e55cf4.tar.bz2
dm: sf: Add a uclass for SPI flash
Add a driver model uclass for SPI flash which supports the common operations (read, write, erase). Since we must keep support for the non-dm interface, some modification of the spi_flash header is required. CONFIG_DM_SPI_FLASH is used to enable driver model for SPI flash. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Diffstat (limited to 'drivers/mtd/spi/Makefile')
-rw-r--r--drivers/mtd/spi/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index 9e18fb4..15789a0 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -5,13 +5,18 @@
# SPDX-License-Identifier: GPL-2.0+
#
+obj-$(CONFIG_DM_SPI_FLASH) += sf-uclass.o
+
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_SPL_SPI_LOAD) += spi_spl_load.o
obj-$(CONFIG_SPL_SPI_BOOT) += fsl_espi_spl.o
endif
+#ifndef CONFIG_DM_SPI
+obj-$(CONFIG_SPI_FLASH) += sf_probe.o
+#endif
obj-$(CONFIG_CMD_SF) += sf.o
-obj-$(CONFIG_SPI_FLASH) += sf_params.o sf_probe.o sf_ops.o
+obj-$(CONFIG_SPI_FLASH) += sf_ops.o sf_params.o
obj-$(CONFIG_SPI_FRAM_RAMTRON) += ramtron.o
obj-$(CONFIG_SPI_FLASH_SANDBOX) += sandbox.o
obj-$(CONFIG_SPI_M95XXX) += eeprom_m95xxx.o