[U-Boot] [PATCH v10 06/27] mtd: spi-nor: Kconfig: Add MTD_SPI_NOR entry

Jagan Teki
2017-12-28T06:12:12Z

Added CONFIG_MTD_SPI_NOR kconfig entry

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
drivers/mtd/Kconfig | 2 ++
drivers/mtd/spi-nor/Kconfig | 14 ++++++++++++++
drivers/mtd/spi-nor/Makefile | 2 ++
3 files changed, 18 insertions(+)
create mode 100644 drivers/mtd/spi-nor/Kconfig

diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 1957980..1d5a248 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -46,4 +46,6 @@ source "drivers/mtd/nand/Kconfig"

source "drivers/mtd/spi/Kconfig"

+source "drivers/mtd/spi-nor/Kconfig"
+
source "drivers/mtd/ubi/Kconfig"
diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
new file mode 100644
index 0000000..130b0a4
--- /dev/null
+++ b/drivers/mtd/spi-nor/Kconfig
@@ -0,0 +1,14 @@
+menuconfig MTD_SPI_NOR
+ tristate "SPI-NOR device support"
+ depends on MTD
+ help
+ This is the core SPI NOR framework which can be used to interact SPI-NOR
+ to SPI driver interface layer and the SPI-NOR controller driver.
+
+ Unlike normal/generic spi controllers, they are few controllers which are
+ exclusively used to connect SPI-NOR devices, called SPI-NOR controllers.
+ So technically these controllers shouldn't reside at drivers/spi as these
+ may effect the generic SPI bus functionalities, so this SPI-NOR core acts
+ as a common core framework between the generic SPI controller drivers vs
+ SPI-NOR controller drivers for SPI-NOR device access. Note that from SPI-NOR
+ core to SPI drivers there should be an interface layer.
diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile
index c1212a8..661f2f6 100644
--- a/drivers/mtd/spi-nor/Makefile
+++ b/drivers/mtd/spi-nor/Makefile
@@ -4,4 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+

## spi-nor core
+ifdef CONFIG_MTD_SPI_NOR
obj-y += spi-nor.o spi-nor-uclass.o spi-nor-ids.o
+endif
--
2.7.4