Skip to contentSkip to conversation

MIPS: loongson32: Update the clock initialization

PATCH In review Keguang Zhang 3 participants 6 messages Feb 10, 2023 – Mar 15, 2023

Subsystems (3)
lore
Share & tools
lore

Keguang Zhang

author maintainer
#0 lore raw

PATCH 1/1 MIPS: loongson32: Update the clock initialization

The Loongson-1 clock driver is under re-implementation
to add DT support. As a result, ls1x_clk_init() will be dropped soon. Therefore, call of_clk_init() for clock initialization instead.

---
 arch/mips/include/asm/mach-loongson32/platform.h | 1 -
 arch/mips/loongson32/common/time.c               | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/mach-loongson32/platform.h +0 -1
index 86e1a6aab4e5..2cdcfb5f6012 100644
@@ -20,7 +20,6 @@ extern struct platform_device ls1x_gpio1_pdev;
 extern struct platform_device ls1x_rtc_pdev;
 extern struct platform_device ls1x_wdt_pdev;
 
-void __init ls1x_clk_init(void);
 void __init ls1x_rtc_set_extclk(struct platform_device *pdev);
 void __init ls1x_serial_set_uartclk(struct platform_device *pdev);
 
arch/mips/loongson32/common/time.c +2 -1
index 459b15c96d3b..965c04aa56fd 100644
@@ -4,6 +4,7 @@
  */
 
 #include <linux/clk.h>
+#include <linux/of_clk.h>
 #include <linux/interrupt.h>
 #include <linux/sizes.h>
 #include <asm/time.h>
@@ -211,7 +212,7 @@ void __init plat_time_init(void)
 	struct clk *clk = NULL;
 
 	/* initialize LS1X clocks */
-	ls1x_clk_init();
+	of_clk_init(NULL);
 
 #ifdef CONFIG_CEVT_CSRC_LS1X
 	/* setup LS1X PWM timer */

base-commit: 159c610af8cdf2b3c915e59162fc867b557cbe7e
prerequisite-patch-id: 6a8c8d604fca8bce5d9e35cac080b87a33be2b5c

Signature · 1 line
2.34.1
maintainer Acked-by on v1 1/1
#1 lore raw

Quoting Keguang Zhang (2023-02-10 03:11:41)

Quoted 8 lines

The Loongson-1 clock driver is under re-implementation
to add DT support. As a result, ls1x_clk_init() will be dropped soon. Therefore, call of_clk_init() for clock initialization instead.

---

author maintainer
#2 lore raw
Quoted 8 lines · Stephen Boyd

Quoting Keguang Zhang (2023-02-10 03:11:41)

Quoted 6 lines

The Loongson-1 clock driver is under re-implementation
to add DT support. As a result, ls1x_clk_init() will be dropped soon. Therefore, call of_clk_init() for clock initialization instead.

Hi Thomas,
Sorry to bother you.
For fear of raising build error, is it possible to merge this patch before the above two patches getting applied?
Or is there anything to improve?
Thanks very much!

Quoted 4 lines
Quoted 2 lines

---

--
Best regards,

Kelvin Cheung

maintainer Acked-by
#3 lore raw
Quoted 10 lines · Keguang Zhang
Quoted 8 lines · Stephen Boyd

Quoting Keguang Zhang (2023-02-10 03:11:41)

Quoted 6 lines

The Loongson-1 clock driver is under re-implementation
to add DT support. As a result, ls1x_clk_init() will be dropped soon. Therefore, call of_clk_init() for clock initialization instead.

Quoted 6 lines

Hi Thomas,
Sorry to bother you.
For fear of raising build error, is it possible to merge this patch before the above two patches getting applied?
Or is there anything to improve?
Thanks very much!

the IMHO best way would be to let this patch go the same way as the other patch set. So Stephen could you take this into your tree, too ?

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
author maintainer
#4 lore raw
Quoted 19 lines · Thomas Bogendoerfer
Quoted 10 lines · Keguang Zhang
Quoted 8 lines · Stephen Boyd

Quoting Keguang Zhang (2023-02-10 03:11:41)

Quoted 6 lines

The Loongson-1 clock driver is under re-implementation
to add DT support. As a result, ls1x_clk_init() will be dropped soon. Therefore, call of_clk_init() for clock initialization instead.

Quoted 6 lines

Hi Thomas,
Sorry to bother you.
For fear of raising build error, is it possible to merge this patch before the above two patches getting applied?
Or is there anything to improve?
Thanks very much!

Quoted 4 lines

the IMHO best way would be to let this patch go the same way as the other patch set. So Stephen could you take this into your tree, too ?

Sure. Will do.

Quoted 5 lines

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]

Signature · 3 lines
Best regards,

Keguang Zhang
maintainer
#5 lore raw

Quoting Keguang Zhang (2023-03-15 02:43:02)

Quoted 21 lines
Quoted 19 lines · Thomas Bogendoerfer
Quoted 16 lines · Keguang Zhang
Quoted 8 lines · Stephen Boyd

Quoting Keguang Zhang (2023-02-10 03:11:41)

Quoted 6 lines

The Loongson-1 clock driver is under re-implementation
to add DT support. As a result, ls1x_clk_init() will be dropped soon. Therefore, call of_clk_init() for clock initialization instead.

Hi Thomas,
Sorry to bother you.
For fear of raising build error, is it possible to merge this patch before the above two patches getting applied?
Or is there anything to improve?
Thanks very much!

Quoted 6 lines
Quoted 4 lines

the IMHO best way would be to let this patch go the same way as the other patch set. So Stephen could you take this into your tree, too ?

Sure. Will do.

Please resend this patch along with the loongson patches that it goes with.