Skip to contentSkip to conversation

ARM: PRIMA2: convert to common clk and finish full clk tree

PATCH Superseded Barry Song 1 participant 2 messages Aug 3, 2012

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Barry Song

author
#0 lore raw

PATCH v3 1/2 ARM: PRIMA2: convert to common clk and finish full clk tree

From: Binghua Duan <[email protected]>

Commit 02c981c07bc95ac1e only implements a little part of primaII clk tree due to common clk framework was not ready at that time.
This patch converts the old driver to common clk and finish the full clk tree.

---
-v3: rebase againest 3.6-rc1;

 arch/arm/Kconfig              |    2 +-
 arch/arm/mach-prima2/clock.c  | 1189 ++++++++++++++++++++++++++++++++---------
 arch/arm/mach-prima2/prima2.c |    1 -
 arch/arm/mach-prima2/timer.c  |    8 +-
 4 files changed, 933 insertions(+), 267 deletions(-)
arch/arm/Kconfig +1 -1
index e91c7cd..2cd53e4 100644
@@ -419,7 +419,7 @@ config ARCH_PRIMA2
 	select NO_IOPORT
 	select ARCH_REQUIRE_GPIOLIB
 	select GENERIC_CLOCKEVENTS
-	select CLKDEV_LOOKUP
+	select COMMON_CLK
 	select GENERIC_IRQ_CHIP
 	select MIGHT_HAVE_CACHE_L2X0
 	select PINCTRL
arch/arm/mach-prima2/clock.c +925 -264

1,388 lines not on this page · raw message

arch/arm/mach-prima2/prima2.c +0 -1
index 8f0429d..e9a17ae 100644
@@ -38,7 +38,6 @@ static const char *prima2cb_dt_match[] __initdata = {
 MACHINE_START(PRIMA2_EVB, "prima2cb")
 	/* Maintainer: Barry Song <[email protected]> */
 	.atag_offset	= 0x100,
-	.init_early     = sirfsoc_of_clk_init,
 	.map_io         = sirfsoc_map_lluart,
 	.init_irq	= sirfsoc_of_irq_init,
 	.timer		= &sirfsoc_timer,
arch/arm/mach-prima2/timer.c +7 -1
index f224107..d95bf25 100644
@@ -21,6 +21,8 @@
 #include <asm/sched_clock.h>
 #include <asm/mach/time.h>
 
+#include "common.h"
+
 #define SIRFSOC_TIMER_COUNTER_LO	0x0000
 #define SIRFSOC_TIMER_COUNTER_HI	0x0004
 #define SIRFSOC_TIMER_MATCH_0		0x0008
@@ -188,9 +190,13 @@ static void __init sirfsoc_clockevent_init(void)
 static void __init sirfsoc_timer_init(void)
 {
 	unsigned long rate;
+	struct clk *clk;
+
+	/* initialize clocking early, we want to set the OS timer */
+	sirfsoc_of_clk_init();
 
 	/* timer's input clock is io clock */
-	struct clk *clk = clk_get_sys("io", NULL);
+	clk = clk_get_sys("io", NULL);
 
 	BUG_ON(IS_ERR(clk));
 
Signature · 6 lines
1.7.1



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
author
#1 lore raw

PATCH v3 2/2 clk: prima2: move from arch/arm/mach to drivers/clk

From: Barry Song <[email protected]>

---
-v3: rebase againest 3.6-rc1;

 arch/arm/mach-prima2/Makefile |    1 -
 arch/arm/mach-prima2/clock.c  | 1171 -----------------------------------------
 drivers/clk/Makefile          |    1 +
 drivers/clk/clk-sirf.c        | 1171 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 1172 insertions(+), 1172 deletions(-)
 delete mode 100644 arch/arm/mach-prima2/clock.c
 create mode 100644 drivers/clk/clk-sirf.c
arch/arm/mach-prima2/Makefile +0 -1
index 13dd160..841847d 100644
@@ -1,6 +1,5 @@
 obj-y := timer.o
 obj-y += irq.o
-obj-y += clock.o
 obj-y += rstc.o
 obj-y += prima2.o
 obj-y += rtciobrg.o
arch/arm/mach-prima2/clock.c deleted +0 -1171

1,171 lines not on this page · raw message

drivers/clk/Makefile +1 -0
index 5869ea3..614fed3 100644
@@ -10,6 +10,7 @@ obj-$(CONFIG_ARCH_SOCFPGA)	+= socfpga/
 obj-$(CONFIG_PLAT_SPEAR)	+= spear/
 obj-$(CONFIG_ARCH_U300)		+= clk-u300.o
 obj-$(CONFIG_ARCH_INTEGRATOR)	+= versatile/
+obj-$(CONFIG_ARCH_PRIMA2)      += clk-sirf.o
 
 # Chip specific
 obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
drivers/clk/clk-sirf.c new file +1171 -0

1,171 lines not on this page · raw message

Signature · 6 lines
1.7.1



Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog