Skip to contentSkip to conversation

clocksource: of: respect device tree node status

PATCH RESEND In review Sebastian Hesselbarth 2 participants 4 messages Sep 19, 2013 – Sep 26, 2013 Clocksource, clockevent drivers

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 clocksource: of: respect device tree node status

Clocksource devices provided by DT can be disabled (status != "okay"). Instead of registering clocksource drivers for disabled nodes, respect the device's status by skiping disabled nodes.

---
Cc: Daniel Lezcano <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]

---
 drivers/clocksource/clksrc-of.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/clocksource/clksrc-of.c +3 -0
index 37f5325..b9ddd9e 100644
@@ -30,6 +30,9 @@ void __init clocksource_of_init(void)
 	clocksource_of_init_fn init_func;
  	for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
+		if (!of_device_is_available(np))
+			continue;
+
 		init_func = match->data;
 		init_func(np);
 	}
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 5 lines · Sebastian Hesselbarth

Clocksource devices provided by DT can be disabled (status != "okay"). Instead of registering clocksource drivers for disabled nodes, respect the device's status by skiping disabled nodes.

Shall it be applied as a 3.12 fix ?

Quoted 22 lines

---
Cc: Daniel Lezcano <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]

---
 drivers/clocksource/clksrc-of.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/clocksource/clksrc-of.c +3 -0
index 37f5325..b9ddd9e 100644
@@ -30,6 +30,9 @@ void __init clocksource_of_init(void)
     clocksource_of_init_fn init_func;
      for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
+        if (!of_device_is_available(np))
+            continue;
+
         init_func = match->data;
         init_func(np);
     }
Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#2 lore raw
Quoted 8 lines · Daniel Lezcano
Quoted 5 lines · Sebastian Hesselbarth

Clocksource devices provided by DT can be disabled (status != "okay"). Instead of registering clocksource drivers for disabled nodes, respect the device's status by skiping disabled nodes.

Shall it be applied as a 3.12 fix ?

Daniel,

difficult to say. Although I am not aware of any mainline mach depends on it, I consider this a fix. So, if there are no objections please apply for 3.12.

Sebastian

Quoted 24 lines
Quoted 22 lines

---
Cc: Daniel Lezcano <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]

---
  drivers/clocksource/clksrc-of.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
drivers/clocksource/clksrc-of.c +3 -0
index 37f5325..b9ddd9e 100644
@@ -30,6 +30,9 @@ void __init clocksource_of_init(void)
      clocksource_of_init_fn init_func;
       for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
+        if (!of_device_is_available(np))
+            continue;
+
          init_func = match->data;
          init_func(np);
      }
#3 lore raw
Quoted 8 lines · Sebastian Hesselbarth
Quoted 7 lines · Daniel Lezcano
Quoted 5 lines · Sebastian Hesselbarth

Clocksource devices provided by DT can be disabled (status != "okay"). Instead of registering clocksource drivers for disabled nodes, respect the device's status by skiping disabled nodes.

Quoted 7 lines
Quoted 1 line

Shall it be applied as a 3.12 fix ?

Daniel,

difficult to say. Although I am not aware of any mainline mach depends on it, I consider this a fix. So, if there are no objections please apply for 3.12.

Ok, applied to my tree.

Thanks
-- Daniel

Quoted 25 lines
Quoted 24 lines
Quoted 22 lines

---
Cc: Daniel Lezcano <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]

---
  drivers/clocksource/clksrc-of.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
drivers/clocksource/clksrc-of.c +3 -0
index 37f5325..b9ddd9e 100644
@@ -30,6 +30,9 @@ void __init clocksource_of_init(void)
      clocksource_of_init_fn init_func;
       for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
+        if (!of_device_is_available(np))
+            continue;
+
          init_func = match->data;
          init_func(np);
      }
Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog