Skip to contentSkip to conversation

Convert SiFive drivers from SOC_FOO dependencies to ARCH_FOO

PATCH Applied Conor Dooley 4 participants 9 messages Apr 6, 2023 – Apr 19, 2023

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover Convert SiFive drivers from SOC_FOO dependencies to ARCH_FOO

From: Conor Dooley <[email protected]>

RISC-V's SOC_FOO symbols for micro-archs are going away, and being replaced with the more common ARCH_FOO pattern that is used by other archs (and by vendors with a history outside of RISC-V).
I kicked the conversion off by converting the Microchip RISC-V bits to use their replacement symbol, so here's round two: the various SiFive drivers.

There are no dependencies here, everything can go via subsystem trees. We've already added the replacement symbols to RISC-V's Kconfig bits.

Cheers,
Conor.

CC Michael Turquette <[email protected]>
CC Stephen Boyd <[email protected]>
CC Palmer Dabbelt <[email protected]>
CC Paul Walmsley <[email protected]>
CC Lorenzo Pieralisi <[email protected]>
CC Krzysztof Wilczyński <[email protected]>
CC Rob Herring <[email protected]>
CC Bjorn Helgaas <[email protected]>
CC Conor Dooley <[email protected]>
CC Greg Kroah-Hartman <[email protected]>
CC Jiri Slaby <[email protected]>

Conor Dooley (4):
clk: sifive: make SiFive clk drivers depend on ARCH_ symbols
PCI: dwc: make SiFive's PCI driver depend on ARCH_ symbols
soc: sifive: make SiFive's cache controller driver depend on ARCH_
symbols
serial: make SiFive serial drivers depend on ARCH_ symbols

 drivers/clk/sifive/Kconfig         | 6 +++---
 drivers/pci/controller/dwc/Kconfig | 2 +-
 drivers/soc/sifive/Kconfig         | 2 +-
 drivers/tty/serial/Kconfig         | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/4 clk: sifive: make SiFive clk drivers depend on ARCH_ symbols

From: Conor Dooley <[email protected]>

As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the SiFive clk drivers to use the new symbol.

---
 drivers/clk/sifive/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/sifive/Kconfig +3 -3
index b7fde0aadfcb..2322f634a910 100644
@@ -2,8 +2,8 @@
 
 menuconfig CLK_SIFIVE
 	bool "SiFive SoC driver support"
-	depends on SOC_SIFIVE || COMPILE_TEST
-	default SOC_SIFIVE
+	depends on ARCH_SIFIVE || COMPILE_TEST
+	default ARCH_SIFIVE
 	help
 	  SoC drivers for SiFive Linux-capable SoCs.
 
@@ -11,7 +11,7 @@ if CLK_SIFIVE
 
 config CLK_SIFIVE_PRCI
 	bool "PRCI driver for SiFive SoCs"
-	default SOC_SIFIVE
+	default ARCH_SIFIVE
 	select RESET_CONTROLLER
 	select RESET_SIMPLE
 	select CLK_ANALOGBITS_WRPLL_CLN28HPC
Signature · 1 line
2.39.2
maintainer Applied
#2 lore raw

Re: [PATCH v1 1/4] clk: sifive: make SiFive clk drivers depend on ARCH_ symbols

Quoting Conor Dooley (2023-04-06 13:57:47)

Quoted 8 lines

From: Conor Dooley <[email protected]>

As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the SiFive clk drivers to use the new symbol.

---

Applied to clk-next

#3 lore raw

PATCH 2/4 PCI: dwc: make SiFive's PCI driver depend on ARCH_ symbols

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the dependency on SOC_SIFIVE to the new symbol.

---
 drivers/pci/controller/dwc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/Kconfig +1 -1
index d29551261e80..7d670be44073 100644
@@ -409,7 +409,7 @@ config PCIE_AL
 config PCIE_FU740
 	bool "SiFive FU740 PCIe host controller"
 	depends on PCI_MSI
