From 4db7634336156254b179b66f6a9fe90d75c44ee4 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 18:31:14 +0200 Subject: ARM: nomadik: remove mtu initalization from .init_time Nomadik clock initialization is properly done in clk-nomadik since patch "clk: nomadik: set all timers to use 2.4 MHz TIMCLK". Therefore, this patch removes now redundant mtu initialization from .init_time callback. Signed-off-by: Sebastian Hesselbarth Acked-by: Linus Walleij --- arch/arm/mach-nomadik/cpu-8815.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'arch/arm/mach-nomadik/cpu-8815.c') diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 13e0df9c11ce..0fcb14966d5a 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -113,36 +113,10 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) writel(1, srcbase + 0x18); } -/* Initial value for SRC control register: all timers use MXTAL/8 source */ -#define SRC_CR_INIT_MASK 0x00007fff -#define SRC_CR_INIT_VAL 0x2aaa8000 - static void __init cpu8815_timer_init_of(void) { - struct device_node *mtu; - void __iomem *base; - int irq; - u32 src_cr; - /* We need this to be up now */ nomadik_clk_init(); - - mtu = of_find_node_by_path("/mtu@101e2000"); - if (!mtu) - return; - base = of_iomap(mtu, 0); - if (WARN_ON(!base)) - return; - irq = irq_of_parse_and_map(mtu, 0); - - pr_info("Remapped MTU @ %p, irq: %d\n", base, irq); - - /* Configure timer sources in "system reset controller" ctrl reg */ - src_cr = readl(base); - src_cr &= SRC_CR_INIT_MASK; - src_cr |= SRC_CR_INIT_VAL; - writel(src_cr, base); - clocksource_of_init(); } -- cgit v1.2.1 From 74227e65f9742f559f6e243ba2c9a983e1f1221d Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Tue, 17 Sep 2013 00:32:34 +0200 Subject: clk: nomadik: declare OF clock provider Common clock framework allows to register clock providers to get called on of_clk_init() by using CLK_OF_DECLARE. This converts nomadik clock provider to make use of it and get rid of the mach specific clk init call. As clocks require system reset controller base address to be initialized each clock driver checks src_base and calls new nomadik_src_init if required. Signed-off-by: Sebastian Hesselbarth Acked-by: Linus Walleij Acked-by: Mike Turquette --- arch/arm/mach-nomadik/cpu-8815.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-nomadik/cpu-8815.c') diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 0fcb14966d5a..2be38a00a3d9 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -115,8 +115,7 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) static void __init cpu8815_timer_init_of(void) { - /* We need this to be up now */ - nomadik_clk_init(); + of_clk_init(NULL); clocksource_of_init(); } -- cgit v1.2.1 From e70ded64e6e08d7d35932b4a66a791480edfc0d1 Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Wed, 4 Sep 2013 19:09:21 +0200 Subject: ARM: nomadik: remove custom .init_time hook With arch/arm calling of_clk_init(NULL) from time_init(), we can now remove custom .init_time hooks. Signed-off-by: Sebastian Hesselbarth Acked-by: Linus Walleij --- arch/arm/mach-nomadik/cpu-8815.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'arch/arm/mach-nomadik/cpu-8815.c') diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 2be38a00a3d9..53fbf63c8b66 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -25,8 +25,6 @@ #include #include #include -#include -#include #include #include #include @@ -113,12 +111,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) writel(1, srcbase + 0x18); } -static void __init cpu8815_timer_init_of(void) -{ - of_clk_init(NULL); - clocksource_of_init(); -} - static struct fsmc_nand_timings cpu8815_nand_timings = { .thiz = 0, .thold = 0x10, @@ -232,7 +224,6 @@ static const char * cpu8815_board_compat[] = { DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") .map_io = cpu8815_map_io, - .init_time = cpu8815_timer_init_of, .init_machine = cpu8815_init_of, .restart = cpu8815_restart, .dt_compat = cpu8815_board_compat, -- cgit v1.2.1