In order to use CMD_SF / CMD_SPI / ENV_IS_IN_SPI_FLASH we need to have
the SPI (or SPI_FLASH/DM_SPI_FLASH, for CMD_SF) enabled.  Express this
in the Kconfigs.

Signed-off-by: Tom Rini <tr...@konsulko.com>
---
 arch/Kconfig | 2 ++
 cmd/Kconfig  | 3 +++
 env/Kconfig  | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 239289b88565..486d7a8ae522 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -100,6 +100,7 @@ config SANDBOX
        imply CMD_IOTRACE
        imply CMD_LZMADEC
        imply CMD_SATA
+       imply CMD_SF
        imply CMD_SF_TEST
        imply CRC32_VERIFY
        imply FAT_WRITE
@@ -146,6 +147,7 @@ config X86
        imply CMD_IO
        imply CMD_IRQ
        imply CMD_PCI
+       imply CMD_SF
        imply CMD_SF_TEST
        imply CMD_ZBOOT
        imply DM_ETH
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 0d36da2a5c43..ab709d96e0d6 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1035,11 +1035,13 @@ config CMD_SDRAM
 
 config CMD_SF
        bool "sf"
+       depends on DM_SPI_FLASH || SPI_FLASH
        help
          SPI Flash support
 
 config CMD_SF_TEST
        bool "sf test - Allow testing of SPI flash"
+       depends on CMD_SF
        help
          Provides a way to test that SPI flash is working correctly. The
          test is destructive, in that an area of SPI flash must be provided
@@ -1051,6 +1053,7 @@ config CMD_SF_TEST
 
 config CMD_SPI
        bool "sspi - Command to access spi device"
+       depends on SPI
        help
          SPI utility command.
 
diff --git a/env/Kconfig b/env/Kconfig
index 70858d3b4075..9f7746e8baa6 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -293,7 +293,7 @@ config ENV_IS_IN_REMOTE
 
 config ENV_IS_IN_SPI_FLASH
        bool "Environment is in SPI flash"
-       depends on !CHAIN_OF_TRUST
+       depends on !CHAIN_OF_TRUST && SPI
        default y if ARMADA_XP
        default y if INTEL_BAYTRAIL
        default y if INTEL_BRASWELL
-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to