-	depends on SOC_SIFIVE || COMPILE_TEST
+	depends on ARCH_SIFIVE || COMPILE_TEST
 	select PCIE_DW_HOST
 	help
 	  Say Y here if you want PCIe controller support for the SiFive
Signature · 7 lines
2.39.2


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#4 lore raw

PATCH 3/4 soc: sifive: make SiFive's cache controller driver depend on ARCH_ symbols

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the SiFive soc drivers to use the new ARCH_FOO symbols.

---
 drivers/soc/sifive/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/sifive/Kconfig +1 -1
index e86870be34c9..139884addc41 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
-if SOC_SIFIVE || SOC_STARFIVE
+if ARCH_SIFIVE || ARCH_STARFIVE
 
 config SIFIVE_CCACHE
 	bool "Sifive Composable Cache controller"
Signature · 7 lines
2.39.2


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer Reviewed-by Acked-by on v1 3/4
#5 lore raw

Re: [PATCH v1 3/4] soc: sifive: make SiFive's cache controller driver depend on ARCH_ symbols

Quoted 16 lines · Conor Dooley

From: Conor Dooley <[email protected]>

As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the SiFive soc drivers to use the new ARCH_FOO symbols.

---
 drivers/soc/sifive/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/sifive/Kconfig +0 -0
index e86870be34c9..139884addc41 100644

drivers/soc/sifive/Kconfig line 6

Quoted 7 lines
drivers/soc/sifive/Kconfig +1 -1
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
-if SOC_SIFIVE || SOC_STARFIVE
+if ARCH_SIFIVE || ARCH_STARFIVE
 
 config SIFIVE_CCACHE
 	bool "Sifive Composable Cache controller"
#6 lore raw

PATCH 4/4 serial: make SiFive serial drivers depend on ARCH_ symbols

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the SiFive serial driver Kconfig entries from the SOC_ symbols to ARCH_ instead.

---
I hope you like the message-id Greg ;)

---
 drivers/tty/serial/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/Kconfig +2 -2
index 39a0078f54f6..398e5aac2e77 100644
@@ -951,7 +951,7 @@ config SERIAL_OMAP_CONSOLE
 config SERIAL_SIFIVE
 	tristate "SiFive UART support"
 	depends on OF
-	default SOC_SIFIVE || SOC_CANAAN
+	default ARCH_SIFIVE || ARCH_CANAAN
 	select SERIAL_CORE
 	help
 	  Select this option if you are building a kernel for a device that
@@ -961,7 +961,7 @@ config SERIAL_SIFIVE
 config SERIAL_SIFIVE_CONSOLE
 	bool "Console on SiFive UART"
 	depends on SERIAL_SIFIVE=y
-	default SOC_SIFIVE || SOC_CANAAN
+	default ARCH_SIFIVE || ARCH_CANAAN
 	select SERIAL_CORE_CONSOLE
 	select SERIAL_EARLYCON
 	help
Signature · 7 lines
2.39.2


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#7 lore raw
In reply to Conor Dooley
Quoted 5 lines · Conor Dooley

From: Conor Dooley <[email protected]>

RISC-V's SOC_FOO symbols for micro-archs are going away, and being replaced with the more common ARCH_FOO pattern that is used by other archs (and by vendors with a history outside of RISC-V).

And this is still the wrong way around. This ARCH_ madness must not spread. NAK.

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#8 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 5 lines · Conor Dooley

From: Conor Dooley <[email protected]>

RISC-V's SOC_FOO symbols for micro-archs are going away, and being replaced with the more common ARCH_FOO pattern that is used by other archs (and by vendors with a history outside of RISC-V).

And this is still the wrong way around. This ARCH_ madness must not spread. NAK.

As I said when you complained last, we asked the arm lads and there was no interest there in doing things differently & that's just one architecture. Nor was there in adding a SOC_ symbol from some of the people who do more than one ISA.

You're welcome to send reverts for my first round of conversions and patches converting all the ARCH_ stuff RISC-V has to SOC_. I'll happily ack a complete conversion to SOC_.
I don't care if it is arch or soc, I just want things to be used consistently.