Skip to contentSkip to conversation

spl: fix SPI config dependencies

PATCH New Simon Goldschmidt 3 participants 3 messages Oct 25, 2019 – Nov 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spl: fix SPI config dependencies

As SPL_SPI_FLASH_SUPPORT cannot work without SPL_SPI_SUPPORT, fix dependencies to prevent enabling SPI flash support without basic SPI support.

---

Changes in v2:
- move SYS_SPI_U_BOOT_OFFS out of the SPL_SPI_FLASH_SUPPORT guard since that broke sunxi SPL (which uses non-DM spi)

 common/spl/Kconfig | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
common/spl/Kconfig +11 -10
index 86d7edfee1..b8d234eb5e 100644
@@ -1014,8 +1014,19 @@ config SPL_SERIAL_SUPPORT
 	  unless there are space reasons not to. Even then, consider
 	  enabling SPL_USE_TINY_PRINTF which is a small printf() version.
 
+config SPL_SPI_SUPPORT
+	bool "Support SPI drivers"
+	help
+	  Enable support for using SPI in SPL. This is used for connecting
+	  to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
+	  more details on that. The SPI driver provides the transport for
+	  data between the SPI flash and the CPU. This option can be used to
+	  enable SPI drivers that are needed for other purposes also, such
+	  as a SPI PMIC.
+
 config SPL_SPI_FLASH_SUPPORT
 	bool "Support SPI flash drivers"
+	depends on SPL_SPI_SUPPORT
 	help
 	  Enable support for using SPI flash in SPL, and loading U-Boot from
 	  SPI flash. SPI flash (Serial Peripheral Bus flash) is named after
@@ -1060,16 +1071,6 @@ config SYS_SPI_U_BOOT_OFFS
 	 Address within SPI-Flash from where the u-boot payload is fetched
 	 from.
 
-config SPL_SPI_SUPPORT
-	bool "Support SPI drivers"
-	help
-	  Enable support for using SPI in SPL. This is used for connecting
-	  to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT for
-	  more details on that. The SPI driver provides the transport for
-	  data between the SPI flash and the CPU. This option can be used to
-	  enable SPI drivers that are needed for other purposes also, such
-	  as a SPI PMIC.
-
 config SPL_THERMAL
 	bool "Driver support for thermal devices"
 	help
Signature · 1 line
2.20.1
#1 lore raw

PATCH v2 1/1 spl: fix SPI config dependencies

Quoted 60 lines · On Fri, 25 Oct 2019 16:22:09 +0200 Simon Goldschmidt…

As SPL_SPI_FLASH_SUPPORT cannot work without SPL_SPI_SUPPORT, fix dependencies to prevent enabling SPI flash support without basic SPI support.

---

Changes in v2:
- move SYS_SPI_U_BOOT_OFFS out of the SPL_SPI_FLASH_SUPPORT guard since that broke sunxi SPL (which uses non-DM spi)

 common/spl/Kconfig | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
common/spl/Kconfig +0 -0
index 86d7edfee1..b8d234eb5e 100644
@@ -1014,8 +1014,19 @@ config SPL_SERIAL_SUPPORT
 	  unless there are space reasons not to. Even then, consider
 	  enabling SPL_USE_TINY_PRINTF which is a small printf()

version.

common/spl/Kconfig +4 -0
+config SPL_SPI_SUPPORT
+	bool "Support SPI drivers"
+	help
+	  Enable support for using SPI in SPL. This is used for

connecting

common/spl/Kconfig +1 -0
+	  to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT

for

common/spl/Kconfig +1 -0
+	  more details on that. The SPI driver provides the

transport for

common/spl/Kconfig +1 -0
+	  data between the SPI flash and the CPU. This option can be

used to

common/spl/Kconfig +1 -0
+	  enable SPI drivers that are needed for other purposes

also, such

common/spl/Kconfig +3 -0
+	  as a SPI PMIC.
+
 config SPL_SPI_FLASH_SUPPORT
 	bool "Support SPI flash drivers"
+	depends on SPL_SPI_SUPPORT
 	help
 	  Enable support for using SPI flash in SPL, and loading

U-Boot from SPI flash. SPI flash (Serial Peripheral Bus flash) is named after @@ -1060,16 +1071,6 @@ config SYS_SPI_U_BOOT_OFFS
Address within SPI-Flash from where the u-boot payload is
fetched from.

common/spl/Kconfig +0 -4
-config SPL_SPI_SUPPORT
-	bool "Support SPI drivers"
-	help
-	  Enable support for using SPI in SPL. This is used for

connecting

common/spl/Kconfig +0 -1
-	  to SPI flash for loading U-Boot. See SPL_SPI_FLASH_SUPPORT

for

common/spl/Kconfig +0 -1
-	  more details on that. The SPI driver provides the

transport for

common/spl/Kconfig +0 -1
-	  data between the SPI flash and the CPU. This option can be

used to

common/spl/Kconfig +0 -1
-	  enable SPI drivers that are needed for other purposes

also, such

common/spl/Kconfig config SYS_SPI_U_BOOT_OFFS · line 1076

Quoted 5 lines
common/spl/Kconfig +0 -2
-	  as a SPI PMIC.
-
 config SPL_THERMAL
 	bool "Driver support for thermal devices"
 	help

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191026/626cd001/attachment.sig>

#2 lore raw

PATCH v2 1/1 spl: fix SPI config dependencies

In reply to Simon Goldschmidt
Quoted 6 lines · Simon Goldschmidt

As SPL_SPI_FLASH_SUPPORT cannot work without SPL_SPI_SUPPORT, fix dependencies to prevent enabling SPI flash support without basic SPI support.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191108/bdb38f22/attachment.sig>