2022-10-05 17:15:55

by Conor Dooley

[permalink] [raw]
Subject: [PATCH 0/6] RISC-V: stop selecting device drivers in Kconfig.socs

From: Conor Dooley <[email protected]>

As my RFC [0] series doing the symbol name changes has not yet reached
consensus, I've split out the removal of device driver selects into a
new series. I kept the plic as a direct select - although given how Maz
is treating the SiFive plic driver as the RISC-V plic driver, maybe that
should just be selected by default at an arch level...

I assume the individual patches can go via their subsystems & I'll
resubmit the arch/riscv patches a cycle later? I'm not in any rush.

Thanks,
Conor.

0 - https://lore.kernel.org/linux-riscv/[email protected]/

Conor Dooley (6):
clk: sifive: select by default if SOC_SIFIVE
serial: sifive: select by default if SOC_SIFIVE
serial: sifive: select by default if SOC_CANAAN
riscv: stop selecting the PolarFire SoC clock driver
riscv: stop selecting SiFive clock and serial drivers directly
riscv: stop directly selecting drivers for SOC_CANAAN

arch/riscv/Kconfig.socs | 8 --------
drivers/clk/sifive/Kconfig | 4 +++-
drivers/tty/serial/Kconfig | 2 ++
3 files changed, 5 insertions(+), 9 deletions(-)

--
2.37.3


2022-10-05 17:16:06

by Conor Dooley

[permalink] [raw]
Subject: [PATCH 2/6] serial: sifive: select by default if SOC_SIFIVE

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 SOC_SIFIVE.

Signed-off-by: Conor Dooley <[email protected]>
---
drivers/tty/serial/Kconfig | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 2a18a42a5004..768f1138c9fb 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -972,6 +972,7 @@ config SERIAL_OMAP_CONSOLE
config SERIAL_SIFIVE
tristate "SiFive UART support"
depends on OF
+ default SOC_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 SOC_SIFIVE
select SERIAL_CORE_CONSOLE
select SERIAL_EARLYCON
help
--
2.37.3

2022-10-05 17:44:56

by Conor Dooley

[permalink] [raw]
Subject: [PATCH 3/6] serial: sifive: select by default if SOC_CANAAN

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 SOC_CANAAN.

Signed-off-by: Conor Dooley <[email protected]>
---
drivers/tty/serial/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 768f1138c9fb..58f6f8e11592 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -972,7 +972,7 @@ config SERIAL_OMAP_CONSOLE
config SERIAL_SIFIVE
tristate "SiFive UART support"
depends on OF
- default SOC_SIFIVE
+ default SOC_SIFIVE || SOC_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 SOC_SIFIVE
+ default SOC_SIFIVE || SOC_CANAAN
select SERIAL_CORE_CONSOLE
select SERIAL_EARLYCON
help
--
2.37.3

2022-10-05 17:45:08

by Conor Dooley

[permalink] [raw]
Subject: [PATCH 1/6] clk: sifive: select by default if SOC_SIFIVE

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 SOC_SIFIVE.

Signed-off-by: Conor Dooley <[email protected]>
---
drivers/clk/sifive/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/sifive/Kconfig b/drivers/clk/sifive/Kconfig
index 9132c3c4aa86..b7fde0aadfcb 100644
--- a/drivers/clk/sifive/Kconfig
+++ b/drivers/clk/sifive/Kconfig
@@ -2,7 +2,8 @@

menuconfig CLK_SIFIVE
bool "SiFive SoC driver support"
- depends on RISCV || COMPILE_TEST
+ depends on SOC_SIFIVE || COMPILE_TEST
+ default SOC_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 SOC_SIFIVE
select RESET_CONTROLLER
select RESET_SIMPLE
select CLK_ANALOGBITS_WRPLL_CLN28HPC
--
2.37.3

2022-10-05 17:45:37

by Conor Dooley

[permalink] [raw]
Subject: [PATCH 5/6] riscv: stop selecting SiFive clock and serial drivers directly

From: Conor Dooley <[email protected]>

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

Signed-off-by: Conor Dooley <[email protected]>
---
arch/riscv/Kconfig.socs | 4 ----
1 file changed, 4 deletions(-)

diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index 83f14afd4086..b6f4cfad159b 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -8,10 +8,6 @@ config SOC_MICROCHIP_POLARFIRE

config SOC_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
--
2.37.3

2022-10-05 17:46:02

by Conor Dooley

[permalink] [raw]
Subject: [PATCH 4/6] riscv: stop selecting the PolarFire SoC clock driver

From: Conor Dooley <[email protected]>

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

Signed-off-by: Conor Dooley <[email protected]>
---
arch/riscv/Kconfig.socs | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index 69774bb362d6..83f14afd4086 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -2,7 +2,6 @@ menu "SoC selection"

config SOC_MICROCHIP_POLARFIRE
bool "Microchip PolarFire SoCs"
- select MCHP_CLK_MPFS
select SIFIVE_PLIC
help
This enables support for Microchip PolarFire SoC platforms.
--
2.37.3

