Skip to contentSkip to conversation

RISC-V: Convert SOC_FOO symbols to ARCH_FOO

RFC In review Conor Dooley 8 participants 43 messages Sep 23, 2022 – Sep 28, 2022

Subsystems (20)
lore
Share & tools
lore

Conor Dooley

author maintainer
#0 lore raw

cover RISC-V: Convert SOC_FOO symbols to ARCH_FOO

From: Conor Dooley <[email protected]>

Following on from LPC, here's the start of my efforts to clean up Kconfig.socs.

My preference would be to take the whole thing through the RISC-V tree for v6.2 to make things a bit less fiddly, but I am sending this as an RFC in the hopes of getting some opinions on how the series should be split up & merged. I guess it would always be possible to create a few immutable branches for the individual subsystems that are being modified & take the series through the riscv tree unless we hit a conflict in -next. Obiviously for that route, maintainer acks will be needed.

The only SoCs I have, at the moment ;), are the jh7100, mpfs, fu540 and the k210 so I've given those a whirl to make sure I didn't break something.

I have also yet to deal with ARCH_VIRT, but just throwing this out for some opinions on how to apply/split up the set before finalising a v1.

I've CCed a few people that may have an opinion here, but anyone that has an opinion here - please shout!

One other point, is it worth adding something to the patch acceptance policy to say "do your kconfig xyz way" or is that not something that's worth doing since it is easy to push people in the right direction during review?

The series is currently on top of:
https://lore.kernel.org/all/[email protected]/

Thanks,
Conor.

Conor Dooley (27):
clk: microchip: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
i2c: microchip-corei2c: replace SOC_MICROCHIP_POLARFIRE with
ARCH_MICROCHIP
mailbox: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
usb: musb: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
rtc: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
riscv: stop selecting the PolarFire SoC clock driver
riscv: replace SOC_STARFIVE with ARCH_STARFIVE
clk: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
pinctrl: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
reset: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
riscv: replace SOC_SIFIVE with ARCH_SIFIVE
soc: sifive: convert SOC_SIFIVE to ARCH_SIFIVE
clk: sifive: convert SOC_SIFIVE to ARCH_SIFIVE
clk: sifive: select by default if ARCH_SIFIVE
serial: sifive: select by default if ARCH_SIFIVE
PCI: dwc: fu740: convert SOC_SIFIVE to ARCH_SIFIVE
riscv: stop selecting SiFive clock and serial drivers directly
riscv: convert SOC_VIRT to ARCH_VIRT
kunit: tool: rename SOC_VIRT to ARCH_VIRT in riscv's QEMU config
wireguard: selftests: swap SOC_VIRT for ARCH_VIRT on riscv
riscv: convert SOC_CANAAN to ARCH_CANAAN
clk: k210: convert SOC_CANAAN to ARCH_CANAAN
pinctrl: k210: convert SOC_CANAAN to ARCH_CANAAN
soc: k210: convert SOC_CANAAN to ARCH_CANAAN
reset: k210: convert SOC_CANAAN to ARCH_CANAAN
serial: sifive: select by default if ARCH_CANAAN
riscv: stop directly selecting drivers for ARCH_CANAAN

 arch/riscv/Kconfig.socs                       | 30 +++++++------------
 arch/riscv/Makefile                           |  2 +-
 arch/riscv/boot/dts/Makefile                  |  2 +-
 arch/riscv/boot/dts/canaan/Makefile           | 14 ++++-----
 arch/riscv/boot/dts/sifive/Makefile           |  2 +-
 arch/riscv/boot/dts/starfive/Makefile         |  2 +-
 arch/riscv/configs/defconfig                  |  6 ++--
 arch/riscv/configs/nommu_k210_defconfig       |  2 +-
 .../riscv/configs/nommu_k210_sdcard_defconfig |  2 +-
 arch/riscv/configs/nommu_virt_defconfig       |  2 +-
 arch/riscv/configs/rv32_defconfig             |  4 +--
 drivers/clk/Kconfig                           |  4 +--
 drivers/clk/Makefile                          |  2 +-
 drivers/clk/microchip/Kconfig                 |  3 +-
 drivers/clk/sifive/Kconfig                    |  4 ++-
 drivers/clk/starfive/Kconfig                  |  6 ++--
 drivers/i2c/busses/Kconfig                    |  2 +-
 drivers/mailbox/Kconfig                       |  2 +-
 drivers/pci/controller/dwc/Kconfig            |  2 +-
 drivers/pinctrl/Kconfig                       |  8 ++---
 drivers/reset/Kconfig                         |  8 ++---
 drivers/rtc/Kconfig                           |  2 +-
 drivers/soc/Makefile                          |  4 +--
 drivers/soc/canaan/Kconfig                    |  4 +--
 drivers/soc/sifive/Kconfig                    |  2 +-
 drivers/tty/serial/Kconfig                    |  2 ++
 drivers/usb/musb/Kconfig                      |  2 +-
 tools/testing/kunit/qemu_configs/riscv.py     |  2 +-
 .../wireguard/qemu/arch/riscv32.config        |  2 +-
 .../wireguard/qemu/arch/riscv64.config        |  2 +-
 30 files changed, 64 insertions(+), 67 deletions(-)
Signature · 7 lines
2.37.3


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

RFC 1/27 clk: microchip: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP

From: Conor Dooley <[email protected]>

At LPC, we decided that for the sake of consistency the SOC_FOO symbols in arch/riscv should be replaced with ARCH_FOO so that we could have a consistent policy regardless of whether a vendor had ARM legacy or was a RISC-V "incumbent".

The symbol is currently selected by the arch Kconfig, but that is going to change, so as a precursor to that change the symbol so that it defaults to the value of ARCH_MICROCHIP. The symbol is only defined by RISC-V, so there is no reason to also depend on RISCV

---
 drivers/clk/microchip/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/microchip/Kconfig +2 -1
index b46e864b3bd8..5c6d780870ab 100644
@@ -5,7 +5,8 @@ config COMMON_CLK_PIC32
 
 config MCHP_CLK_MPFS
 	bool "Clk driver for PolarFire SoC"
-	depends on (RISCV && SOC_MICROCHIP_POLARFIRE) || COMPILE_TEST
+	depends on ARCH_MICROCHIP || COMPILE_TEST
+	default ARCH_MICROCHIP
 	select AUXILIARY_BUS
 	help
 	  Supports Clock Configuration for PolarFire SoC
Signature · 7 lines
2.37.3


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

RFC 2/27 i2c: microchip-corei2c: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC, we decided that for the sake of consistency the SOC_FOO symbols in arch/riscv should be replaced with ARCH_FOO so that we could have a consistent policy regardless of whether a vendor had ARM legacy or was a RISC-V "incumbent".

microchip-corei2c depends on the SOC version of the symbol, so convert it.

---
 drivers/i2c/busses/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/Kconfig +1 -1
index 0c48d8a9f44a..9915aea1ad8b 100644
@@ -785,7 +785,7 @@ config I2C_MESON
 
 config I2C_MICROCHIP_CORE
 	tristate "Microchip FPGA I2C controller"
-	depends on SOC_MICROCHIP_POLARFIRE || COMPILE_TEST
+	depends on ARCH_MICROCHIP || COMPILE_TEST
 	depends on OF
 	help
 	  If you say yes to this option, support will be included for the
Signature · 7 lines
2.37.3


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

RFC 3/27 mailbox: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC, we decided that for the sake of consistency the SOC_FOO symbols in arch/riscv should be replaced with ARCH_FOO so that we could have a consistent policy regardless of whether a vendor had ARM legacy or was a RISC-V "incumbent".

The PolarFire SoC mailbox depends on the SOC version of the symbol, so convert it.

---
 drivers/mailbox/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/Kconfig +1 -1
index 05d6fae800e3..ba4700f69a5a 100644
@@ -175,7 +175,7 @@ config MAILBOX_TEST
 config POLARFIRE_SOC_MAILBOX
 	tristate "PolarFire SoC (MPFS) Mailbox"
 	depends on HAS_IOMEM
-	depends on SOC_MICROCHIP_POLARFIRE || COMPILE_TEST
+	depends on ARCH_MICROCHIP || COMPILE_TEST
 	help
 	  This driver adds support for the PolarFire SoC (MPFS) mailbox controller.
 
Signature · 7 lines
2.37.3


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

RFC 4/27 usb: musb: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC, we decided that for the sake of consistency the SOC_FOO symbols in arch/riscv should be replaced with ARCH_FOO so that we could have a consistent policy regardless of whether a vendor had ARM legacy or was a RISC-V "incumbent".

The PolarFire SoC musb driver depends on the SOC symbol, so convert it.

---
 drivers/usb/musb/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb/Kconfig +1 -1
index 6c8f7763e75e..8304709e490c 100644
@@ -125,7 +125,7 @@ config USB_MUSB_MEDIATEK
 
 config USB_MUSB_POLARFIRE_SOC
 	tristate "Microchip PolarFire SoC platforms"
-	depends on SOC_MICROCHIP_POLARFIRE || COMPILE_TEST
+	depends on ARCH_MICROCHIP || COMPILE_TEST
 	depends on NOP_USB_XCEIV
 	select USB_MUSB_DUAL_ROLE
 	help
Signature · 7 lines
2.37.3


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

RFC 5/27 rtc: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC, we decided that for the sake of consistency the SOC_FOO symbols in arch/riscv should be replaced with ARCH_FOO so that we could have a consistent policy regardless of whether a vendor had ARM legacy or was a RISC-V "incumbent".

As the PolarFire SoC RTC depends on the SOC_ symbol convert it, and while we are at it, add the ability to compile test it for the craic.

---
 drivers/rtc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/Kconfig +1 -1
index b8de25118ad0..fe0ea16aa571 100644
@@ -1986,7 +1986,7 @@ config RTC_DRV_MSC313
 
 config RTC_DRV_POLARFIRE_SOC
 	tristate "Microchip PolarFire SoC built-in RTC"
-	depends on SOC_MICROCHIP_POLARFIRE
+	depends on ARCH_MICROCHIP || COMPILE_TEST
 	help
 	  If you say yes here you will get support for the
 	  built-in RTC on Polarfire SoC.
Signature · 7 lines
2.37.3


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

RFC 7/27 riscv: replace SOC_STARFIVE with ARCH_STARFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As discussed at LPC, the SOC_ symbols are being converted to ARCH_ for the sake of consistency between "incumbent" vendors and those who have a legacy from other archs.

Convert SOC_STARFIVE to ARCH_STARFIVE across arch/riscv

---
 arch/riscv/Kconfig.socs               | 2 +-
 arch/riscv/boot/dts/starfive/Makefile | 2 +-
 arch/riscv/configs/defconfig          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/Kconfig.socs +1 -1
index c4c7add1516f..910697baf097 100644
@@ -17,7 +17,7 @@ config SOC_SIFIVE
 	help
 	  This enables support for SiFive SoC platform hardware.
 
-config SOC_STARFIVE
+config ARCH_STARFIVE
 	bool "StarFive SoCs"
 	select PINCTRL
 	select RESET_CONTROLLER
arch/riscv/boot/dts/starfive/Makefile +1 -1
index 039c143cba33..7b00a48580ca 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
+dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
arch/riscv/configs/defconfig +1 -1
index dac14b95c73d..971986be875f 100644
@@ -27,7 +27,7 @@ CONFIG_EXPERT=y
 CONFIG_PROFILING=y
 CONFIG_ARCH_MICROCHIP_POLARFIRE=y
 CONFIG_SOC_SIFIVE=y
-CONFIG_SOC_STARFIVE=y
+CONFIG_ARCH_STARFIVE=y
 CONFIG_SOC_VIRT=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
Signature · 7 lines
2.37.3


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

RFC 8/27 clk: starfive: replace SOC_STARFIVE with ARCH_STARFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC we decided to replace the SOC_ symbols in arch/riscv with ARCH_ variants, for the sake of consistency between "incumbent" vendors and those with legacy in other architectures. To that end, replace the SOC_STARFIVE symbol with ARCH_STARFIVE.

---
 drivers/clk/Makefile         | 2 +-
 drivers/clk/starfive/Kconfig | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/clk/Makefile +1 -1
index d5db170d38d2..c04628f8bb7d 100644
@@ -116,7 +116,7 @@ obj-$(CONFIG_PLAT_SPEAR)		+= spear/
 obj-y					+= sprd/
 obj-$(CONFIG_ARCH_STI)			+= st/
 obj-$(CONFIG_ARCH_STM32)		+= stm32/
-obj-$(CONFIG_SOC_STARFIVE)		+= starfive/
+obj-$(CONFIG_ARCH_STARFIVE)		+= starfive/
 obj-$(CONFIG_ARCH_SUNXI)		+= sunxi/
 obj-y					+= sunxi-ng/
 obj-$(CONFIG_ARCH_TEGRA)		+= tegra/
drivers/clk/starfive/Kconfig +3 -3
index 003bd2d56ce7..ef3517f4a276 100644
@@ -2,8 +2,8 @@
 
 config CLK_STARFIVE_JH7100
 	bool "StarFive JH7100 clock support"
-	depends on SOC_STARFIVE || COMPILE_TEST
-	default SOC_STARFIVE
+	depends on ARCH_STARFIVE || COMPILE_TEST
+	default ARCH_STARFIVE
 	help
 	  Say yes here to support the clock controller on the StarFive JH7100
 	  SoC.
@@ -11,7 +11,7 @@ config CLK_STARFIVE_JH7100
 config CLK_STARFIVE_JH7100_AUDIO
 	tristate "StarFive JH7100 audio clock support"
 	depends on CLK_STARFIVE_JH7100
-	default m if SOC_STARFIVE
+	default m if ARCH_STARFIVE
 	help
 	  Say Y or M here to support the audio clocks on the StarFive JH7100
 	  SoC.
Signature · 7 lines
2.37.3


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

RFC 6/27 riscv: stop selecting the PolarFire SoC clock driver

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

The driver is now enabled by default if ARCH_MICROCHIP so there is no longer a need to select it in Kconfig.socs

---
 arch/riscv/Kconfig.socs | 1 -
 1 file changed, 1 deletion(-)
arch/riscv/Kconfig.socs +0 -1
index 20b7f17614f1..c4c7add1516f 100644
@@ -2,7 +2,6 @@ menu "SoC selection"
 
 config ARCH_MICROCHIP
 	bool "Microchip SoC FPGAs"
-	select MCHP_CLK_MPFS
 	select SIFIVE_PLIC
 	help
 	  This enables support for Microchip SoC FPGAs.
Signature · 7 lines
2.37.3


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

RFC 9/27 pinctrl: starfive: replace SOC_STARFIVE with ARCH_STARFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC we decided to replace the SOC_ symbols in arch/riscv with ARCH_ variants, for the sake of consistency between "incumbent" vendors and those with legacy in other architectures. To that end, replace the SOC_STARFIVE symbol with ARCH_STARFIVE.

---
 drivers/pinctrl/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/Kconfig +2 -2
index da87f2dc358b..8862a71de8af 100644
@@ -433,9 +433,9 @@ config PINCTRL_ST
 
 config PINCTRL_STARFIVE
 	tristate "Pinctrl and GPIO driver for the StarFive JH7100 SoC"
-	depends on SOC_STARFIVE || COMPILE_TEST
+	depends on ARCH_STARFIVE || COMPILE_TEST
 	depends on OF
-	default SOC_STARFIVE
+	default ARCH_STARFIVE
 	select GENERIC_PINCTRL_GROUPS
 	select GENERIC_PINMUX_FUNCTIONS
 	select GENERIC_PINCONF
Signature · 7 lines
2.37.3


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

RFC 10/27 reset: starfive: replace SOC_STARFIVE with ARCH_STARFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC we decided to replace the SOC_ symbols in arch/riscv with ARCH_ variants, for the sake of consistency between "incumbent" vendors and those with legacy in other architectures. To that end, replace the SOC_STARFIVE symbol with ARCH_STARFIVE.

---
 drivers/reset/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/reset/Kconfig +2 -2
index de176c2fbad9..a69bd6ef3110 100644
@@ -234,8 +234,8 @@ config RESET_SOCFPGA
 
 config RESET_STARFIVE_JH7100
 	bool "StarFive JH7100 Reset Driver"
-	depends on SOC_STARFIVE || COMPILE_TEST
-	default SOC_STARFIVE
+	depends on ARCH_STARFIVE || COMPILE_TEST
+	default ARCH_STARFIVE
 	help
 	  This enables the reset controller driver for the StarFive JH7100 SoC.
 
Signature · 7 lines
2.37.3


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

RFC 11/27 riscv: replace SOC_SIFIVE with ARCH_SIFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

Per discussion at LPC, the SoC/platform Kconfig symbols in RISC-V land are to be converted to ARCH_FOO from SOC_FOO so that the symbols are consistent between the "incumbents" & those coming from ARM64 etc.

Predictably, SOC_SIFIVE becomes ARCH_SIFIVE.

---
 arch/riscv/Kconfig.socs             | 2 +-
 arch/riscv/boot/dts/sifive/Makefile | 2 +-
 arch/riscv/configs/defconfig        | 2 +-
 arch/riscv/configs/rv32_defconfig   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
arch/riscv/Kconfig.socs +1 -1
index 910697baf097..3604b90251b4 100644
@@ -6,7 +6,7 @@ config ARCH_MICROCHIP
 	help
 	  This enables support for Microchip SoC FPGAs.
 
-config SOC_SIFIVE
+config ARCH_SIFIVE
 	bool "SiFive SoCs"
 	select SERIAL_SIFIVE if TTY
 	select SERIAL_SIFIVE_CONSOLE if TTY
arch/riscv/boot/dts/sifive/Makefile +1 -1
index d90e4eb0ade8..b1c2d563a0e6 100644
@@ -1,4 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_SOC_SIFIVE) += hifive-unleashed-a00.dtb \
+dtb-$(CONFIG_ARCH_SIFIVE) += hifive-unleashed-a00.dtb \
 			    hifive-unmatched-a00.dtb
 obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
arch/riscv/configs/defconfig +1 -1
index 971986be875f..bfb6f6f57ae2 100644
@@ -26,7 +26,7 @@ CONFIG_EXPERT=y
 # CONFIG_SYSFS_SYSCALL is not set
 CONFIG_PROFILING=y
 CONFIG_ARCH_MICROCHIP_POLARFIRE=y
-CONFIG_SOC_SIFIVE=y
+CONFIG_ARCH_SIFIVE=y
 CONFIG_ARCH_STARFIVE=y
 CONFIG_SOC_VIRT=y
 CONFIG_SMP=y
arch/riscv/configs/rv32_defconfig +1 -1
index 38760e4296cf..4badab395546 100644
@@ -16,7 +16,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_EXPERT=y
 # CONFIG_SYSFS_SYSCALL is not set
 CONFIG_PROFILING=y
-CONFIG_SOC_SIFIVE=y
+CONFIG_ARCH_SIFIVE=y
 CONFIG_SOC_VIRT=y
 CONFIG_NONPORTABLE=y
 CONFIG_ARCH_RV32I=y
Signature · 7 lines
2.37.3


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

RFC 12/27 soc: sifive: convert SOC_SIFIVE to ARCH_SIFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As discussed at LPC, the SOC_ symbols in arch/riscv are being converted to ARCH_, so SOC_SIFIVE becomes ARCH_SIFIVE. As the entirety of the SiFive subdirectory is gated by "if ARCH_SIFIVE" in its Kconfig, the sub-Makefile can always be included.

---
 drivers/soc/Makefile       | 2 +-
 drivers/soc/sifive/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/soc/Makefile +1 -1
index 69ba6508cf2c..534669840858 100644
@@ -26,7 +26,7 @@ obj-y				+= qcom/
 obj-y				+= renesas/
 obj-y				+= rockchip/
 obj-$(CONFIG_SOC_SAMSUNG)	+= samsung/
-obj-$(CONFIG_SOC_SIFIVE)	+= sifive/
+obj-y				+= sifive/
 obj-y				+= sunxi/
 obj-$(CONFIG_ARCH_TEGRA)	+= tegra/
 obj-y				+= ti/
drivers/soc/sifive/Kconfig +1 -1
index 58cf8c40d08d..9f52227c3cce 100644
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
-if SOC_SIFIVE
+if ARCH_SIFIVE
 
 config SIFIVE_L2
 	bool "Sifive L2 Cache controller"
Signature · 7 lines
2.37.3


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

RFC 13/27 clk: sifive: convert SOC_SIFIVE to ARCH_SIFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC we decided to convert all of the SOC_ symbols in arch/riscv to ARCH_ for consistency between "incumbent" vendors and those with a legacy from other architectures. To that end, swap SOC_SIFIVE for ARCH_SIFIVE & depend on it rather than RISCV.

---
 drivers/clk/sifive/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sifive/Kconfig +1 -1
index 9132c3c4aa86..b21f4cbc3583 100644
@@ -2,7 +2,7 @@
 
 menuconfig CLK_SIFIVE
 	bool "SiFive SoC driver support"
-	depends on RISCV || COMPILE_TEST
+	depends on ARCH_SIFIVE || COMPILE_TEST
 	help
 	  SoC drivers for SiFive Linux-capable SoCs.
 
Signature · 7 lines
2.37.3


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

RFC 14/27 clk: sifive: select by default if ARCH_SIFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

With the aim of dropping direct selects of drivers from Kconfig.socs, default the SiFive clock drivers to the value of ARCH_SIFIVE.

---
 drivers/clk/sifive/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/sifive/Kconfig +2 -0
index b21f4cbc3583..2322f634a910 100644
@@ -3,6 +3,7 @@
 menuconfig CLK_SIFIVE
 	bool "SiFive SoC driver support"
 	depends on ARCH_SIFIVE || COMPILE_TEST
+	default ARCH_SIFIVE
 	help
 	  SoC drivers for SiFive Linux-capable SoCs.
 
@@ -10,6 +11,7 @@ if CLK_SIFIVE
 
 config CLK_SIFIVE_PRCI
 	bool "PRCI driver for SiFive SoCs"
+	default ARCH_SIFIVE
 	select RESET_CONTROLLER
 	select RESET_SIMPLE
 	select CLK_ANALOGBITS_WRPLL_CLN28HPC
Signature · 7 lines
2.37.3


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

RFC 16/27 PCI: dwc: fu740: convert SOC_SIFIVE to ARCH_SIFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC we decided to convert all of the SOC_ symbols in arch/riscv to ARCH_ for consistency between "incumbent" vendors and those with a legacy from other architectures. To that end, swap SOC_SIFIVE for ARCH_SIFIVE & depend on it rather than RISCV.

---
 drivers/pci/controller/dwc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/Kconfig +1 -1
index 62ce3abf0f19..b42a246a68cd 100644
@@ -378,7 +378,7 @@ config PCIE_AL
 config PCIE_FU740
 	bool "SiFive FU740 PCIe host controller"
 	depends on PCI_MSI_IRQ_DOMAIN
-	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.37.3


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

RFC 15/27 serial: sifive: select by default if ARCH_SIFIVE

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

With the aim of dropping direct selects of drivers from Kconfig.socs, default the SiFive serial drivers to the value of ARCH_SIFIVE.

---
 drivers/tty/serial/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/Kconfig +2 -0
index 2a18a42a5004..daadcfe2703c 100644
@@ -972,6 +972,7 @@ config SERIAL_OMAP_CONSOLE
 config SERIAL_SIFIVE
 	tristate "SiFive UART support"
 	depends on OF
+	default ARCH_SIFIVE
 	select SERIAL_CORE
 	help
 	  Select this option if you are building a kernel for a device that
@@ -981,6 +982,7 @@ config SERIAL_SIFIVE
 config SERIAL_SIFIVE_CONSOLE
 	bool "Console on SiFive UART"
 	depends on SERIAL_SIFIVE=y
+	default ARCH_SIFIVE
 	select SERIAL_CORE_CONSOLE
 	select SERIAL_EARLYCON
 	help
Signature · 7 lines
2.37.3


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

RFC 17/27 riscv: stop selecting SiFive clock and serial drivers directly

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

The SiFive clock and serial drivers will now default to the value of ARCH_SIFIVE so there is no need to directly select their symbols anymore.

---
 arch/riscv/Kconfig.socs | 4 ----
 1 file changed, 4 deletions(-)
arch/riscv/Kconfig.socs +0 -4
index 3604b90251b4..811338720cbd 100644
@@ -8,10 +8,6 @@ config ARCH_MICROCHIP
 
 config ARCH_SIFIVE
 	bool "SiFive SoCs"
-	select SERIAL_SIFIVE if TTY
-	select SERIAL_SIFIVE_CONSOLE if TTY
-	select CLK_SIFIVE
-	select CLK_SIFIVE_PRCI
 	select SIFIVE_PLIC
 	select ERRATA_SIFIVE if !XIP_KERNEL
 	help
Signature · 7 lines
2.37.3


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

RFC 18/27 riscv: convert SOC_VIRT to ARCH_VIRT

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As per discussion at LPC, the SOC_ prefaced symbols are to be converted to an ARCH_ prefix for consistency between "incumbent" vendors and those with a legacy in other architectures. Rename SOC_VIRT to ARCH_VIRT.

---
 arch/riscv/Kconfig.socs                 | 2 +-
 arch/riscv/configs/defconfig            | 2 +-
 arch/riscv/configs/nommu_virt_defconfig | 2 +-
 arch/riscv/configs/rv32_defconfig       | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
arch/riscv/Kconfig.socs +1 -1
index 811338720cbd..9a216deb5c9c 100644
@@ -21,7 +21,7 @@ config ARCH_STARFIVE
 	help
 	  This enables support for StarFive SoC platform hardware.
 
-config SOC_VIRT
+config ARCH_VIRT
 	bool "QEMU Virt Machine"
 	select CLINT_TIMER if RISCV_M_MODE
 	select POWER_RESET
arch/riscv/configs/defconfig +1 -1
index bfb6f6f57ae2..341202b90c7f 100644
@@ -28,7 +28,7 @@ CONFIG_PROFILING=y
 CONFIG_ARCH_MICROCHIP_POLARFIRE=y
 CONFIG_ARCH_SIFIVE=y
 CONFIG_ARCH_STARFIVE=y
-CONFIG_SOC_VIRT=y
+CONFIG_ARCH_VIRT=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_PM=y
arch/riscv/configs/nommu_virt_defconfig +1 -1
index 1a56eda5ce46..9ad6a182d932 100644
@@ -24,7 +24,7 @@ CONFIG_EXPERT=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_SLOB=y
 # CONFIG_MMU is not set
-CONFIG_SOC_VIRT=y
+CONFIG_ARCH_VIRT=y
 CONFIG_NONPORTABLE=y
 CONFIG_SMP=y
 CONFIG_CMDLINE="root=/dev/vda rw earlycon=uart8250,mmio,0x10000000,115200n8 console=ttyS0"
arch/riscv/configs/rv32_defconfig +1 -1
index 4badab395546..ffa5e8f05ae6 100644
@@ -17,7 +17,7 @@ CONFIG_EXPERT=y
 # CONFIG_SYSFS_SYSCALL is not set
 CONFIG_PROFILING=y
 CONFIG_ARCH_SIFIVE=y
-CONFIG_SOC_VIRT=y
+CONFIG_ARCH_VIRT=y
 CONFIG_NONPORTABLE=y
 CONFIG_ARCH_RV32I=y
 CONFIG_SMP=y
Signature · 7 lines
2.37.3


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

RFC 19/27 kunit: tool: rename SOC_VIRT to ARCH_VIRT in riscv's QEMU config

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC we decided to convert all of the SOC_ symbols in arch/riscv to ARCH_ for consistency between "incumbent" vendors and those with a legacy from other architectures. To that end, swap SOC_VIRT for ARCH_VIRT.

---
 tools/testing/kunit/qemu_configs/riscv.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/kunit/qemu_configs/riscv.py +1 -1
