mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 02/12] ARM: versatile: Use common clk framework
Date: Tue,  2 May 2023 11:14:09 +0200	[thread overview]
Message-ID: <20230502091419.2551228-3-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20230502091419.2551228-1-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Kconfig               |  2 ++
 arch/arm/mach-versatile/core.c | 49 ----------------------------------
 2 files changed, 2 insertions(+), 49 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5aef8fcd3b..1da6b396e7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -161,6 +161,8 @@ config ARCH_VERSATILE
 	select GPIOLIB
 	select HAVE_CLK
 	select HAS_DEBUG_LL
+	select COMMON_CLK
+	select COMMON_CLK_OF_PROVIDER
 
 config ARCH_TEGRA
 	bool "NVIDIA Tegra"
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 1e1ee92c2d..69ff82e9a5 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -41,39 +41,6 @@
 #include <mach/versatile/platform.h>
 #include <mach/versatile/init.h>
 
-struct clk {
-	unsigned long rate;
-};
-
-static struct clk ref_clk_dummy;
-
-static struct clk ref_clk_24 = {
-	.rate = 24000000,
-};
-
-unsigned long clk_get_rate(struct clk *clk)
-{
-	return clk->rate;
-}
-EXPORT_SYMBOL(clk_get_rate);
-
-/* enable and disable do nothing */
-int clk_set_rate(struct clk *clk, unsigned long rate)
-{
-	return 0;
-}
-EXPORT_SYMBOL(clk_set_rate);
-
-int clk_enable(struct clk *clk)
-{
-	return 0;
-}
-EXPORT_SYMBOL(clk_enable);
-
-void clk_disable(struct clk *clk)
-{
-}
-EXPORT_SYMBOL(clk_disable);
 
 /* 1Mhz / 256 */
 #define TIMER_FREQ (1000000/256)
@@ -134,22 +101,6 @@ static int vpb_clocksource_init(void)
 
 core_initcall(vpb_clocksource_init);
 
-static struct clk_lookup clocks_lookups[] = {
-	CLKDEV_CON_ID("apb_pclk", &ref_clk_dummy),
-	CLKDEV_DEV_ID("uart-pl0110", &ref_clk_24),
-	CLKDEV_DEV_ID("uart-pl0111", &ref_clk_24),
-	CLKDEV_DEV_ID("uart-pl0112", &ref_clk_24),
-	CLKDEV_DEV_ID("uart-pl0113", &ref_clk_24),
-};
-
-static int versatile_clkdev_init(void)
-{
-	clkdev_add_table(clocks_lookups, ARRAY_SIZE(clocks_lookups));
-
-	return 0;
-}
-postcore_initcall(versatile_clkdev_init);
-
 void versatile_register_uart(unsigned id)
 {
 	resource_size_t start;
-- 
2.39.2




  parent reply	other threads:[~2023-05-02  9:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02  9:14 [PATCH 00/12] ARM Versatile updates Sascha Hauer
2023-05-02  9:14 ` [PATCH 01/12] ARM: versatile: Enable CONFIG_RELOCATABLE Sascha Hauer
2023-05-02  9:14 ` Sascha Hauer [this message]
2023-05-02  9:14 ` [PATCH 03/12] ARM: versatile: drop platform code to register UART Sascha Hauer
2023-05-02  9:14 ` [PATCH 04/12] ARM: versatile: drop platform code to register GPIOs Sascha Hauer
2023-05-02  9:14 ` [PATCH 05/12] ARM: versatile: Use flash from device tree Sascha Hauer
2023-05-02  9:14 ` [PATCH 06/12] ARM: versatile: Use smc91c111 " Sascha Hauer
2023-05-02  9:17   ` Ahmad Fatoum
2023-05-02 11:41     ` Sascha Hauer
2023-05-02  9:14 ` [PATCH 07/12] ARM: versatile: make sure to run initcalls on versatile only Sascha Hauer
2023-05-02  9:14 ` [PATCH 08/12] ARM: versatile: simplify ARM1176 support Sascha Hauer
2023-05-02  9:14 ` [PATCH 09/12] ARM: versatile: move over to multi image support Sascha Hauer
2023-05-02  9:14 ` [PATCH 10/12] ARM: versatile: move over to multi arch support Sascha Hauer
2023-05-02  9:14 ` [PATCH 11/12] ARM: versatile: Use existing clocksource driver Sascha Hauer
2023-05-02  9:14 ` [PATCH 12/12] ARM: Merge imx_defconfig and versatilepb_defconfig into multi_v5_v6_defconfig Sascha Hauer

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=20230502091419.2551228-3-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox