Commit f5409092 authored by Felipe Balbi's avatar Felipe Balbi

arm: omap2: timer: add a gptimer argument to sync32k_timer_init()

as it turns out, __omap_gptimer_init() and
__omap_sync32k_timer_init() are essentially
the same thing, but __omap_gptimer_init() wants
to always use gptimer.

Instead of forcing all those devices to pass
a use_gptimer cmdline argument, we add a new
function argument to __omap_sync32k_timer_init()
in preparation to deleting __omap_gptimer_init().

On a follow-up patch, we will remove uses of
__omap_gptimer_init() and replace them with
__omap_sync32k_timer_init() and pass the last
argument as true.
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent be0ac4c3
...@@ -604,14 +604,14 @@ static void __init __omap_gptimer_init(int clkev_nr, const char *clkev_src, ...@@ -604,14 +604,14 @@ static void __init __omap_gptimer_init(int clkev_nr, const char *clkev_src,
static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src, static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src,
const char *clkev_prop, int clksrc_nr, const char *clksrc_src, const char *clkev_prop, int clksrc_nr, const char *clksrc_src,
const char *clksrc_prop) const char *clksrc_prop, bool gptimer)
{ {
omap_clk_init(); omap_clk_init();
omap_dmtimer_init(); omap_dmtimer_init();
omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop); omap2_gp_clockevent_init(clkev_nr, clkev_src, clkev_prop);
/* Enable the use of clocksource="gp_timer" kernel parameter */ /* Enable the use of clocksource="gp_timer" kernel parameter */
if (use_gptimer_clksrc) if (use_gptimer_clksrc || gptimer)
omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src, omap2_gptimer_clocksource_init(clksrc_nr, clksrc_src,
clksrc_prop); clksrc_prop);
else else
...@@ -622,7 +622,7 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src ...@@ -622,7 +622,7 @@ static void __init __omap_sync32k_timer_init(int clkev_nr, const char *clkev_src
void __init omap2_sync32k_timer_init(void) void __init omap2_sync32k_timer_init(void)
{ {
__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",
2, "timer_sys_ck", NULL); 2, "timer_sys_ck", NULL, false);
} }
#endif /* CONFIG_ARCH_OMAP2 */ #endif /* CONFIG_ARCH_OMAP2 */
...@@ -630,13 +630,13 @@ void __init omap2_sync32k_timer_init(void) ...@@ -630,13 +630,13 @@ void __init omap2_sync32k_timer_init(void)
void __init omap3_sync32k_timer_init(void) void __init omap3_sync32k_timer_init(void)
{ {
__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",
2, "timer_sys_ck", NULL); 2, "timer_sys_ck", NULL, false);
} }
void __init omap3_secure_sync32k_timer_init(void) void __init omap3_secure_sync32k_timer_init(void)
{ {
__omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure", __omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure",
2, "timer_sys_ck", NULL); 2, "timer_sys_ck", NULL, false);
} }
#endif /* CONFIG_ARCH_OMAP3 */ #endif /* CONFIG_ARCH_OMAP3 */
...@@ -653,7 +653,7 @@ void __init omap3_gptimer_timer_init(void) ...@@ -653,7 +653,7 @@ void __init omap3_gptimer_timer_init(void)
static void __init omap4_sync32k_timer_init(void) static void __init omap4_sync32k_timer_init(void)
{ {
__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",
2, "sys_clkin_ck", NULL); 2, "sys_clkin_ck", NULL, false);
} }
void __init omap4_local_timer_init(void) void __init omap4_local_timer_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment