Skip to contentSkip to conversation

clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change

PATCH New Arnd Bergmann 2 participants 3 messages May 31, 2013 – Jun 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

This causes an annoying but harmless build-time warning, it would be nice to have this fixed in 3.10.

Cc Christian Daudt <[email protected]>
Cc John Stultz <[email protected]>

---

drivers/clocksource/bcm_kona_timer.c +4 -11
index 350f493..ba3d859 100644
@@ -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;
 
-	node = of_find_matching_node(NULL, bcm_timer_ids);
-
-	if (!node)
-		panic("No timer");
-
 	if (!of_property_read_u32(node, "clock-frequency", &freq))
 		arch_timer_rate = freq;
 	else
@@ -199,13 +193,12 @@ static struct irqaction kona_timer_irq = {
 	.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();
 	setup_irq(timers.tmr_irq, &kona_timer_irq);
 	kona_timer_set_next_event((arch_timer_rate / HZ), NULL);
 }
 
-CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer",
-	kona_timer_init);
+CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", kona_timer_init);
#1 lore raw

PATCH 1/1 clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change

Quoted 42 lines · Arnd Bergmann

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.

This causes an annoying but harmless build-time warning, it would be nice to have this fixed in 3.10.

Cc Christian Daudt <[email protected]>
Cc John Stultz <[email protected]>

---

drivers/clocksource/bcm_kona_timer.c +2 -8
index 350f493..ba3d859 100644
@@ -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;
 
-	node = of_find_matching_node(NULL, bcm_timer_ids);
-
-	if (!node)
-		panic("No timer");
-
  	if (!of_property_read_u32(node, "clock-frequency", &freq))
  		arch_timer_rate = freq;
  	else
@@ -199,13 +193,12 @@ static struct irqaction kona_timer_irq = {
  	.handler = kona_timer_interrupt,
  };
 
-static void __init kona_timer_init(void)
+static void __init kona_timer_init(struct device_node *node)
  {

drivers/clocksource/bcm_kona_timer.c static struct irqaction kona_timer_irq = { · line 204

Quoted 10 lines
drivers/clocksource/bcm_kona_timer.c +2 -3
-	kona_timers_init();
+	kona_timers_init(node);
  	kona_timer_clockevents_init();
  	setup_irq(timers.tmr_irq, &kona_timer_irq);
  	kona_timer_set_next_event((arch_timer_rate / HZ), NULL);
  }
 
-CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer",
-	kona_timer_init);
+CLOCKSOURCE_OF_DECLARE(bcm_kona, "bcm,kona-timer", kona_timer_init);

Do you want this for 3.10 or should I add to my 3.11 tree ?
Thanks,
csd

#2 lore raw

PATCH 1/1 clocksource: kona: adapt to CLOCKSOURCE_OF_DECLARE change

Quoted 4 lines · Christian Daudt
Quoted 1 line

Do you want this for 3.10 or should I add to my 3.11 tree ?

I've applied it to the next/fixes-non-critical branch with your ack now, scheduled for 3.11.

Arnd