All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Delaunay <patrick.delaunay@foss.st.com>
To: <u-boot@lists.denx.de>
Cc: Gabriel FERNANDEZ <gabriel.fernandez@foss.st.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Lukasz Majewski <lukma@denx.de>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Sean Anderson <seanga2@gmail.com>,
	<uboot-stm32@st-md-mailman.stormreply.com>
Subject: [PATCH 1/4] clk: Add directory for STM32 clock drivers
Date: Tue, 10 May 2022 09:51:10 +0200	[thread overview]
Message-ID: <20220510095041.1.Ieec76f320c9cc6885d7b519dffddff9ad4c97b59@changeid> (raw)
In-Reply-To: <20220510075114.1238086-1-patrick.delaunay@foss.st.com>

Add a directory in drivers/clk to regroup the clock drivers for all
STM32 Soc with CONFIG_ARCH_STM32 (MCUs with cortex M) or
CONFIG_ARCH_STM32MP (MPUs with cortex A).

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 MAINTAINERS                            |  2 +-
 drivers/clk/Kconfig                    | 17 +----------------
 drivers/clk/Makefile                   |  5 ++---
 drivers/clk/stm32/Kconfig              | 23 +++++++++++++++++++++++
 drivers/clk/stm32/Makefile             |  7 +++++++
 drivers/clk/{ => stm32}/clk_stm32f.c   |  0
 drivers/clk/{ => stm32}/clk_stm32h7.c  |  0
 drivers/clk/{ => stm32}/clk_stm32mp1.c |  0
 8 files changed, 34 insertions(+), 20 deletions(-)
 create mode 100644 drivers/clk/stm32/Kconfig
 create mode 100644 drivers/clk/stm32/Makefile
 rename drivers/clk/{ => stm32}/clk_stm32f.c (100%)
 rename drivers/clk/{ => stm32}/clk_stm32h7.c (100%)
 rename drivers/clk/{ => stm32}/clk_stm32mp1.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 56be0bfad0..3f37edd716 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -469,7 +469,7 @@ S:	Maintained
 F:	arch/arm/mach-stm32mp/
 F:	doc/board/st/
 F:	drivers/adc/stm32-adc*
-F:	drivers/clk/clk_stm32mp1.c
+F:	drivers/clk/stm32/
 F:	drivers/gpio/stm32_gpio.c
 F:	drivers/hwspinlock/stm32_hwspinlock.c
 F:	drivers/i2c/stm32f7_i2c.c
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 6dc271f71b..98ad481d9e 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -140,22 +140,6 @@ config CLK_SCMI
 	  by a SCMI agent based on SCMI clock protocol communication
 	  with a SCMI server.
 
-config CLK_STM32F
-	bool "Enable clock driver support for STM32F family"
-	depends on CLK && (STM32F7 || STM32F4)
-	default y
-	help
-	  This clock driver adds support for RCC clock management
-	  for STM32F4 and STM32F7 SoCs.
-
-config CLK_STM32MP1
-	bool "Enable RCC clock driver for STM32MP1"
-	depends on ARCH_STM32MP && CLK
-	default y
-	help
-	  Enable the STM32 clock (RCC) driver. Enable support for
-	  manipulating STM32MP1's on-SoC clocks.
-
 config CLK_HSDK
 	bool "Enable cgu clock driver for HSDK boards"
 	depends on CLK && TARGET_HSDK
@@ -225,6 +209,7 @@ source "drivers/clk/owl/Kconfig"
 source "drivers/clk/renesas/Kconfig"
 source "drivers/clk/sunxi/Kconfig"
 source "drivers/clk/sifive/Kconfig"
+source "drivers/clk/stm32/Kconfig"
 source "drivers/clk/tegra/Kconfig"
 source "drivers/clk/ti/Kconfig"
 source "drivers/clk/uniphier/Kconfig"
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index bb4eee5d99..09fbaf6233 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -22,6 +22,8 @@ obj-$(CONFIG_ARCH_MESON) += meson/
 obj-$(CONFIG_ARCH_MTMIPS) += mtmips/
 obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
 obj-$(CONFIG_ARCH_SOCFPGA) += altera/
+obj-$(CONFIG_ARCH_STM32) += stm32/
+obj-$(CONFIG_ARCH_STM32MP) += stm32/
 obj-$(CONFIG_ARCH_SUNXI) += sunxi/
 obj-$(CONFIG_CLK_AT91) += at91/
 obj-$(CONFIG_CLK_BCM6345) += clk_bcm6345.o
@@ -38,8 +40,6 @@ obj-$(CONFIG_CLK_OWL) += owl/
 obj-$(CONFIG_CLK_RENESAS) += renesas/
 obj-$(CONFIG_CLK_SCMI) += clk_scmi.o
 obj-$(CONFIG_CLK_SIFIVE) += sifive/
-obj-$(CONFIG_CLK_STM32F) += clk_stm32f.o
-obj-$(CONFIG_CLK_STM32MP1) += clk_stm32mp1.o
 obj-$(CONFIG_CLK_UNIPHIER) += uniphier/
 obj-$(CONFIG_CLK_VERSACLOCK) += clk_versaclock.o
 obj-$(CONFIG_CLK_VERSAL) += clk_versal.o
@@ -52,4 +52,3 @@ obj-$(CONFIG_MACH_PIC32) += clk_pic32.o
 obj-$(CONFIG_SANDBOX_CLK_CCF) += clk_sandbox_ccf.o
 obj-$(CONFIG_SANDBOX) += clk_sandbox.o
 obj-$(CONFIG_SANDBOX) += clk_sandbox_test.o
-obj-$(CONFIG_STM32H7) += clk_stm32h7.o
diff --git a/drivers/clk/stm32/Kconfig b/drivers/clk/stm32/Kconfig
new file mode 100644
index 0000000000..eac3fc1e9d
--- /dev/null
+++ b/drivers/clk/stm32/Kconfig
@@ -0,0 +1,23 @@
+config CLK_STM32F
+	bool "Enable clock driver support for STM32F family"
+	depends on CLK && (STM32F7 || STM32F4)
+	default y
+	help
+	  This clock driver adds support for RCC clock management
+	  for STM32F4 and STM32F7 SoCs.
+
+config CLK_STM32H7
+	bool "Enable clock driver support for STM32H7 family"
+	depends on CLK && STM32H7
+	default y
+	help
+	  This clock driver adds support for RCC clock management
+	  for STM32H7 SoCs.
+
+config CLK_STM32MP1
+	bool "Enable RCC clock driver for STM32MP15"
+	depends on ARCH_STM32MP && CLK
+	default y if STM32MP15x
+	help
+	  Enable the STM32 clock (RCC) driver. Enable support for
+	  manipulating STM32MP15's on-SoC clocks.
diff --git a/drivers/clk/stm32/Makefile b/drivers/clk/stm32/Makefile
new file mode 100644
index 0000000000..b420eeaa4e
--- /dev/null
+++ b/drivers/clk/stm32/Makefile
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# Copyright (C) 2022, STMicroelectronics - All Rights Reserved
+
+obj-$(CONFIG_CLK_STM32F) += clk_stm32f.o
+obj-$(CONFIG_CLK_STM32H7) += clk_stm32h7.o
+obj-$(CONFIG_CLK_STM32MP1) += clk_stm32mp1.o
diff --git a/drivers/clk/clk_stm32f.c b/drivers/clk/stm32/clk_stm32f.c
similarity index 100%
rename from drivers/clk/clk_stm32f.c
rename to drivers/clk/stm32/clk_stm32f.c
diff --git a/drivers/clk/clk_stm32h7.c b/drivers/clk/stm32/clk_stm32h7.c
similarity index 100%
rename from drivers/clk/clk_stm32h7.c
rename to drivers/clk/stm32/clk_stm32h7.c
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/stm32/clk_stm32mp1.c
similarity index 100%
rename from drivers/clk/clk_stm32mp1.c
rename to drivers/clk/stm32/clk_stm32mp1.c
-- 
2.25.1


  reply	other threads:[~2022-05-10  7:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10  7:51 [PATCH 0/4] stm32mp: add minimal RCC support for STM32MP13 Patrick Delaunay
2022-05-10  7:51 ` Patrick Delaunay [this message]
2022-05-11 16:40   ` [PATCH 1/4] clk: Add directory for STM32 clock drivers Sean Anderson
2022-05-10  7:51 ` [PATCH 2/4] clk: stm32mp13: add a STM32MP13 RCC clock driver Patrick Delaunay
2022-05-10 12:18   ` [Uboot-stm32] " Grzegorz Szymaszek
2022-05-10  7:51 ` [PATCH 3/4] misc: stm32mp13: introduce STM32MP13 RCC driver Patrick Delaunay
2022-05-10  7:51 ` [PATCH 4/4] ARM: dts: stm32: add rcc node for STM32MP13 Patrick Delaunay
2022-05-11 16:44 ` [PATCH 0/4] stm32mp: add minimal RCC support " Sean Anderson
2022-05-17  8:12   ` Patrick DELAUNAY
2022-05-19 13:42     ` Sean Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220510095041.1.Ieec76f320c9cc6885d7b519dffddff9ad4c97b59@changeid \
    --to=patrick.delaunay@foss.st.com \
    --cc=gabriel.fernandez@foss.st.com \
    --cc=lukma@denx.de \
    --cc=patrice.chotard@foss.st.com \
    --cc=seanga2@gmail.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.