[U-Boot] [PATCH 06/14] sandbox: Move CONFIG_SPI_FLASH_SANDBOX to Kconfig

Simon Glass sjg at chromium.org
Fri Mar 6 21:19:06 CET 2015


Move this over to Kconfig and tidy up.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 configs/sandbox_defconfig |  1 +
 drivers/mtd/spi/Kconfig   | 10 ++++++++++
 drivers/spi/Kconfig       |  2 +-
 include/configs/sandbox.h |  1 -
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 0e3cb7f..2383b77 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -18,3 +18,4 @@ CONFIG_SYS_VSNPRINTF=y
 CONFIG_SANDBOX_SERIAL=y
 CONFIG_SYS_I2C_SANDBOX=y
 CONFIG_SANDBOX_SPI=y
+CONFIG_SPI_FLASH_SANDBOX=y
diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig
index 2dc46b4..176979b 100644
--- a/drivers/mtd/spi/Kconfig
+++ b/drivers/mtd/spi/Kconfig
@@ -12,3 +12,13 @@ config DM_SPI_FLASH
 	  during the transition parent. SPI and SPI flash must be
 	  enabled together (it is not possible to use driver model
 	  for one and not the other).
+
+config SPI_FLASH_SANDBOX
+	bool "Support sandbox SPI flash device"
+	depends on SANDBOX && DM_SPI_FLASH
+	help
+	  Since sandbox cannot access real devices, an emulation mechanism is
+	  provided instead. Drivers can be connected up to the sandbox SPI
+	  bus (see CONFIG_SANDBOX_SPI) and SPI traffic will be routed to this
+	  device. Typically the contents of the emulated SPI flash device is
+	  stored in a file on the host filesystem.
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index c50d7ba..c4c112c 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -11,7 +11,7 @@ config DM_SPI
 	  typically use driver-private data instead of extending the
 	  spi_slave structure.
 
-config CONFIG_SANDBOX_SPI
+config SANDBOX_SPI
 	bool "Sandbox SPI driver"
 	depends on SANDBOX && DM
 	help
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index fddb810a..d6af4e9 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -84,7 +84,6 @@
 #define CONFIG_SPI_FLASH_EON
 #define CONFIG_SPI_FLASH_GIGADEVICE
 #define CONFIG_SPI_FLASH_MACRONIX
-#define CONFIG_SPI_FLASH_SANDBOX
 #define CONFIG_SPI_FLASH_SPANSION
 #define CONFIG_SPI_FLASH_SST
 #define CONFIG_SPI_FLASH_STMICRO
-- 
2.2.0.rc0.207.ga3a616c



More information about the U-Boot mailing list