Thread (8 messages) 8 messages, 6 authors, 2021-11-25

Re: [PATCH v5 2/2 resend] clk: microchip: Add driver for Microchip PolarFire SoC

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2021-11-09 13:10:57
Also in: linux-clk

On 18/08/2021 23:09, Palmer Dabbelt wrote:
On Wed, 18 Aug 2021 07:11:02 PDT (-0700), daire.mcnamara@microchip.com wrote:
quoted
From: Daire McNamara <daire.mcnamara@microchip.com>

Add support for clock configuration on Microchip PolarFire SoC

Signed-off-by: Daire McNamara <daire.mcnamara@microchip.com>
---
 drivers/clk/Kconfig              |   1 +
 drivers/clk/Makefile             |   2 +-
 drivers/clk/microchip/Kconfig    |   7 +
 drivers/clk/microchip/Makefile   |   6 +-
 drivers/clk/microchip/clk-mpfs.c | 444 +++++++++++++++++++++++++++++++
 5 files changed, 457 insertions(+), 3 deletions(-)
 create mode 100644 drivers/clk/microchip/Kconfig
 create mode 100644 drivers/clk/microchip/clk-mpfs.c
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index a588d56502d4..ab604dd02acf 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -388,6 +388,7 @@ source "drivers/clk/keystone/Kconfig"
 source "drivers/clk/mediatek/Kconfig"
 source "drivers/clk/meson/Kconfig"
 source "drivers/clk/mstar/Kconfig"
+source "drivers/clk/microchip/Kconfig"
 source "drivers/clk/mvebu/Kconfig"
 source "drivers/clk/qcom/Kconfig"
 source "drivers/clk/renesas/Kconfig"
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index b22ae4f81e0b..fb87a18ae8ec 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -89,7 +89,7 @@ obj-$(CONFIG_ARCH_KEYSTONE)		+= keystone/
 obj-$(CONFIG_MACH_LOONGSON32)		+= loongson1/
 obj-y					+= mediatek/
 obj-$(CONFIG_ARCH_MESON)		+= meson/
-obj-$(CONFIG_MACH_PIC32)		+= microchip/
+obj-y					+= microchip/
 ifeq ($(CONFIG_COMMON_CLK), y)
 obj-$(CONFIG_ARCH_MMP)			+= mmp/
 endif
diff --git a/drivers/clk/microchip/Kconfig b/drivers/clk/microchip/Kconfig
new file mode 100644
index 000000000000..f5edc7b3c07c
--- /dev/null
+++ b/drivers/clk/microchip/Kconfig
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+
+config MCHP_CLK_MPFS
+	bool "Clk driver for PolarFire SoC"
+	depends on (RISCV && SOC_MICROCHIP_POLARFIRE) || COMPILE_TEST
This shouldn't depend on the SOC config.  Those were meant to just 
enable a set of drivers, not restrict what can be enabled. 
The kernel config is overwhelmed with amount of choices of drivers, so
it is quite common to restrict the choices of subarch-specific drivers
to these sub-architectures. That's how many, if not most, of ARM v7 and
ARMv8 drivers are restricted. Some other RISC-V drivers follow this
concept (git grep SOC_CANAAN, git grep SOC_SIFIVE) because it is
friendly for people configuring kernels. Why making configuration choice
more difficult and show the SoC-specific clock driver to every other
platform (when this SoC is not used)?

Best regards,
Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help