Re: [PATCH v3 2/5] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding

2018-05-02 Thread Stephen Boyd
Quoting Geert Uytterhoeven (2018-04-18 07:50:02)
> Signed-off-by: Geert Uytterhoeven 
> Acked-by: Daniel Lezcano 
> ---

Applied to clk-next



Re: [PATCH v3 2/5] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding

2018-05-02 Thread Stephen Boyd
Quoting Geert Uytterhoeven (2018-04-18 07:50:02)
> Signed-off-by: Geert Uytterhoeven 
> Acked-by: Daniel Lezcano 
> ---

Applied to clk-next



[PATCH v3 2/5] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding

2018-04-18 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven 
Acked-by: Daniel Lezcano 
---
This depends on "[PATCH v3 1/5] clk: Extract OF clock helpers in
".

v3:
  - Add Acked-by,

v2:
  - of_clk_get_parent_count() was moved to ,
  - Dropped RFC, as a dummy is now available in the !CONFIG_COMMON_CLK
case.
---
 drivers/clocksource/timer-sp804.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-sp804.c 
b/drivers/clocksource/timer-sp804.c
index 3ac9dec9a03852f9..e01222ea888ff9d2 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -245,7 +246,7 @@ static int __init sp804_of_init(struct device_node *np)
clk1 = NULL;
 
/* Get the 2nd clock if the timer has 3 timer clocks */
-   if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) {
+   if (of_clk_get_parent_count(np) == 3) {
clk2 = of_clk_get(np, 1);
if (IS_ERR(clk2)) {
pr_err("sp804: %s clock not found: %d\n", np->name,
-- 
2.7.4



[PATCH v3 2/5] ARM: timer-sp: Use of_clk_get_parent_count() instead of open coding

2018-04-18 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven 
Acked-by: Daniel Lezcano 
---
This depends on "[PATCH v3 1/5] clk: Extract OF clock helpers in
".

v3:
  - Add Acked-by,

v2:
  - of_clk_get_parent_count() was moved to ,
  - Dropped RFC, as a dummy is now available in the !CONFIG_COMMON_CLK
case.
---
 drivers/clocksource/timer-sp804.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-sp804.c 
b/drivers/clocksource/timer-sp804.c
index 3ac9dec9a03852f9..e01222ea888ff9d2 100644
--- a/drivers/clocksource/timer-sp804.c
+++ b/drivers/clocksource/timer-sp804.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -245,7 +246,7 @@ static int __init sp804_of_init(struct device_node *np)
clk1 = NULL;
 
/* Get the 2nd clock if the timer has 3 timer clocks */
-   if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) {
+   if (of_clk_get_parent_count(np) == 3) {
clk2 = of_clk_get(np, 1);
if (IS_ERR(clk2)) {
pr_err("sp804: %s clock not found: %d\n", np->name,
-- 
2.7.4