summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configs/sandbox_defconfig1
-rw-r--r--drivers/mtd/spi/Kconfig10
-rw-r--r--include/configs/sandbox.h1
3 files changed, 11 insertions, 1 deletions
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 058949a6a9..dd33028f8d 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -21,3 +21,4 @@ CONFIG_SANDBOX_GPIO=y
CONFIG_SYS_VSNPRINTF=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 fd2d7acbea..ac6d09f928 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/include/configs/sandbox.h b/include/configs/sandbox.h
index b77a866fea..5f72f6a4c9 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -87,7 +87,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
OpenPOWER on IntegriCloud