ARM: PRIMA2: convert to common clk and finish full clk tree
Subsystems (3)
PATCH RESEND v2 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.
Signed-off-by Binghua Duan <[email protected]>
Signed-off-by Barry Song <[email protected]>
---
-v2: fix a trailing whitespace
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
@@ -394,7 +394,7 @@ config ARCH_PRIMA2 select CPU_V7 select NO_IOPORT 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
@@ -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
@@ -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
PATCH RESEND v2 2/2 clk: prima2: move from arch/arm/mach to drivers/clk
From: Barry Song <[email protected]>
Signed-off-by Barry Song <[email protected]>
Cc Arnd Bergmann <[email protected]>
--- arch/arm/mach-prima2/Makefile | 1 - drivers/clk/Makefile | 1 + .../mach-prima2/clock.c => drivers/clk/clk-sirf.c | 0 3 files changed, 1 insertions(+), 1 deletions(-) rename arch/arm/mach-prima2/clock.c => drivers/clk/clk-sirf.c (100%)
arch/arm/mach-prima2/Makefile +0 -1
@@ -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
drivers/clk/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-$(CONFIG_COMMON_CLK) += clk.o clk-fixed-rate.o clk-gate.o \ # SoCs specific obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o obj-$(CONFIG_ARCH_MXS) += mxs/ +obj-$(CONFIG_ARCH_PRIMA2) += clk-sirf.o obj-$(CONFIG_PLAT_SPEAR) += spear/ obj-$(CONFIG_ARCH_U300) += clk-u300.o obj-$(CONFIG_ARCH_INTEGRATOR) += versatile/
drivers/clk/clk-sirf.c renamed from arch/arm/mach-prima2/clock.c +0 -0
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
PATCH RESEND v2 2/2 clk: prima2: move from arch/arm/mach to drivers/clk
Quoted 4 lines · Barry Song
From: Barry Song <[email protected]>
Signed-off-by Barry Song <[email protected]>Cc Arnd Bergmann <[email protected]>
Acked-by Arnd Bergmann <[email protected]>