Kconfig: Add SPI / SPI_FLASH as dependencies
authorTom Rini <trini@konsulko.com>
Wed, 29 May 2019 21:01:28 +0000 (17:01 -0400)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 13 Jun 2019 07:21:06 +0000 (12:51 +0530)
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 <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
arch/Kconfig
cmd/Kconfig
env/Kconfig

index e574b0d441b0b1a32e3aa7fce4bcb22ea41ca613..28afe3980168d2a15d326559571dc78182c33bb3 100644 (file)
@@ -101,6 +101,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
@@ -147,6 +148,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
index 0badcb3fe006baaef150f59d3089cbf5e4ddd7f4..cda7931fe360ce9c2ef27968e304e45c6bc16a6b 100644 (file)
@@ -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.
 
index 1e10c7a4c46b1ea0370d5d8cb5d33d105e91eb15..932081670e9fc947a22006f980f61eeebae0ad3c 100644 (file)
@@ -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