]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: Allow separate control of SPI_FLASH_TINY for SPL/TPL
authorSimon Glass <sjg@chromium.org>
Sun, 19 Jul 2020 16:15:31 +0000 (10:15 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 4 Aug 2020 02:19:54 +0000 (22:19 -0400)
In some cases SPL needs to be able to erase but TPL just needs to read.
Allow these to have separate settings for SPI_FLASH_TINY.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/spl/Kconfig
drivers/mtd/spi/Makefile

index 72c7165dc2403c0cf10a1af54f4efbd61fb62447..10605f1bab75a846de45cd6d5a3c807f85d26750 100644 (file)
@@ -1529,6 +1529,16 @@ config TPL_SPI_FLASH_SUPPORT
          Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT
          for details.
 
+config TPL_SPI_FLASH_TINY
+       bool "Enable low footprint TPL SPI Flash support"
+       depends on TPL_SPI_FLASH_SUPPORT && !SPI_FLASH_BAR
+       default y if SPI_FLASH
+       help
+        Enable lightweight TPL SPI Flash support that supports just reading
+        data/images from flash. No support to write/erase flash. Enable
+        this if you have TPL size limitations and don't need full-fledged
+        SPI flash support.
+
 config TPL_SPI_LOAD
        bool "Support loading from SPI flash"
        depends on TPL_SPI_FLASH_SUPPORT
index 952fd1e45a17ecd75c85d037252c9f07cf09c422..99cc4185522331af8d6597f8670c4c2892615790 100644 (file)
@@ -8,7 +8,7 @@ spi-nor-y := sf_probe.o spi-nor-ids.o
 
 ifdef CONFIG_SPL_BUILD
 obj-$(CONFIG_SPL_SPI_BOOT)     += fsl_espi_spl.o
-ifeq ($(CONFIG_SPL_SPI_FLASH_TINY),y)
+ifeq ($(CONFIG_$(SPL_TPL_)SPI_FLASH_TINY),y)
 spi-nor-y += spi-nor-tiny.o
 else
 spi-nor-y += spi-nor-core.o