Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: highbank: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks. Highbank clock provider need a reference
to system registers, as a workaround current clk driver maps those
independent of arch code now.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Mike Turquette <mturquette@linaro.org>

+14 -19
+7 -16
arch/arm/mach-highbank/highbank.c
··· 24 24 #include <linux/of_platform.h> 25 25 #include <linux/of_address.h> 26 26 #include <linux/amba/bus.h> 27 - #include <linux/clk-provider.h> 28 27 29 28 #include <asm/cacheflush.h> 30 29 #include <asm/cputype.h> ··· 80 81 l2x0_of_init(0, ~0UL); 81 82 outer_cache.disable = highbank_l2x0_disable; 82 83 } 83 - } 84 - 85 - static void __init highbank_timer_init(void) 86 - { 87 - struct device_node *np; 88 - 89 - /* Map system registers */ 90 - np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); 91 - sregs_base = of_iomap(np, 0); 92 - WARN_ON(!sregs_base); 93 - 94 - of_clk_init(NULL); 95 - 96 - clocksource_of_init(); 97 84 } 98 85 99 86 static void highbank_power_off(void) ··· 140 155 141 156 static void __init highbank_init(void) 142 157 { 158 + struct device_node *np; 159 + 160 + /* Map system registers */ 161 + np = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); 162 + sregs_base = of_iomap(np, 0); 163 + WARN_ON(!sregs_base); 164 + 143 165 pm_power_off = highbank_power_off; 144 166 highbank_pm_init(); 145 167 ··· 168 176 #endif 169 177 .smp = smp_ops(highbank_smp_ops), 170 178 .init_irq = highbank_init_irq, 171 - .init_time = highbank_timer_init, 172 179 .init_machine = highbank_init, 173 180 .dt_compat = highbank_match, 174 181 .restart = highbank_restart,
+7 -3
drivers/clk/clk-highbank.c
··· 20 20 #include <linux/clk-provider.h> 21 21 #include <linux/io.h> 22 22 #include <linux/of.h> 23 - 24 - extern void __iomem *sregs_base; 23 + #include <linux/of_address.h> 25 24 26 25 #define HB_PLL_LOCK_500 0x20000000 27 26 #define HB_PLL_LOCK 0x10000000 ··· 279 280 const char *clk_name = node->name; 280 281 const char *parent_name; 281 282 struct clk_init_data init; 283 + struct device_node *srnp; 282 284 int rc; 283 285 284 286 rc = of_property_read_u32(node, "reg", &reg); ··· 290 290 if (WARN_ON(!hb_clk)) 291 291 return NULL; 292 292 293 - hb_clk->reg = sregs_base + reg; 293 + /* Map system registers */ 294 + srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs"); 295 + hb_clk->reg = of_iomap(srnp, 0); 296 + BUG_ON(!hb_clk->reg); 297 + hb_clk->reg += reg; 294 298 295 299 of_property_read_string(node, "clock-output-names", &clk_name); 296 300