2022-10-05 17:46:29

by Conor Dooley

[permalink] [raw]
Subject: [PATCH 6/6] riscv: stop directly selecting drivers for SOC_CANAAN

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.

Signed-off-by: Conor Dooley <[email protected]>
---
arch/riscv/Kconfig.socs | 3 ---
1 file changed, 3 deletions(-)

diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index b6f4cfad159b..0ddbc9eb7af4 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -40,13 +40,10 @@ config SOC_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.

--
2.37.3

2022-10-17 21:28:33

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 1/6] clk: sifive: select by default if SOC_SIFIVE

Quoting Conor Dooley (2022-10-05 10:13:44)
> 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 SOC_SIFIVE.
>
> Signed-off-by: Conor Dooley <[email protected]>
> ---

Applied to clk-fixes

2022-10-30 12:35:53

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 0/6] RISC-V: stop selecting device drivers in Kconfig.socs

On Wed, Oct 05, 2022 at 06:13:43PM +0100, Conor Dooley wrote:
> From: Conor Dooley <[email protected]>
>
> As my RFC [0] series doing the symbol name changes has not yet reached
> consensus, I've split out the removal of device driver selects into a
> new series. I kept the plic as a direct select - although given how Maz
> is treating the SiFive plic driver as the RISC-V plic driver, maybe that
> should just be selected by default at an arch level...
>
> I assume the individual patches can go via their subsystems & I'll
> resubmit the arch/riscv patches a cycle later? I'm not in any rush.

Hey,

What's the story here with the two serial patches, they just waiting for
an Ack? I think these are archived on the riscv patchwork, so if that is
the case I'll unarchive them and mark as needing one.

Thanks,
Conor.

>
> 0 - https://lore.kernel.org/linux-riscv/[email protected]/
>
> Conor Dooley (6):
> clk: sifive: select by default if SOC_SIFIVE
> serial: sifive: select by default if SOC_SIFIVE
> serial: sifive: select by default if SOC_CANAAN
> riscv: stop selecting the PolarFire SoC clock driver
> riscv: stop selecting SiFive clock and serial drivers directly
> riscv: stop directly selecting drivers for SOC_CANAAN
>
> arch/riscv/Kconfig.socs | 8 --------
> drivers/clk/sifive/Kconfig | 4 +++-
> drivers/tty/serial/Kconfig | 2 ++
> 3 files changed, 5 insertions(+), 9 deletions(-)
>
> --
> 2.37.3
>

2022-11-02 07:46:30

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 0/6] RISC-V: stop selecting device drivers in Kconfig.socs

On Sun, Oct 30, 2022 at 12:02:09PM +0000, Conor Dooley wrote:
> On Wed, Oct 05, 2022 at 06:13:43PM +0100, Conor Dooley wrote:
> > From: Conor Dooley <[email protected]>
> >
> > As my RFC [0] series doing the symbol name changes has not yet reached
> > consensus, I've split out the removal of device driver selects into a
> > new series. I kept the plic as a direct select - although given how Maz
> > is treating the SiFive plic driver as the RISC-V plic driver, maybe that
> > should just be selected by default at an arch level...
> >
> > I assume the individual patches can go via their subsystems & I'll
> > resubmit the arch/riscv patches a cycle later? I'm not in any rush.
>
> Hey,
>
> What's the story here with the two serial patches, they just waiting for
> an Ack? I think these are archived on the riscv patchwork, so if that is
> the case I'll unarchive them and mark as needing one.

Sorry for the delay, I'll take both of them through the tty/serial tree.

thanks,

greg k-h

2022-11-02 10:43:37

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 0/6] RISC-V: stop selecting device drivers in Kconfig.socs

On Wed, Nov 02, 2022 at 08:09:32AM +0100, Greg Kroah-Hartman wrote:
> On Sun, Oct 30, 2022 at 12:02:09PM +0000, Conor Dooley wrote:
> > On Wed, Oct 05, 2022 at 06:13:43PM +0100, Conor Dooley wrote:
> > > From: Conor Dooley <[email protected]>
> > >
> > > As my RFC [0] series doing the symbol name changes has not yet reached
> > > consensus, I've split out the removal of device driver selects into a
> > > new series. I kept the plic as a direct select - although given how Maz
> > > is treating the SiFive plic driver as the RISC-V plic driver, maybe that
> > > should just be selected by default at an arch level...
> > >
> > > I assume the individual patches can go via their subsystems & I'll
> > > resubmit the arch/riscv patches a cycle later? I'm not in any rush.
> >
> > Hey,
> >
> > What's the story here with the two serial patches, they just waiting for
> > an Ack? I think these are archived on the riscv patchwork, so if that is
> > the case I'll unarchive them and mark as needing one.
>
> Sorry for the delay, I'll take both of them through the tty/serial tree.

nw Greg, thanks.

@Palmer, I'll re-submit the Kconfig.socs bits of this after v6.2-rc1.

Thanks,
Conor.