index 6207be146d26..ab24b5b1be38 100644
@@ -17,7 +17,7 @@ if not os.path.isfile(OPENSBI_FILE):
 
 QEMU_ARCH = QemuArchParams(linux_arch='riscv',
 			   kconfig='''
-CONFIG_SOC_VIRT=y
+CONFIG_ARCH_VIRT=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
Signature · 7 lines
2.37.3


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

RFC 20/27 wireguard: selftests: swap SOC_VIRT for ARCH_VIRT on riscv

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

At LPC we decided to convert all of the SOC_ symbols in arch/riscv to ARCH_ for consistency between "incumbent" vendors and those with a legacy from other architectures. To that end, swap SOC_VIRT for ARCH_VIRT.

---
 tools/testing/selftests/wireguard/qemu/arch/riscv32.config | 2 +-
 tools/testing/selftests/wireguard/qemu/arch/riscv64.config | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/wireguard/qemu/arch/riscv32.config +1 -1
index 2fc36efb166d..2500eaa9b469 100644
@@ -2,7 +2,7 @@ CONFIG_NONPORTABLE=y
 CONFIG_ARCH_RV32I=y
 CONFIG_MMU=y
 CONFIG_FPU=y
-CONFIG_SOC_VIRT=y
+CONFIG_ARCH_VIRT=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
tools/testing/selftests/wireguard/qemu/arch/riscv64.config +1 -1
index dc266f3b1915..29a67ac67766 100644
@@ -1,7 +1,7 @@
 CONFIG_ARCH_RV64I=y
 CONFIG_MMU=y
 CONFIG_FPU=y
-CONFIG_SOC_VIRT=y
+CONFIG_ARCH_VIRT=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
Signature · 7 lines
2.37.3


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

RFC 21/27 riscv: convert SOC_CANAAN to ARCH_CANAAN

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As per the discussions at LPC, the SOC_ symbols in Kconfig.socs are to be converted to ARCH_ for consistency between "incumbent" and incoming vendors who have a legacy in other architectures. SOC_CANAAN therefore becomes ARCH_CANAAN.

---
 arch/riscv/Kconfig.socs                        | 16 ++++++++--------
 arch/riscv/Makefile                            |  2 +-
 arch/riscv/boot/dts/Makefile                   |  2 +-
 arch/riscv/boot/dts/canaan/Makefile            | 14 +++++++-------
 arch/riscv/configs/nommu_k210_defconfig        |  2 +-
 arch/riscv/configs/nommu_k210_sdcard_defconfig |  2 +-
 6 files changed, 19 insertions(+), 19 deletions(-)
arch/riscv/Kconfig.socs +8 -8
index 9a216deb5c9c..f195cae638c0 100644
@@ -36,7 +36,7 @@ config ARCH_VIRT
 	help
 	  This enables support for QEMU Virt Machine.
 
-config SOC_CANAAN
+config ARCH_CANAAN
 	bool "Canaan Kendryte K210 SoC"
 	depends on !MMU
 	select CLINT_TIMER if RISCV_M_MODE
@@ -50,11 +50,11 @@ config SOC_CANAAN
 	help
 	  This enables support for Canaan Kendryte K210 SoC platform hardware.
 
-if SOC_CANAAN
+if ARCH_CANAAN
 
-config SOC_CANAAN_K210_DTB_BUILTIN
+config ARCH_CANAAN_K210_DTB_BUILTIN
 	bool "Builtin device tree for the Canaan Kendryte K210"
-	depends on SOC_CANAAN
+	depends on ARCH_CANAAN
 	default y
 	select OF
 	select BUILTIN_DTB
@@ -63,16 +63,16 @@ config SOC_CANAAN_K210_DTB_BUILTIN
 	  This option should be selected if no bootloader is being used.
 	  If unsure, say Y.
 
-config SOC_CANAAN_K210_DTB_SOURCE
+config ARCH_CANAAN_K210_DTB_SOURCE
 	string "Source file for the Canaan Kendryte K210 builtin DTB"
-	depends on SOC_CANAAN
-	depends on SOC_CANAAN_K210_DTB_BUILTIN
+	depends on ARCH_CANAAN
+	depends on ARCH_CANAAN_K210_DTB_BUILTIN
 	default "k210_generic"
 	help
 	  Base name (without suffix, relative to arch/riscv/boot/dts/canaan)
 	  for the DTS file that will be used to produce the DTB linked into the
 	  kernel.
 
-endif # SOC_CANAAN
+endif # ARCH_CANAAN
 
 endmenu # "SoC selection"
arch/riscv/Makefile +1 -1
index e013df8e7b8b..e4d448da2a18 100644
@@ -131,7 +131,7 @@ endif
 endif
 
 ifneq ($(CONFIG_XIP_KERNEL),y)
-ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_SOC_CANAAN),yy)
+ifeq ($(CONFIG_RISCV_M_MODE)$(CONFIG_ARCH_CANAAN),yy)
 KBUILD_IMAGE := $(boot)/loader.bin
 else
 KBUILD_IMAGE := $(boot)/Image.gz
arch/riscv/boot/dts/Makefile +1 -1
index ff174996cdfd..fc791600e347 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 subdir-y += sifive
 subdir-y += starfive
-subdir-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += canaan
+subdir-$(CONFIG_ARCH_CANAAN_K210_DTB_BUILTIN) += canaan
 subdir-y += microchip
 
 obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix /, $(subdir-y))
arch/riscv/boot/dts/canaan/Makefile +7 -7
index befe4eb7527b..520623264c87 100644
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_SOC_CANAAN) += canaan_kd233.dtb
-dtb-$(CONFIG_SOC_CANAAN) += k210_generic.dtb
-dtb-$(CONFIG_SOC_CANAAN) += sipeed_maix_bit.dtb
-dtb-$(CONFIG_SOC_CANAAN) += sipeed_maix_dock.dtb
-dtb-$(CONFIG_SOC_CANAAN) += sipeed_maix_go.dtb
-dtb-$(CONFIG_SOC_CANAAN) += sipeed_maixduino.dtb
+dtb-$(CONFIG_ARCH_CANAAN) += canaan_kd233.dtb
+dtb-$(CONFIG_ARCH_CANAAN) += k210_generic.dtb
+dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_bit.dtb
+dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_dock.dtb
+dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_go.dtb
+dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maixduino.dtb
 
-obj-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .dtb.o, $(CONFIG_SOC_CANAAN_K210_DTB_SOURCE))
+obj-$(CONFIG_ARCH_CANAAN_K210_DTB_BUILTIN) += $(addsuffix .dtb.o, $(CONFIG_ARCH_CANAAN_K210_DTB_SOURCE))
arch/riscv/configs/nommu_k210_defconfig +1 -1
index 96fe8def644c..f14fe314e2d2 100644
@@ -27,7 +27,7 @@ CONFIG_EMBEDDED=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_SLOB=y
 # CONFIG_MMU is not set
-CONFIG_SOC_CANAAN=y
+CONFIG_ARCH_CANAAN=y
 CONFIG_NONPORTABLE=y
 CONFIG_SMP=y
 CONFIG_NR_CPUS=2
arch/riscv/configs/nommu_k210_sdcard_defconfig +1 -1
index 379740654373..15ec3bac4745 100644
@@ -19,7 +19,7 @@ CONFIG_EMBEDDED=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_SLOB=y
 # CONFIG_MMU is not set
-CONFIG_SOC_CANAAN=y
+CONFIG_ARCH_CANAAN=y
 CONFIG_NONPORTABLE=y
 CONFIG_SMP=y
 CONFIG_NR_CPUS=2
Signature · 7 lines
2.37.3


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

RFC 22/27 clk: k210: convert SOC_CANAAN to ARCH_CANAAN

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As per the discussions at LPC, the SOC_ symbols in Kconfig.socs are to be converted to ARCH_ for consistency between "incumbent" and incoming vendors who have a legacy in other architectures.

Convert the SOC_CANAAN dependancy to ARCH_CANAAN. Since ARCH_CANAAN is only defined on RISC-V, the Kconfig dependancy on RISCV can be dropped.

---
 drivers/clk/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/Kconfig +2 -2
index 48f8f4221e21..68477aa6fcbe 100644
@@ -423,8 +423,8 @@ config COMMON_CLK_FIXED_MMIO
 
 config COMMON_CLK_K210
 	bool "Clock driver for the Canaan Kendryte K210 SoC"
-	depends on OF && RISCV && SOC_CANAAN
-	default SOC_CANAAN
+	depends on OF && ARCH_CANAAN
+	default ARCH_CANAAN
 	help
 	  Support for the Canaan Kendryte K210 RISC-V SoC clocks.
 
Signature · 7 lines
2.37.3


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

RFC 23/27 pinctrl: k210: convert SOC_CANAAN to ARCH_CANAAN

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As per the discussions at LPC, the SOC_ symbols in Kconfig.socs are to be converted to ARCH_ for consistency between "incumbent" and incoming vendors who have a legacy in other architectures.

Convert the SOC_CANAAN dependancy to ARCH_CANAAN. Since ARCH_CANAAN is only defined on RISC-V, the Kconfig dependancy on RISCV can be dropped.

---
 drivers/pinctrl/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/Kconfig +2 -2
index 8862a71de8af..82dfc8c208e1 100644
@@ -217,13 +217,13 @@ config PINCTRL_INGENIC
 
 config PINCTRL_K210
 	bool "Pinctrl driver for the Canaan Kendryte K210 SoC"
-	depends on RISCV && SOC_CANAAN && OF
+	depends on ARCH_CANAAN && OF
 	select GENERIC_PINMUX_FUNCTIONS
 	select GENERIC_PINCONF
 	select GPIOLIB
 	select OF_GPIO
 	select REGMAP_MMIO
-	default SOC_CANAAN
+	default ARCH_CANAAN
 	help
 	  Add support for the Canaan Kendryte K210 RISC-V SOC Field
 	  Programmable IO Array (FPIOA) controller.
Signature · 7 lines
2.37.3


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

RFC 25/27 reset: k210: convert SOC_CANAAN to ARCH_CANAAN

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As per the discussions at LPC, the SOC_ symbols in Kconfig.socs are to be converted to ARCH_ for consistency between "incumbent" and incoming vendors who have a legacy in other architectures.

Convert the SOC_CANAAN dependancy to ARCH_CANAAN. Since ARCH_CANAAN is only defined on RISC-V, the Kconfig dependancy on RISCV can be dropped.

---
 drivers/reset/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/reset/Kconfig +2 -2
index a69bd6ef3110..576190fbe544 100644
@@ -94,9 +94,9 @@ config RESET_INTEL_GW
 
 config RESET_K210
 	bool "Reset controller driver for Canaan Kendryte K210 SoC"
-	depends on (SOC_CANAAN || COMPILE_TEST) && OF
+	depends on (ARCH_CANAAN || COMPILE_TEST) && OF
 	select MFD_SYSCON
-	default SOC_CANAAN
+	default ARCH_CANAAN
 	help
 	  Support for the Canaan Kendryte K210 RISC-V SoC reset controller.
 	  Say Y if you want to control reset signals provided by this
Signature · 7 lines
2.37.3


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

RFC 24/27 soc: k210: convert SOC_CANAAN to ARCH_CANAAN

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

As per the discussions at LPC, the SOC_ symbols in Kconfig.socs are to be converted to ARCH_ for consistency between "incumbent" and incoming vendors who have a legacy in other architectures.

Convert the SOC_CANAAN dependancy to ARCH_CANAAN. Since ARCH_CANAAN is only defined on RISC-V, the Kconfig dependancy on RISCV can be dropped.

---
 drivers/soc/Makefile       | 2 +-
 drivers/soc/canaan/Kconfig | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/soc/Makefile +1 -1
index 534669840858..2a3504c9d21f 100644
@@ -8,7 +8,7 @@ obj-y				+= apple/
 obj-y				+= aspeed/
 obj-$(CONFIG_ARCH_AT91)		+= atmel/
 obj-y				+= bcm/
-obj-$(CONFIG_SOC_CANAAN)	+= canaan/
+obj-$(CONFIG_ARCH_CANAAN)	+= canaan/
 obj-$(CONFIG_ARCH_DOVE)		+= dove/
 obj-$(CONFIG_MACH_DOVE)		+= dove/
 obj-y				+= fsl/
drivers/soc/canaan/Kconfig +2 -2
index 2527cf5757ec..cdeade6040b4 100644
@@ -2,8 +2,8 @@
 
 config SOC_K210_SYSCTL
 	bool "Canaan Kendryte K210 SoC system controller"
-	depends on RISCV && SOC_CANAAN && OF
-	default SOC_CANAAN
+	depends on ARCH_CANAAN && OF
+	default ARCH_CANAAN
         select PM
         select MFD_SYSCON
 	help
Signature · 7 lines
2.37.3


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

RFC 26/27 serial: sifive: select by default if ARCH_CANAAN

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

With the aim of dropping direct selects of drivers from Kconfig.socs, default the SiFive serial drivers to enabled if ARCH_CANAAN.

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


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

RFC 27/27 riscv: stop directly selecting drivers for ARCH_CANAAN

In reply to Conor Dooley

From: Conor Dooley <[email protected]>

The serial and clock drivers will be enabled by default if the symbol itself is enabled, so stop directly selecting the drivers in Kconfigs.socs.

---
 arch/riscv/Kconfig.socs | 3 ---
 1 file changed, 3 deletions(-)
arch/riscv/Kconfig.socs +0 -3
index f195cae638c0..377f484cee09 100644
@@ -40,13 +40,10 @@ config ARCH_CANAAN
 	bool "Canaan Kendryte K210 SoC"
 	depends on !MMU
 	select CLINT_TIMER if RISCV_M_MODE
-	select SERIAL_SIFIVE if TTY
-	select SERIAL_SIFIVE_CONSOLE if TTY
 	select SIFIVE_PLIC
 	select ARCH_HAS_RESET_CONTROLLER
 	select PINCTRL
 	select COMMON_CLK
-	select COMMON_CLK_K210
 	help
 	  This enables support for Canaan Kendryte K210 SoC platform hardware.
 
Signature · 7 lines
2.37.3


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
author maintainer
#35 lore raw
In reply to Conor Dooley

+CC Geert whose email I typo'd...

Quoted 87 lines · Conor Dooley

From: Conor Dooley <[email protected]>

Following on from LPC, here's the start of my efforts to clean up Kconfig.socs.

My preference would be to take the whole thing through the RISC-V tree for v6.2 to make things a bit less fiddly, but I am sending this as an RFC in the hopes of getting some opinions on how the series should be split up & merged. I guess it would always be possible to create a few immutable branches for the individual subsystems that are being modified & take the series through the riscv tree unless we hit a conflict in -next. Obiviously for that route, maintainer acks will be needed.

The only SoCs I have, at the moment ;), are the jh7100, mpfs, fu540 and the k210 so I've given those a whirl to make sure I didn't break something.

I have also yet to deal with ARCH_VIRT, but just throwing this out for some opinions on how to apply/split up the set before finalising a v1.

I've CCed a few people that may have an opinion here, but anyone that has an opinion here - please shout!

One other point, is it worth adding something to the patch acceptance policy to say "do your kconfig xyz way" or is that not something that's worth doing since it is easy to push people in the right direction during review?

The series is currently on top of:
https://lore.kernel.org/all/[email protected]/

Thanks,
Conor.

Conor Dooley (27):
clk: microchip: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
i2c: microchip-corei2c: replace SOC_MICROCHIP_POLARFIRE with
ARCH_MICROCHIP
mailbox: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
usb: musb: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
rtc: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
riscv: stop selecting the PolarFire SoC clock driver
riscv: replace SOC_STARFIVE with ARCH_STARFIVE
clk: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
pinctrl: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
reset: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
riscv: replace SOC_SIFIVE with ARCH_SIFIVE
soc: sifive: convert SOC_SIFIVE to ARCH_SIFIVE
clk: sifive: convert SOC_SIFIVE to ARCH_SIFIVE
clk: sifive: select by default if ARCH_SIFIVE
serial: sifive: select by default if ARCH_SIFIVE
PCI: dwc: fu740: convert SOC_SIFIVE to ARCH_SIFIVE
riscv: stop selecting SiFive clock and serial drivers directly
riscv: convert SOC_VIRT to ARCH_VIRT
kunit: tool: rename SOC_VIRT to ARCH_VIRT in riscv's QEMU config
wireguard: selftests: swap SOC_VIRT for ARCH_VIRT on riscv
riscv: convert SOC_CANAAN to ARCH_CANAAN
clk: k210: convert SOC_CANAAN to ARCH_CANAAN
pinctrl: k210: convert SOC_CANAAN to ARCH_CANAAN
soc: k210: convert SOC_CANAAN to ARCH_CANAAN
reset: k210: convert SOC_CANAAN to ARCH_CANAAN
serial: sifive: select by default if ARCH_CANAAN
riscv: stop directly selecting drivers for ARCH_CANAAN

 arch/riscv/Kconfig.socs                       | 30 +++++++------------
 arch/riscv/Makefile                           |  2 +-
 arch/riscv/boot/dts/Makefile                  |  2 +-
 arch/riscv/boot/dts/canaan/Makefile           | 14 ++++-----
 arch/riscv/boot/dts/sifive/Makefile           |  2 +-
 arch/riscv/boot/dts/starfive/Makefile         |  2 +-
 arch/riscv/configs/defconfig                  |  6 ++--
 arch/riscv/configs/nommu_k210_defconfig       |  2 +-
 .../riscv/configs/nommu_k210_sdcard_defconfig |  2 +-
 arch/riscv/configs/nommu_virt_defconfig       |  2 +-
 arch/riscv/configs/rv32_defconfig             |  4 +--
 drivers/clk/Kconfig                           |  4 +--
 drivers/clk/Makefile                          |  2 +-
 drivers/clk/microchip/Kconfig                 |  3 +-
 drivers/clk/sifive/Kconfig                    |  4 ++-
 drivers/clk/starfive/Kconfig                  |  6 ++--
 drivers/i2c/busses/Kconfig                    |  2 +-
 drivers/mailbox/Kconfig                       |  2 +-
 drivers/pci/controller/dwc/Kconfig            |  2 +-
 drivers/pinctrl/Kconfig                       |  8 ++---
 drivers/reset/Kconfig                         |  8 ++---
 drivers/rtc/Kconfig                           |  2 +-
 drivers/soc/Makefile                          |  4 +--
Quoted 17 lines
 drivers/soc/canaan/Kconfig                    |  4 +--
 drivers/soc/sifive/Kconfig                    |  2 +-
 drivers/tty/serial/Kconfig                    |  2 ++
 drivers/usb/musb/Kconfig                      |  2 +-
 tools/testing/kunit/qemu_configs/riscv.py     |  2 +-
 .../wireguard/qemu/arch/riscv32.config        |  2 +-
 .../wireguard/qemu/arch/riscv64.config        |  2 +-
 30 files changed, 64 insertions(+), 67 deletions(-)
Signature · 7 lines
2.37.3


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

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

#10 lore raw

Re: [RFC 07/27] riscv: replace SOC_STARFIVE with ARCH_STARFIVE

In reply to Conor Dooley

Hi Conor,

Am Freitag, 23. September 2022, 20:55:46 CEST schrieb Conor Dooley:

Quoted 20 lines

From: Conor Dooley <[email protected]>

As discussed at LPC, the SOC_ symbols are being converted to ARCH_ for the sake of consistency between "incumbent" vendors and those who have a legacy from other archs.

Convert SOC_STARFIVE to ARCH_STARFIVE across arch/riscv

---
 arch/riscv/Kconfig.socs               | 2 +-
 arch/riscv/boot/dts/starfive/Makefile | 2 +-
 arch/riscv/configs/defconfig          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/Kconfig.socs +0 -0
index c4c7add1516f..910697baf097 100644

arch/riscv/Kconfig.socs config SOC_SIFIVE · line 20

Quoted 5 lines
arch/riscv/Kconfig.socs +1 -1
@@ -17,7 +17,7 @@ config SOC_SIFIVE
 	help
 	  This enables support for SiFive SoC platform hardware.
 
-config SOC_STARFIVE
+config ARCH_STARFIVE

doesn't this create a bisection issue?
I.e. the clk-Makefile in the following patch will still do

	obj-$(CONFIG_SOC_STARFIVE)             += starfive/

at this point, so if a git bisect lands here, you stop building the clock-driver (and maybe more).

I guess some intermediate solution might be helpful, like introduce the ARCH_STARFIVE and make SOC_STARFIVE select it. Then do the conversions and after that drop SOC_STARFIVE?

Heiko

Quoted 17 lines
arch/riscv/Kconfig.socs +0 -0
 	bool "StarFive SoCs"
 	select PINCTRL
 	select RESET_CONTROLLER
arch/riscv/boot/dts/starfive/Makefile +1 -1
index 039c143cba33..7b00a48580ca 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
+dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
arch/riscv/configs/defconfig +0 -0
index dac14b95c73d..971986be875f 100644

arch/riscv/configs/defconfig CONFIG_EXPERT=y · line 33

Quoted 8 lines
arch/riscv/configs/defconfig +1 -1
@@ -27,7 +27,7 @@ CONFIG_EXPERT=y
 CONFIG_PROFILING=y
 CONFIG_ARCH_MICROCHIP_POLARFIRE=y
 CONFIG_SOC_SIFIVE=y
-CONFIG_SOC_STARFIVE=y
+CONFIG_ARCH_STARFIVE=y
 CONFIG_SOC_VIRT=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y

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

author maintainer
#11 lore raw

Re: [RFC 07/27] riscv: replace SOC_STARFIVE with ARCH_STARFIVE

Quoted 26 lines · Heiko Stuebner

Hi Conor,

Am Freitag, 23. September 2022, 20:55:46 CEST schrieb Conor Dooley:

Quoted 23 lines

From: Conor Dooley <[email protected]>

As discussed at LPC, the SOC_ symbols are being converted to ARCH_ for the sake of consistency between "incumbent" vendors and those who have a legacy from other archs.

Convert SOC_STARFIVE to ARCH_STARFIVE across arch/riscv

---
 arch/riscv/Kconfig.socs               | 2 +-
 arch/riscv/boot/dts/starfive/Makefile | 2 +-
 arch/riscv/configs/defconfig          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/Kconfig.socs +0 -0
index c4c7add1516f..910697baf097 100644
@@ -17,7 +17,7 @@ config SOC_SIFIVE
 	help
 	  This enables support for SiFive SoC platform hardware.
 
Quoted 4 lines

arch/riscv/Kconfig.socs config SOC_SIFIVE · line 20

Quoted 2 lines
arch/riscv/Kconfig.socs +1 -1
-config SOC_STARFIVE
+config ARCH_STARFIVE

doesn't this create a bisection issue?

Yeah, I thought of that midway through and then promptly forgot about it... I'll sort it out for v1.

Thanks.

Quoted 45 lines

I.e. the clk-Makefile in the following patch will still do

	obj-$(CONFIG_SOC_STARFIVE)             += starfive/

at this point, so if a git bisect lands here, you stop building the clock-driver (and maybe more).

I guess some intermediate solution might be helpful, like introduce the ARCH_STARFIVE and make SOC_STARFIVE select it. Then do the conversions and after that drop SOC_STARFIVE?

Heiko

Quoted 17 lines
arch/riscv/Kconfig.socs +0 -0
 	bool "StarFive SoCs"
 	select PINCTRL
 	select RESET_CONTROLLER
arch/riscv/boot/dts/starfive/Makefile +1 -1
index 039c143cba33..7b00a48580ca 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
+dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
arch/riscv/configs/defconfig +0 -0
index dac14b95c73d..971986be875f 100644

arch/riscv/configs/defconfig CONFIG_EXPERT=y · line 33

Quoted 8 lines
arch/riscv/configs/defconfig +1 -1
@@ -27,7 +27,7 @@ CONFIG_EXPERT=y
 CONFIG_PROFILING=y
 CONFIG_ARCH_MICROCHIP_POLARFIRE=y
 CONFIG_SOC_SIFIVE=y
-CONFIG_SOC_STARFIVE=y
+CONFIG_ARCH_STARFIVE=y
 CONFIG_SOC_VIRT=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
Quoted 4 lines

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

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

#12 lore raw

Re: [RFC 07/27] riscv: replace SOC_STARFIVE with ARCH_STARFIVE

Am Freitag, 23. September 2022, 21:14:58 CEST schrieb Conor Dooley:

Quoted 27 lines · Heiko Stuebner
Quoted 26 lines

Hi Conor,

Am Freitag, 23. September 2022, 20:55:46 CEST schrieb Conor Dooley:

Quoted 23 lines

From: Conor Dooley <[email protected]>

As discussed at LPC, the SOC_ symbols are being converted to ARCH_ for the sake of consistency between "incumbent" vendors and those who have a legacy from other archs.

Convert SOC_STARFIVE to ARCH_STARFIVE across arch/riscv

---
 arch/riscv/Kconfig.socs               | 2 +-
 arch/riscv/boot/dts/starfive/Makefile | 2 +-
 arch/riscv/configs/defconfig          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/Kconfig.socs +0 -0
index c4c7add1516f..910697baf097 100644
@@ -17,7 +17,7 @@ config SOC_SIFIVE
 	help
 	  This enables support for SiFive SoC platform hardware.
 
Quoted 7 lines
Quoted 4 lines

arch/riscv/Kconfig.socs config SOC_SIFIVE · line 20

Quoted 2 lines
arch/riscv/Kconfig.socs +1 -1
-config SOC_STARFIVE
+config ARCH_STARFIVE

doesn't this create a bisection issue?

Yeah, I thought of that midway through and then promptly forgot about it... I'll sort it out for v1.

It's of course the same for sifive and probably more.

ARCH_MICROCHIP was pre-existing in your series, so that transistion goes way smoother - though I haven't been able to find where that symbol actually got added :-) .

I.e. in Palmers next branchs the symbol is still SOC_MICROCHIP_POLARFIRE

Heiko

Quoted 41 lines
Quoted 41 lines

I.e. the clk-Makefile in the following patch will still do

	obj-$(CONFIG_SOC_STARFIVE)             += starfive/

at this point, so if a git bisect lands here, you stop building the clock-driver (and maybe more).

I guess some intermediate solution might be helpful, like introduce the ARCH_STARFIVE and make SOC_STARFIVE select it. Then do the conversions and after that drop SOC_STARFIVE?

Heiko

Quoted 25 lines
arch/riscv/Kconfig.socs +0 -0
 	bool "StarFive SoCs"
 	select PINCTRL
 	select RESET_CONTROLLER
arch/riscv/boot/dts/starfive/Makefile +1 -1
index 039c143cba33..7b00a48580ca 100644
@@ -1,2 +1,2 @@
 # SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
+dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
arch/riscv/configs/defconfig +1 -1
index dac14b95c73d..971986be875f 100644
@@ -27,7 +27,7 @@ CONFIG_EXPERT=y
 CONFIG_PROFILING=y
 CONFIG_ARCH_MICROCHIP_POLARFIRE=y
 CONFIG_SOC_SIFIVE=y
-CONFIG_SOC_STARFIVE=y
+CONFIG_ARCH_STARFIVE=y
 CONFIG_SOC_VIRT=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
Quoted 9 lines
Quoted 8 lines

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

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

author maintainer
#13 lore raw

Re: [RFC 07/27] riscv: replace SOC_STARFIVE with ARCH_STARFIVE

Quoted 36 lines · Heiko Stuebner

Am Freitag, 23. September 2022, 21:14:58 CEST schrieb Conor Dooley:

Quoted 27 lines · Heiko Stuebner
Quoted 26 lines

Hi Conor,

Am Freitag, 23. September 2022, 20:55:46 CEST schrieb Conor Dooley:

Quoted 23 lines

From: Conor Dooley <[email protected]>

As discussed at LPC, the SOC_ symbols are being converted to ARCH_ for the sake of consistency between "incumbent" vendors and those who have a legacy from other archs.

Convert SOC_STARFIVE to ARCH_STARFIVE across arch/riscv

---
 arch/riscv/Kconfig.socs               | 2 +-
 arch/riscv/boot/dts/starfive/Makefile | 2 +-
 arch/riscv/configs/defconfig          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/riscv/Kconfig.socs +0 -0
index c4c7add1516f..910697baf097 100644
@@ -17,7 +17,7 @@ config SOC_SIFIVE
 	help
 	  This enables support for SiFive SoC platform hardware.
 
Quoted 7 lines
Quoted 4 lines

arch/riscv/Kconfig.socs config SOC_SIFIVE · line 20

Quoted 2 lines
arch/riscv/Kconfig.socs +1 -1
-config SOC_STARFIVE
+config ARCH_STARFIVE

doesn't this create a bisection issue?

Yeah, I thought of that midway through and then promptly forgot about it... I'll sort it out for v1.

Quoted 7 lines

It's of course the same for sifive and probably more.

ARCH_MICROCHIP was pre-existing in your series, so that transistion goes way smoother - though I haven't been able to find where that symbol actually got added :-) .

I.e. in Palmers next branchs the symbol is still SOC_MICROCHIP_POLARFIRE

Ah for god's sake, I gave the wrong hash to format-patch lol.

I didn't check carefully to be honest as I wasn't too concerned about the content and more about how I would break the series up!

I am glad I said RFC...

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

maintainer Acked-by on v1 20/27
#27 lore raw

Re: [RFC 20/27] wireguard: selftests: swap SOC_VIRT for ARCH_VIRT on riscv

In reply to Conor Dooley
Quoted 8 lines · Conor Dooley

From: Conor Dooley <[email protected]>

At LPC we decided to convert all of the SOC_ symbols in arch/riscv to ARCH_ for consistency between "incumbent" vendors and those with a legacy from other architectures. To that end, swap SOC_VIRT for ARCH_VIRT.

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

#36 lore raw
In reply to Conor Dooley
Quoted 23 lines · Conor Dooley

From: Conor Dooley <[email protected]>

Following on from LPC, here's the start of my efforts to clean up Kconfig.socs.

My preference would be to take the whole thing through the RISC-V tree for v6.2 to make things a bit less fiddly, but I am sending this as an RFC in the hopes of getting some opinions on how the series should be split up & merged. I guess it would always be possible to create a few immutable branches for the individual subsystems that are being modified & take the series through the riscv tree unless we hit a conflict in -next. Obiviously for that route, maintainer acks will be needed.

The only SoCs I have, at the moment ;), are the jh7100, mpfs, fu540 and the k210 so I've given those a whirl to make sure I didn't break something.

I have also yet to deal with ARCH_VIRT, but just throwing this out for some opinions on how to apply/split up the set before finalising a v1.

I've CCed a few people that may have an opinion here, but anyone that has an opinion here - please shout!

Quoted 7 lines

One other point, is it worth adding something to the patch acceptance policy to say "do your kconfig xyz way" or is that not something that's worth doing since it is easy to push people in the right direction during review?

The series is currently on top of:
https://lore.kernel.org/all/[email protected]/

It is not very nice to change the config option names as that can break user build environments, e.g. buildroot setups that have tweaked kernel configs.

What's wrong with the SOC_XXX names ? Changing these to ARCH_XXX is weird since the ARCH prefix is generally used for ISA differentiation rather than boards/SoCs.

Quoted 66 lines

Thanks,
Conor.

Conor Dooley (27):
clk: microchip: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
i2c: microchip-corei2c: replace SOC_MICROCHIP_POLARFIRE with
ARCH_MICROCHIP
mailbox: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
usb: musb: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
rtc: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
riscv: stop selecting the PolarFire SoC clock driver
riscv: replace SOC_STARFIVE with ARCH_STARFIVE
clk: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
pinctrl: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
reset: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
riscv: replace SOC_SIFIVE with ARCH_SIFIVE
soc: sifive: convert SOC_SIFIVE to ARCH_SIFIVE
clk: sifive: convert SOC_SIFIVE to ARCH_SIFIVE
clk: sifive: select by default if ARCH_SIFIVE
serial: sifive: select by default if ARCH_SIFIVE
PCI: dwc: fu740: convert SOC_SIFIVE to ARCH_SIFIVE
riscv: stop selecting SiFive clock and serial drivers directly
riscv: convert SOC_VIRT to ARCH_VIRT
kunit: tool: rename SOC_VIRT to ARCH_VIRT in riscv's QEMU config
wireguard: selftests: swap SOC_VIRT for ARCH_VIRT on riscv
riscv: convert SOC_CANAAN to ARCH_CANAAN
clk: k210: convert SOC_CANAAN to ARCH_CANAAN
pinctrl: k210: convert SOC_CANAAN to ARCH_CANAAN
soc: k210: convert SOC_CANAAN to ARCH_CANAAN
reset: k210: convert SOC_CANAAN to ARCH_CANAAN
serial: sifive: select by default if ARCH_CANAAN
riscv: stop directly selecting drivers for ARCH_CANAAN

 arch/riscv/Kconfig.socs                       | 30 +++++++------------
 arch/riscv/Makefile                           |  2 +-
 arch/riscv/boot/dts/Makefile                  |  2 +-
 arch/riscv/boot/dts/canaan/Makefile           | 14 ++++-----
 arch/riscv/boot/dts/sifive/Makefile           |  2 +-
 arch/riscv/boot/dts/starfive/Makefile         |  2 +-
 arch/riscv/configs/defconfig                  |  6 ++--
 arch/riscv/configs/nommu_k210_defconfig       |  2 +-
 .../riscv/configs/nommu_k210_sdcard_defconfig |  2 +-
 arch/riscv/configs/nommu_virt_defconfig       |  2 +-
 arch/riscv/configs/rv32_defconfig             |  4 +--
 drivers/clk/Kconfig                           |  4 +--
 drivers/clk/Makefile                          |  2 +-
 drivers/clk/microchip/Kconfig                 |  3 +-
 drivers/clk/sifive/Kconfig                    |  4 ++-
 drivers/clk/starfive/Kconfig                  |  6 ++--
 drivers/i2c/busses/Kconfig                    |  2 +-
 drivers/mailbox/Kconfig                       |  2 +-
 drivers/pci/controller/dwc/Kconfig            |  2 +-
 drivers/pinctrl/Kconfig                       |  8 ++---
 drivers/reset/Kconfig                         |  8 ++---
 drivers/rtc/Kconfig                           |  2 +-
 drivers/soc/Makefile                          |  4 +--
 drivers/soc/canaan/Kconfig                    |  4 +--
 drivers/soc/sifive/Kconfig                    |  2 +-
 drivers/tty/serial/Kconfig                    |  2 ++
 drivers/usb/musb/Kconfig                      |  2 +-
 tools/testing/kunit/qemu_configs/riscv.py     |  2 +-
 .../wireguard/qemu/arch/riscv32.config        |  2 +-
 .../wireguard/qemu/arch/riscv64.config        |  2 +-
 30 files changed, 64 insertions(+), 67 deletions(-)
Signature · 8 lines
Damien Le Moal
Western Digital Research


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#37 lore raw
Quoted 29 lines · Damien Le Moal
Quoted 28 lines · Conor Dooley

From: Conor Dooley <[email protected]>

Following on from LPC, here's the start of my efforts to clean up Kconfig.socs.

My preference would be to take the whole thing through the RISC-V tree for v6.2 to make things a bit less fiddly, but I am sending this as an RFC in the hopes of getting some opinions on how the series should be split up & merged. I guess it would always be possible to create a few immutable branches for the individual subsystems that are being modified & take the series through the riscv tree unless we hit a conflict in -next. Obiviously for that route, maintainer acks will be needed.

The only SoCs I have, at the moment ;), are the jh7100, mpfs, fu540 and the k210 so I've given those a whirl to make sure I didn't break something.

I have also yet to deal with ARCH_VIRT, but just throwing this out for some opinions on how to apply/split up the set before finalising a v1.

I've CCed a few people that may have an opinion here, but anyone that has an opinion here - please shout!

One other point, is it worth adding something to the patch acceptance policy to say "do your kconfig xyz way" or is that not something that's worth doing since it is easy to push people in the right direction during review?

Quoted 6 lines
Quoted 2 lines

The series is currently on top of:
https://lore.kernel.org/all/[email protected]/

It is not very nice to change the config option names as that can break user build environments, e.g. buildroot setups that have tweaked kernel configs.

Yeah & I am not sure what could be done there other than define both symbols in the defconfig externally. I am loathe to break someone's setup, but defconfig is not in the "thou shalt not break" category is it?

Quoted 3 lines

What's wrong with the SOC_XXX names? Changing these to ARCH_XXX is weird since the ARCH prefix is generally used for ISA differentiation rather than boards/SoCs.

The ARM{,64} vendors coming to RISC-V already have an ARCH_FOO symbol defined. For the sake of consistency (and to avoid having two symbols for one SoC since they already have ARCH_FOO scattered around the kernel) I renamed the "incumbent" symbols to match. FWIW ARCH_FOO for uarchs is more common than SOC_FOO..

My heart is not dead-set on the rename, only my OCD!

Thanks,
Conor.

Quoted 55 lines
Quoted 55 lines

Conor Dooley (27):
clk: microchip: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
i2c: microchip-corei2c: replace SOC_MICROCHIP_POLARFIRE with
ARCH_MICROCHIP
mailbox: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
usb: musb: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
rtc: mpfs: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP
riscv: stop selecting the PolarFire SoC clock driver
riscv: replace SOC_STARFIVE with ARCH_STARFIVE
clk: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
pinctrl: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
reset: starfive: replace SOC_STARFIVE with ARCH_STARFIVE
riscv: replace SOC_SIFIVE with ARCH_SIFIVE
soc: sifive: convert SOC_SIFIVE to ARCH_SIFIVE
clk: sifive: convert SOC_SIFIVE to ARCH_SIFIVE
clk: sifive: select by default if ARCH_SIFIVE
serial: sifive: select by default if ARCH_SIFIVE
PCI: dwc: fu740: convert SOC_SIFIVE to ARCH_SIFIVE
riscv: stop selecting SiFive clock and serial drivers directly
riscv: convert SOC_VIRT to ARCH_VIRT
kunit: tool: rename SOC_VIRT to ARCH_VIRT in riscv's QEMU config
wireguard: selftests: swap SOC_VIRT for ARCH_VIRT on riscv
riscv: convert SOC_CANAAN to ARCH_CANAAN
clk: k210: convert SOC_CANAAN to ARCH_CANAAN
pinctrl: k210: convert SOC_CANAAN to ARCH_CANAAN
soc: k210: convert SOC_CANAAN to ARCH_CANAAN
reset: k210: convert SOC_CANAAN to ARCH_CANAAN
serial: sifive: select by default if ARCH_CANAAN
riscv: stop directly selecting drivers for ARCH_CANAAN

 arch/riscv/Kconfig.socs                       | 30 +++++++------------
 arch/riscv/Makefile                           |  2 +-
 arch/riscv/boot/dts/Makefile                  |  2 +-
 arch/riscv/boot/dts/canaan/Makefile           | 14 ++++-----
 arch/riscv/boot/dts/sifive/Makefile           |  2 +-
 arch/riscv/boot/dts/starfive/Makefile         |  2 +-
 arch/riscv/configs/defconfig                  |  6 ++--
 arch/riscv/configs/nommu_k210_defconfig       |  2 +-
 .../riscv/configs/nommu_k210_sdcard_defconfig |  2 +-
 arch/riscv/configs/nommu_virt_defconfig       |  2 +-
 arch/riscv/configs/rv32_defconfig             |  4 +--
 drivers/clk/Kconfig                           |  4 +--
 drivers/clk/Makefile                          |  2 +-
 drivers/clk/microchip/Kconfig                 |  3 +-
 drivers/clk/sifive/Kconfig                    |  4 ++-
 drivers/clk/starfive/Kconfig                  |  6 ++--
 drivers/i2c/busses/Kconfig                    |  2 +-
 drivers/mailbox/Kconfig                       |  2 +-
 drivers/pci/controller/dwc/Kconfig            |  2 +-
 drivers/pinctrl/Kconfig                       |  8 ++---
 drivers/reset/Kconfig                         |  8 ++---
 drivers/rtc/Kconfig                           |  2 +-
 drivers/soc/Makefile                          |  4 +--
 drivers/soc/canaan/Kconfig                    |  4 +--
Quoted 18 lines
Quoted 8 lines
 drivers/soc/sifive/Kconfig                    |  2 +-
 drivers/tty/serial/Kconfig                    |  2 ++
 drivers/usb/musb/Kconfig                      |  2 +-
 tools/testing/kunit/qemu_configs/riscv.py     |  2 +-
 .../wireguard/qemu/arch/riscv32.config        |  2 +-
 .../wireguard/qemu/arch/riscv64.config        |  2 +-
 30 files changed, 64 insertions(+), 67 deletions(-)
Signature · 8 lines
Damien Le Moal
Western Digital Research


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

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

#38 lore raw
In reply to Conor Dooley

Hi Conor,

Quoted 5 lines · Conor Dooley

From: Conor Dooley <[email protected]>

Following on from LPC, here's the start of my efforts to clean up Kconfig.socs.

Quoted 7 lines

My preference would be to take the whole thing through the RISC-V tree for v6.2 to make things a bit less fiddly, but I am sending this as an RFC in the hopes of getting some opinions on how the series should be split up & merged. I guess it would always be possible to create a few immutable branches for the individual subsystems that are being modified & take the series through the riscv tree unless we hit a conflict in -next. Obiviously for that route, maintainer acks will be needed.

Iff it is decided to make this change, I suggest to do it at the end of the v6.1-rc1 merge window, or even better, between rc1 and rc2. That way the affected subsystems can just base their for-v6.2 branches on v6.1-rc2, and have all renames.

If (a) you postpone this to v6.2, there will be more users to handle, and (b) you take this through the RISC-V tree, you will miss all newly introduced users in other subsystem trees.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

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

#39 lore raw
Quoted 16 lines · Geert Uytterhoeven

Hi Conor,

Quoted 5 lines · Conor Dooley

From: Conor Dooley <[email protected]>

Following on from LPC, here's the start of my efforts to clean up Kconfig.socs.

Quoted 7 lines

My preference would be to take the whole thing through the RISC-V tree for v6.2 to make things a bit less fiddly, but I am sending this as an RFC in the hopes of getting some opinions on how the series should be split up & merged. I guess it would always be possible to create a few immutable branches for the individual subsystems that are being modified & take the series through the riscv tree unless we hit a conflict in -next. Obiviously for that route, maintainer acks will be needed.

Quoted 6 lines

Iff it is decided to make this change, I suggest to do it at the end of the v6.1-rc1 merge window, or even better, between rc1 and rc2. That way the affected subsystems can just base their for-v6.2 branches on v6.1-rc2, and have all renames.

If (a) you postpone this to v6.2, there will be more users to handle,

Unfortunately even if this is decided upon, I am not sure I am going to have the time to get this sorted out prior to rc1. I'd rather wait until v6.2-rc1/2 & not rush it - especially given the number of Acks it likely requires.

Quoted 2 lines

and (b) you take this through the RISC-V tree, you will miss all newly introduced users in other subsystem trees.

Aye, your suggested timing makes sense, but there are quite a few subsystems involved here, so maybe doing it at the very end of the window rather than asking everyone to stall until rc2 may be more feasible?

Thanks,
Conor.

Quoted 8 lines

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

Quoted 8 lines

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

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

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

#40 lore raw
Quoted 9 lines · Conor Dooley
Quoted 2 lines · Geert Uytterhoeven

and (b) you take this through the RISC-V tree, you will miss all newly introduced users in other subsystem trees.

Aye, your suggested timing makes sense, but there are quite a few subsystems involved here, so maybe doing it at the very end of the window rather than asking everyone to stall until rc2 may be more feasible?

Since there is no rush here, maybe stage this out over two releases? At first, just introduce the new symbols as aliases like

config ARCH_FOO
def_bool SOC_FOO

then change all the drivers in the following cycle after the syumbol exists, and finally rename the user-visible symbols and remove the old version.

Arnd

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

#41 lore raw
Quoted 14 lines · Arnd Bergmann
Quoted 9 lines · Conor Dooley
Quoted 2 lines · Geert Uytterhoeven

and (b) you take this through the RISC-V tree, you will miss all newly introduced users in other subsystem trees.

Aye, your suggested timing makes sense, but there are quite a few subsystems involved here, so maybe doing it at the very end of the window rather than asking everyone to stall until rc2 may be more feasible?

Since there is no rush here, maybe stage this out over two releases? At first, just introduce the new symbols as aliases like

Quoted 7 lines

config ARCH_FOO
def_bool SOC_FOO

then change all the drivers in the following cycle after the syumbol exists, and finally rename the user-visible symbols and remove the old version.

I think I suggested that at LPC but was told not to bother, which is why I did a direct conversion. I'd prefer to do it your suggested way though & I think I will do it that way for a v1.

Thanks,
Conor.

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

#42 lore raw

Hi Conor,

Quoted 18 lines · Conor Dooley
Quoted 17 lines · Arnd Bergmann
Quoted 9 lines · Conor Dooley
Quoted 2 lines · Geert Uytterhoeven

and (b) you take this through the RISC-V tree, you will miss all newly introduced users in other subsystem trees.

Aye, your suggested timing makes sense, but there are quite a few subsystems involved here, so maybe doing it at the very end of the window rather than asking everyone to stall until rc2 may be more feasible?

Since there is no rush here, maybe stage this out over two releases? At first, just introduce the new symbols as aliases like

config ARCH_FOO
def_bool SOC_FOO

Quoted 8 lines
Quoted 4 lines

then change all the drivers in the following cycle after the syumbol exists, and finally rename the user-visible symbols and remove the old version.

I think I suggested that at LPC but was told not to bother, which is why I did a direct conversion. I'd prefer to do it your suggested way though & I think I will do it that way for a v1.

This way has the added advantage that "make oldconfig" keeps on working (assumed no one skips one release ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

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

#2 lore raw

Re: [RFC 01/27] clk: microchip: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP

In reply to Conor Dooley
Quoted 6 lines · Conor Dooley

From: Conor Dooley <[email protected]>

At LPC, we decided that for the sake of consistency the SOC_FOO symbols in arch/riscv should be replaced with ARCH_FOO so that we could have a consistent policy regardless of whether a vendor had ARM legacy or was a RISC-V "incumbent".

Umm, that's just stupid. The ARCH_ naming in arm is incorrect and a bad idea. So please move in the correct direction instead even if that is more work and more churn.

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

#3 lore raw

Re: [RFC 01/27] clk: microchip: replace SOC_MICROCHIP_POLARFIRE with ARCH_MICROCHIP

Quoted 11 lines · Christoph Hellwig
Quoted 6 lines · Conor Dooley

From: Conor Dooley <[email protected]>

At LPC, we decided that for the sake of consistency the SOC_FOO symbols in arch/riscv should be replaced with ARCH_FOO so that we could have a consistent policy regardless of whether a vendor had ARM legacy or was a RISC-V "incumbent".

Umm, that's just stupid. The ARCH_ naming in arm is incorrect and a bad idea. So please move in the correct direction instead even if that is more work and more churn.

It's more work for me to change them to ARCH_ than leave them as SOC_. I don't think _consistency_ is stupid, but given my OCD I am quite biased there. What is your suggestion for moving incoming ARM vendors "in the correct direction"?

I would be perfectly happy to change SOC_MICROCHIP_POLARFIRE to something like SOC_MICROCHIP or SOC_MICROCHIP_FPGA and leave it there as far as renames go, as long as beyond that there is no ARCH_ARM_VENDOR
+ SOC_ARM_VENDOR muck in the file. Would make the series considerably smaller as all I would be doing is unifiying how the SOC_ symbols are being used :)

Thanks,
Conor.

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