Skip to contentSkip to conversation

spi-nor: intel-spi: Fix Kconfig dependency to LPC_ICH

PATCH In review Bin Meng 3 participants 3 messages Oct 24, 2017

Subsystems (2)
lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH v2 1/1 spi-nor: intel-spi: Fix Kconfig dependency to LPC_ICH

The Intel SPI-NOR driver is dependent on LPC_ICH to get the platform data. Select it in the Kconfig.

---

Changes in v2:
- Enforce dependency on PCI

 drivers/mtd/spi-nor/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mtd/spi-nor/Kconfig +2 -1
index f26aaa6..abf453a 100644
@@ -107,8 +107,9 @@ config SPI_INTEL_SPI_PCI
 
 config SPI_INTEL_SPI_PLATFORM
 	tristate "Intel PCH/PCU SPI flash platform driver" if EXPERT
-	depends on X86
+	depends on X86 && PCI
 	select SPI_INTEL_SPI
+	select LPC_ICH
 	help
 	  This enables platform support for the Intel PCH/PCU SPI
 	  controller in master mode. This controller is present in modern
Signature · 1 line
2.7.4
#1 lore raw
Quoted 18 lines · Bin Meng

The Intel SPI-NOR driver is dependent on LPC_ICH to get the platform data. Select it in the Kconfig.

---

Changes in v2:
- Enforce dependency on PCI

 drivers/mtd/spi-nor/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mtd/spi-nor/Kconfig +0 -0
index f26aaa6..abf453a 100644

drivers/mtd/spi-nor/Kconfig config SPI_INTEL_SPI_PCI · line 110

Quoted 5 lines
drivers/mtd/spi-nor/Kconfig +1 -1
@@ -107,8 +107,9 @@ config SPI_INTEL_SPI_PCI
 
 config SPI_INTEL_SPI_PLATFORM
 	tristate "Intel PCH/PCU SPI flash platform driver" if EXPERT
-	depends on X86
+	depends on X86 && PCI

It is kind of weird to depend on PCI if we want to enable *platform* driver but whatever. I would still prefer to have dependency for LPC_ICH instead.

No strong feelings though - as long as it builds and works fine :-)

Quoted 7 lines
drivers/mtd/spi-nor/Kconfig +1 -0
 	select SPI_INTEL_SPI
+	select LPC_ICH
 	help
 	  This enables platform support for the Intel PCH/PCU SPI
 	  controller in master mode. This controller is present in modern
Signature · 1 line
2.7.4
#2 lore raw
Quoted 15 lines · Mika Westerberg

drivers/mtd/spi-nor/Kconfig config SPI_INTEL_SPI_PCI · line 110

Quoted 9 lines · Bin Meng

index f26aaa6..abf453a 100644

drivers/mtd/spi-nor/Kconfig +1 -1
@@ -107,8 +107,9 @@ config SPI_INTEL_SPI_PCI
 
 config SPI_INTEL_SPI_PLATFORM
      tristate "Intel PCH/PCU SPI flash platform driver" if EXPERT
-     depends on X86
+     depends on X86 && PCI

It is kind of weird to depend on PCI if we want to enable *platform* driver but whatever. I would still prefer to have dependency for LPC_ICH instead.

Quoted 1 line

No strong feelings though - as long as it builds and works fine :-)

Agreed, I think we are better off using a dependency here, but then we should probably do that for all users of LPC_ICH and change them over as well. I think there are two or three other drivers that currently select LPC_ICH. Using 'select' like this is generally a bad idea, but being inconsistent (using both depends and select) is usually worse.

Arnd