diff options
author | Olof Johansson <olof@lixom.net> | 2013-10-07 12:47:31 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-10-07 12:47:31 -0400 |
commit | c884357ec6e27c7967c78fb111cc8a830881f43b (patch) | |
tree | 2754220c4b8bcec3fda1f25153af2f472e00f4ef /arch/arm/mach-nomadik/cpu-8815.c | |
parent | ec01791d0ff7593fbca21a93167138a49bb94768 (diff) | |
parent | 64cc69abbb32e17aa44d2c696eca65cb6f9364ca (diff) |
Merge branch 'clk-of-init-v2_for-3.13' of https://github.com/shesselba/linux-dove into next/cleanup
From Sebastian Hasselbarth:
This is a patch set based on an RFC [1][2] sent earlier to provide
a common arch/arm init for DT clock providers. Currently, the call to
of_clk_init(NULL) to initialize DT clock providers is spread among several
mach-dirs. Since most machs require DT clocks initialized before timers,
no initcall can be used.
By adding of_clk_init(NULL) to arch/arm time_init(), we can remove all
mach-specific .init_time hooks that basically called of_clk_init and
clocksource_of_init.
In contrast to the RFC version, of_clk_init(NULL) is now only called if
no custom .init_time callback is set. This allows some machs to still
call clock init themselves, as not all can be converted now. Therefore,
this patch sets drops conversion of mach-mvebu and mach-zynq. New machs
that were introduced with v3.12-rc1 are also converted, except mach-u300
that requires clocks before irqs.
* 'clk-of-init-v2_for-3.13' of https://github.com/shesselba/linux-dove: (29 commits)
ARM: vt8500: remove custom .init_time hook
ARM: vexpress: remove custom .init_time hook
ARM: tegra: remove custom .init_time hook
ARM: sunxi: remove custom .init_time hook
ARM: sti: remove custom .init_time hook
ARM: socfpga: remove custom .init_time hook
ARM: rockchip: remove custom .init_time hook
ARM: prima2: remove custom .init_time hook
ARM: nspire: remove custom .init_time hook
ARM: nomadik: remove custom .init_time hook
ARM: mxs: remove custom .init_time hook
ARM: kirkwood: remove custom .init_time hook
ARM: imx: remove custom .init_time hook
ARM: highbank: remove custom .init_time hook
ARM: exynos: remove custom .init_time hook
ARM: dove: remove custom .init_time hook
ARM: bcm2835: remove custom .init_time hook
ARM: bcm: provide common arch init for DT clocks
ARM: call of_clk_init from default time_init handler
ARM: vt8500: prepare for arch-wide .init_time callback
...
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-nomadik/cpu-8815.c')
-rw-r--r-- | arch/arm/mach-nomadik/cpu-8815.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index c6c156e5570e..cce2c9dfb5d1 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
@@ -25,8 +25,6 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
27 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
28 | #include <linux/platform_data/clk-nomadik.h> | ||
29 | #include <linux/clocksource.h> | ||
30 | #include <linux/of_irq.h> | 28 | #include <linux/of_irq.h> |
31 | #include <linux/of_gpio.h> | 29 | #include <linux/of_gpio.h> |
32 | #include <linux/of_address.h> | 30 | #include <linux/of_address.h> |
@@ -111,39 +109,6 @@ static void cpu8815_restart(enum reboot_mode mode, const char *cmd) | |||
111 | writel(1, srcbase + 0x18); | 109 | writel(1, srcbase + 0x18); |
112 | } | 110 | } |
113 | 111 | ||
114 | /* Initial value for SRC control register: all timers use MXTAL/8 source */ | ||
115 | #define SRC_CR_INIT_MASK 0x00007fff | ||
116 | #define SRC_CR_INIT_VAL 0x2aaa8000 | ||
117 | |||
118 | static void __init cpu8815_timer_init_of(void) | ||
119 | { | ||
120 | struct device_node *mtu; | ||
121 | void __iomem *base; | ||
122 | int irq; | ||
123 | u32 src_cr; | ||
124 | |||
125 | /* We need this to be up now */ | ||
126 | nomadik_clk_init(); | ||
127 | |||
128 | mtu = of_find_node_by_path("/mtu@101e2000"); | ||
129 | if (!mtu) | ||
130 | return; | ||
131 | base = of_iomap(mtu, 0); | ||
132 | if (WARN_ON(!base)) | ||
133 | return; | ||
134 | irq = irq_of_parse_and_map(mtu, 0); | ||
135 | |||
136 | pr_info("Remapped MTU @ %p, irq: %d\n", base, irq); | ||
137 | |||
138 | /* Configure timer sources in "system reset controller" ctrl reg */ | ||
139 | src_cr = readl(base); | ||
140 | src_cr &= SRC_CR_INIT_MASK; | ||
141 | src_cr |= SRC_CR_INIT_VAL; | ||
142 | writel(src_cr, base); | ||
143 | |||
144 | clocksource_of_init(); | ||
145 | } | ||
146 | |||
147 | /* | 112 | /* |
148 | * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects | 113 | * The SMSC911x IRQ is connected to a GPIO pin, but the driver expects |
149 | * to simply request an IRQ passed as a resource. So the GPIO pin needs | 114 | * to simply request an IRQ passed as a resource. So the GPIO pin needs |
@@ -226,7 +191,6 @@ static const char * cpu8815_board_compat[] = { | |||
226 | 191 | ||
227 | DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") | 192 | DT_MACHINE_START(NOMADIK_DT, "Nomadik STn8815") |
228 | .map_io = cpu8815_map_io, | 193 | .map_io = cpu8815_map_io, |
229 | .init_time = cpu8815_timer_init_of, | ||
230 | .init_machine = cpu8815_init_of, | 194 | .init_machine = cpu8815_init_of, |
231 | .restart = cpu8815_restart, | 195 | .restart = cpu8815_restart, |
232 | .dt_compat = cpu8815_board_compat, | 196 | .dt_compat = cpu8815_board_compat, |