]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: spi_flash: fix wrong dependency
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 31 Mar 2015 03:47:52 +0000 (12:47 +0900)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:49:01 +0000 (21:49 +0200)
CONFIG_SPI does not exist in Kconfig in the first place, so the
dependency "depends on DM && SPI" is never met, i.e., DM_SPI_FLASH
can never be enabled (unless you ignore the dependency in an illegal
way.  See below.)

Actually, some defconfigs such as socfpga_*_defconfig define
CONFIG_DM_SPI_FLASH=y, but it never appears in the .config file
because of this wrong dependency.

On the other hand, all the Tegra boards enable DM_SPI_FLASH because

  config DM_SPI_FLASH
          default y

silently ignores the dependency.
Unfortunately, this style of CONFIG definition is abused everywhere
in U-Boot, so we easily miss such a wrong dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/mtd/spi/Kconfig

index 2dc46b4b340e4e85c3efd9a26fa8e698407801e1..fd2d7acbeabf28a55acc792d7ba00a4447def499 100644 (file)
@@ -1,6 +1,6 @@
 config DM_SPI_FLASH
        bool "Enable Driver Model for SPI flash"
-       depends on DM && SPI
+       depends on DM && DM_SPI
        help
          Enable driver model for SPI flash. This SPI flash interface
          (spi_flash_probe(), spi_flash_write(), etc.) is then