Skip to content
Snippets Groups Projects
Commit 9682bcde authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change


The CLOCKSOURCE_OF_DECLARE functions now take a device_node pointer
as their argument, as of the clksrc/cleanup branch in arm-soc.
This patch adapts the bcm_kona_timer driver to the new interface.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarChristian Daudt <csd@broadcom.com>
Cc: John Stultz <john.stultz@linaro.org>
parent a857c6e7
No related merge requests found
...@@ -103,16 +103,10 @@ static const struct of_device_id bcm_timer_ids[] __initconst = { ...@@ -103,16 +103,10 @@ static const struct of_device_id bcm_timer_ids[] __initconst = {
{}, {},
}; };
static void __init kona_timers_init(void) static void __init kona_timers_init(struct device_node *node)
{ {
struct device_node *node;
u32 freq; u32 freq;
node = of_find_matching_node(NULL, bcm_timer_ids);
if (!node)
panic("No timer");
if (!of_property_read_u32(node, "clock-frequency", &freq)) if (!of_property_read_u32(node, "clock-frequency", &freq))
arch_timer_rate = freq; arch_timer_rate = freq;
else else
...@@ -199,13 +193,12 @@ static struct irqaction kona_timer_irq = { ...@@ -199,13 +193,12 @@ static struct irqaction kona_timer_irq = {
.handler = kona_timer_interrupt, .handler = kona_timer_interrupt,
}; };
static void __init kona_timer_init(void) static void __init kona_timer_init(struct device_node *node)
{ {
kona_timers_init(); kona_timers_init(node);
kona_timer_clockevents_init(); kona_timer_clockevents_init();
setup_irq(timers.tmr_irq, &kona_timer_irq); setup_irq(timers.tmr_irq, &kona_timer_irq);
kona_timer_set_next_event((arch_timer_rate / HZ), NULL); kona_timer_set_next_event((arch_timer_rate / HZ), NULL);
} }
CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", kona_timer_init);
kona_timer_init);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment