From: Dinh Nguyen <[email protected]>
Hello,
This is v2 of the patchset that makes use of of_clk_parent_fill helper function
on various platforms.
Thanks,
Dinh Nguyen (6):
clk: at91: make use of of_clk_parent_fill helper function
clk: qoriq: make use of of_clk_parent_fill helper function
clk: keystone: make use of of_clk_parent_fill helper function
clk: st: make use of of_clk_parent_fill helper function
clk: sunxi: make use of of_clk_parent_fill helper function
clk: ti: make use of of_clk_parent_fill helper function
drivers/clk/at91/clk-main.c | 7 +------
drivers/clk/at91/clk-master.c | 7 +------
drivers/clk/at91/clk-programmable.c | 7 +------
drivers/clk/at91/clk-slow.c | 14 ++------------
drivers/clk/at91/clk-smd.c | 7 +------
drivers/clk/at91/clk-usb.c | 7 +------
drivers/clk/clk-qoriq.c | 5 ++---
drivers/clk/keystone/pll.c | 3 +--
drivers/clk/st/clk-flexgen.c | 6 ++----
drivers/clk/st/clkgen-mux.c | 7 ++-----
drivers/clk/sunxi/clk-a20-gmac.c | 4 +---
drivers/clk/sunxi/clk-factors.c | 4 +---
drivers/clk/sunxi/clk-sun6i-ar100.c | 3 +--
drivers/clk/sunxi/clk-sunxi.c | 10 ++--------
drivers/clk/ti/apll.c | 4 +---
drivers/clk/ti/composite.c | 4 +---
drivers/clk/ti/dpll.c | 4 +---
drivers/clk/ti/fapll.c | 3 +--
drivers/clk/ti/mux.c | 4 +---
19 files changed, 24 insertions(+), 86 deletions(-)
--
1.7.9.5
From: Dinh Nguyen <[email protected]>
Use of_clk_parent_fill to fill in the parent clock names' array.
Signed-off-by: Dinh Nguyen <[email protected]>
Cc: Boris Brezillon <[email protected]>
---
drivers/clk/at91/clk-main.c | 7 +------
drivers/clk/at91/clk-master.c | 7 +------
drivers/clk/at91/clk-programmable.c | 7 +------
drivers/clk/at91/clk-slow.c | 14 ++------------
drivers/clk/at91/clk-smd.c | 7 +------
drivers/clk/at91/clk-usb.c | 7 +------
6 files changed, 7 insertions(+), 42 deletions(-)
diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c
index c240045..13f481b 100644
--- a/drivers/clk/at91/clk-main.c
+++ b/drivers/clk/at91/clk-main.c
@@ -612,17 +612,12 @@ void __init of_at91sam9x5_clk_main_setup(struct device_node *np,
int num_parents;
unsigned int irq;
const char *name = np->name;
- int i;
num_parents = of_clk_get_parent_count(np);
if (num_parents <= 0 || num_parents > 2)
return;
- for (i = 0; i < num_parents; ++i) {
- parent_names[i] = of_clk_get_parent_name(np, i);
- if (!parent_names[i])
- return;
- }
+ of_clk_parent_fill(np, parent_names, num_parents);
of_property_read_string(np, "clock-output-names", &name);
diff --git a/drivers/clk/at91/clk-master.c b/drivers/clk/at91/clk-master.c
index f98eafe..38f646d 100644
--- a/drivers/clk/at91/clk-master.c
+++ b/drivers/clk/at91/clk-master.c
@@ -218,7 +218,6 @@ of_at91_clk_master_setup(struct device_node *np, struct at91_pmc *pmc,
{
struct clk *clk;
int num_parents;
- int i;
unsigned int irq;
const char *parent_names[MASTER_SOURCE_MAX];
const char *name = np->name;
@@ -228,11 +227,7 @@ of_at91_clk_master_setup(struct device_node *np, struct at91_pmc *pmc,
if (num_parents <= 0 || num_parents > MASTER_SOURCE_MAX)
return;
- for (i = 0; i < num_parents; ++i) {
- parent_names[i] = of_clk_get_parent_name(np, i);
- if (!parent_names[i])
- return;
- }
+ of_clk_parent_fill(np, parent_names, num_parents);
of_property_read_string(np, "clock-output-names", &name);
diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c
index 8c86c0f..21492ac 100644
--- a/drivers/clk/at91/clk-programmable.c
+++ b/drivers/clk/at91/clk-programmable.c
@@ -230,7 +230,6 @@ of_at91_clk_prog_setup(struct device_node *np, struct at91_pmc *pmc,
{
int num;
u32 id;
- int i;
struct clk *clk;
int num_parents;
const char *parent_names[PROG_SOURCE_MAX];
@@ -241,11 +240,7 @@ of_at91_clk_prog_setup(struct device_node *np, struct at91_pmc *pmc,
if (num_parents <= 0 || num_parents > PROG_SOURCE_MAX)
return;
- for (i = 0; i < num_parents; ++i) {
- parent_names[i] = of_clk_get_parent_name(np, i);
- if (!parent_names[i])
- return;
- }
+ of_clk_parent_fill(np, parent_names, num_parents);
num = of_get_child_count(np);
if (!num || num > (PROG_ID_MAX + 1))
diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c
index 98a84a8..84c19d7 100644
--- a/drivers/clk/at91/clk-slow.c
+++ b/drivers/clk/at91/clk-slow.c
@@ -371,17 +371,12 @@ void __init of_at91sam9x5_clk_slow_setup(struct device_node *np,
const char *parent_names[2];
int num_parents;
const char *name = np->name;
- int i;
num_parents = of_clk_get_parent_count(np);
if (num_parents <= 0 || num_parents > 2)
return;
- for (i = 0; i < num_parents; ++i) {
- parent_names[i] = of_clk_get_parent_name(np, i);
- if (!parent_names[i])
- return;
- }
+ of_clk_parent_fill(np, parent_names, num_parents);
of_property_read_string(np, "clock-output-names", &name);
@@ -449,17 +444,12 @@ void __init of_at91sam9260_clk_slow_setup(struct device_node *np,
const char *parent_names[2];
int num_parents;
const char *name = np->name;
- int i;
num_parents = of_clk_get_parent_count(np);
if (num_parents != 2)
return;
- for (i = 0; i < num_parents; ++i) {
- parent_names[i] = of_clk_get_parent_name(np, i);
- if (!parent_names[i])
- return;
- }
+ of_clk_parent_fill(np, parent_names, num_parents);
of_property_read_string(np, "clock-output-names", &name);
diff --git a/drivers/clk/at91/clk-smd.c b/drivers/clk/at91/clk-smd.c
index 3817ea8..a7f8501 100644
--- a/drivers/clk/at91/clk-smd.c
+++ b/drivers/clk/at91/clk-smd.c
@@ -145,7 +145,6 @@ void __init of_at91sam9x5_clk_smd_setup(struct device_node *np,
struct at91_pmc *pmc)
{
struct clk *clk;
- int i;
int num_parents;
const char *parent_names[SMD_SOURCE_MAX];
const char *name = np->name;
@@ -154,11 +153,7 @@ void __init of_at91sam9x5_clk_smd_setup(struct device_node *np,
if (num_parents <= 0 || num_parents > SMD_SOURCE_MAX)
return;
- for (i = 0; i < num_parents; i++) {
- parent_names[i] = of_clk_get_parent_name(np, i);
- if (!parent_names[i])
- return;
- }
+ of_clk_parent_fill(np, parent_names, num_parents);
of_property_read_string(np, "clock-output-names", &name);
diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
index b0cbd2b..b3cbf45 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -373,7 +373,6 @@ void __init of_at91sam9x5_clk_usb_setup(struct device_node *np,
struct at91_pmc *pmc)
{
struct clk *clk;
- int i;
int num_parents;
const char *parent_names[USB_SOURCE_MAX];
const char *name = np->name;
@@ -382,11 +381,7 @@ void __init of_at91sam9x5_clk_usb_setup(struct device_node *np,
if (num_parents <= 0 || num_parents > USB_SOURCE_MAX)
return;
- for (i = 0; i < num_parents; i++) {
- parent_names[i] = of_clk_get_parent_name(np, i);
- if (!parent_names[i])
- return;
- }
+ of_clk_parent_fill(np, parent_names, num_parents);
of_property_read_string(np, "clock-output-names", &name);
--
1.7.9.5
From: Dinh Nguyen <[email protected]>
Use of_clk_parent_fill to fill in the parent clock names' array.
Signed-off-by: Dinh Nguyen <[email protected]>
---
drivers/clk/clk-qoriq.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c
index cda90a9..d3f4570 100644
--- a/drivers/clk/clk-qoriq.c
+++ b/drivers/clk/clk-qoriq.c
@@ -70,7 +70,7 @@ static void __init core_mux_init(struct device_node *np)
struct clk_init_data init;
struct cmux_clk *cmux_clk;
struct device_node *node;
- int rc, count, i;
+ int rc, count;
u32 offset;
const char *clk_name;
const char **parent_names;
@@ -92,8 +92,7 @@ static void __init core_mux_init(struct device_node *np)
if (!parent_names)
return;
- for (i = 0; i < count; i++)
- parent_names[i] = of_clk_get_parent_name(np, i);
+ of_clk_parent_fill(np, parent_names, count);
cmux_clk = kzalloc(sizeof(*cmux_clk), GFP_KERNEL);
if (!cmux_clk)
--
1.7.9.5
From: Dinh Nguyen <[email protected]>
Use of_clk_parent_fill to fill in the parent clock names' array.
Signed-off-by: Dinh Nguyen <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
---
drivers/clk/keystone/pll.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/clk/keystone/pll.c b/drivers/clk/keystone/pll.c
index 4a375ea..d6ef063 100644
--- a/drivers/clk/keystone/pll.c
+++ b/drivers/clk/keystone/pll.c
@@ -309,8 +309,7 @@ static void __init of_pll_mux_clk_init(struct device_node *node)
return;
}
- parents[0] = of_clk_get_parent_name(node, 0);
- parents[1] = of_clk_get_parent_name(node, 1);
+ of_clk_parent_fill(node, parents, 2);
if (!parents[0] || !parents[1]) {
pr_err("%s: missing parent clocks\n", __func__);
return;
--
1.7.9.5
From: Dinh Nguyen <[email protected]>
Use of_clk_parent_fill to fill in the parent clock names' array.
Signed-off-by: Dinh Nguyen <[email protected]>
Tested-by Gabriel Fernandez <[email protected]>
Cc: Peter Griffin <[email protected]>
---
drivers/clk/st/clk-flexgen.c | 6 ++----
drivers/clk/st/clkgen-mux.c | 7 ++-----
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index 657ca14..ed0696c 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -243,7 +243,7 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
int *num_parents)
{
const char **parents;
- int nparents, i;
+ int nparents;
nparents = of_clk_get_parent_count(np);
if (WARN_ON(nparents <= 0))
@@ -253,10 +253,8 @@ static const char ** __init flexgen_get_parents(struct device_node *np,
if (!parents)
return NULL;
- for (i = 0; i < nparents; i++)
- parents[i] = of_clk_get_parent_name(np, i);
+ *num_parents = of_clk_parent_fill(np, parents, nparents);
- *num_parents = nparents;
return parents;
}
diff --git a/drivers/clk/st/clkgen-mux.c b/drivers/clk/st/clkgen-mux.c
index 4fbe6e0..b83654a 100644
--- a/drivers/clk/st/clkgen-mux.c
+++ b/drivers/clk/st/clkgen-mux.c
@@ -24,7 +24,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np,
int *num_parents)
{
const char **parents;
- int nparents, i;
+ int nparents;
nparents = of_clk_get_parent_count(np);
if (WARN_ON(nparents <= 0))
@@ -34,10 +34,7 @@ static const char ** __init clkgen_mux_get_parents(struct device_node *np,
if (!parents)
return ERR_PTR(-ENOMEM);
- for (i = 0; i < nparents; i++)
- parents[i] = of_clk_get_parent_name(np, i);
-
- *num_parents = nparents;
+ *num_parents = of_clk_parent_fill(np, parents, nparents);
return parents;
}
--
1.7.9.5
From: Dinh Nguyen <[email protected]>
Use of_clk_parent_fill to fill in the parent clock names' array.
Signed-off-by: Dinh Nguyen <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: "Emilio López" <[email protected]>
---
v2: Add if (of_clk_parent_fill(node, parents, 2) != 2) to clk-a20-gmac.c
---
drivers/clk/sunxi/clk-a20-gmac.c | 4 +---
drivers/clk/sunxi/clk-factors.c | 4 +---
drivers/clk/sunxi/clk-sun6i-ar100.c | 3 +--
drivers/clk/sunxi/clk-sunxi.c | 10 ++--------
4 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/drivers/clk/sunxi/clk-a20-gmac.c b/drivers/clk/sunxi/clk-a20-gmac.c
index 0dcf4f2..1611b03 100644
--- a/drivers/clk/sunxi/clk-a20-gmac.c
+++ b/drivers/clk/sunxi/clk-a20-gmac.c
@@ -80,9 +80,7 @@ static void __init sun7i_a20_gmac_clk_setup(struct device_node *node)
goto free_mux;
/* gmac clock requires exactly 2 parents */
- parents[0] = of_clk_get_parent_name(node, 0);
- parents[1] = of_clk_get_parent_name(node, 1);
- if (!parents[0] || !parents[1])
+ if (of_clk_parent_fill(node, parents, 2) != 2)
goto free_gate;
reg = of_iomap(node, 0);
diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
index 8c20190..2589457 100644
--- a/drivers/clk/sunxi/clk-factors.c
+++ b/drivers/clk/sunxi/clk-factors.c
@@ -174,9 +174,7 @@ struct clk *sunxi_factors_register(struct device_node *node,
int i = 0;
/* if we have a mux, we will have >1 parents */
- while (i < FACTORS_MAX_PARENTS &&
- (parents[i] = of_clk_get_parent_name(node, i)) != NULL)
- i++;
+ i = of_clk_parent_fill(node, parents, FACTORS_MAX_PARENTS);
/*
* some factor clocks, such as pll5 and pll6, may have multiple
diff --git a/drivers/clk/sunxi/clk-sun6i-ar100.c b/drivers/clk/sunxi/clk-sun6i-ar100.c
index 63cf149..6f229ff 100644
--- a/drivers/clk/sunxi/clk-sun6i-ar100.c
+++ b/drivers/clk/sunxi/clk-sun6i-ar100.c
@@ -195,8 +195,7 @@ static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev)
if (nparents > SUN6I_AR100_MAX_PARENTS)
nparents = SUN6I_AR100_MAX_PARENTS;
- for (i = 0; i < nparents; i++)
- parents[i] = of_clk_get_parent_name(np, i);
+ of_clk_parent_fill(np, parents, nparents);
of_property_read_string(np, "clock-output-names", &clk_name);
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 9a82f17..eed66f8 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -202,10 +202,7 @@ static void __init sun6i_ahb1_clk_setup(struct device_node *node)
return;
/* we have a mux, we will have >1 parents */
- while (i < SUN6I_AHB1_MAX_PARENTS &&
- (parents[i] = of_clk_get_parent_name(node, i)) != NULL)
- i++;
-
+ of_clk_parent_fill(node, parents, SUN6I_AHB1_MAX_PARENTS);
of_property_read_string(node, "clock-output-names", &clk_name);
ahb1 = kzalloc(sizeof(struct sun6i_ahb1_clk), GFP_KERNEL);
@@ -790,10 +787,7 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
reg = of_iomap(node, 0);
- while (i < SUNXI_MAX_PARENTS &&
- (parents[i] = of_clk_get_parent_name(node, i)) != NULL)
- i++;
-
+ of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS);
of_property_read_string(node, "clock-output-names", &clk_name);
clk = clk_register_mux(NULL, clk_name, parents, i,
--
1.7.9.5
From: Dinh Nguyen <[email protected]>
Use of_clk_parent_fill to fill in the parent clock names' array.
Signed-off-by: Dinh Nguyen <[email protected]>
Cc: Tero Kristo <[email protected]>
---
drivers/clk/ti/apll.c | 4 +---
drivers/clk/ti/composite.c | 4 +---
drivers/clk/ti/dpll.c | 4 +---
drivers/clk/ti/fapll.c | 3 +--
drivers/clk/ti/mux.c | 4 +---
5 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
index 49baf38..523880e 100644
--- a/drivers/clk/ti/apll.c
+++ b/drivers/clk/ti/apll.c
@@ -170,7 +170,6 @@ static void __init of_dra7_apll_setup(struct device_node *node)
struct clk_hw_omap *clk_hw = NULL;
struct clk_init_data *init = NULL;
const char **parent_names = NULL;
- int i;
ad = kzalloc(sizeof(*ad), GFP_KERNEL);
clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL);
@@ -195,8 +194,7 @@ static void __init of_dra7_apll_setup(struct device_node *node)
if (!parent_names)
goto cleanup;
- for (i = 0; i < init->num_parents; i++)
- parent_names[i] = of_clk_get_parent_name(node, i);
+ of_clk_parent_fill(node, parent_names, init->num_parents);
init->parent_names = parent_names;
diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c
index 96f83ce..dbef218 100644
--- a/drivers/clk/ti/composite.c
+++ b/drivers/clk/ti/composite.c
@@ -276,7 +276,6 @@ int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw,
int num_parents;
const char **parent_names;
struct component_clk *clk;
- int i;
num_parents = of_clk_get_parent_count(node);
@@ -289,8 +288,7 @@ int __init ti_clk_add_component(struct device_node *node, struct clk_hw *hw,
if (!parent_names)
return -ENOMEM;
- for (i = 0; i < num_parents; i++)
- parent_names[i] = of_clk_get_parent_name(node, i);
+ of_clk_parent_fill(node, parent_names, num_parents);
clk = kzalloc(sizeof(*clk), GFP_KERNEL);
if (!clk) {
diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c
index 2aacf7a..49acdf2 100644
--- a/drivers/clk/ti/dpll.c
+++ b/drivers/clk/ti/dpll.c
@@ -341,7 +341,6 @@ static void __init of_ti_dpll_setup(struct device_node *node,
struct clk_init_data *init = NULL;
const char **parent_names = NULL;
struct dpll_data *dd = NULL;
- int i;
u8 dpll_mode = 0;
dd = kzalloc(sizeof(*dd), GFP_KERNEL);
@@ -370,8 +369,7 @@ static void __init of_ti_dpll_setup(struct device_node *node,
if (!parent_names)
goto cleanup;
- for (i = 0; i < init->num_parents; i++)
- parent_names[i] = of_clk_get_parent_name(node, i);
+ of_clk_parent_fill(node, parent_names, init->num_parents);
init->parent_names = parent_names;
diff --git a/drivers/clk/ti/fapll.c b/drivers/clk/ti/fapll.c
index 730aa62..b1c741b 100644
--- a/drivers/clk/ti/fapll.c
+++ b/drivers/clk/ti/fapll.c
@@ -558,8 +558,7 @@ static void __init ti_fapll_setup(struct device_node *node)
goto free;
}
- parent_name[0] = of_clk_get_parent_name(node, 0);
- parent_name[1] = of_clk_get_parent_name(node, 1);
+ of_clk_parent_fill(node, parent_name, 2);
init->parent_names = parent_name;
fd->clk_ref = of_clk_get(node, 0);
diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c
index 5cdeed5..99fe27e 100644
--- a/drivers/clk/ti/mux.c
+++ b/drivers/clk/ti/mux.c
@@ -190,7 +190,6 @@ static void of_mux_clk_setup(struct device_node *node)
void __iomem *reg;
int num_parents;
const char **parent_names;
- int i;
u8 clk_mux_flags = 0;
u32 mask = 0;
u32 shift = 0;
@@ -205,8 +204,7 @@ static void of_mux_clk_setup(struct device_node *node)
if (!parent_names)
goto cleanup;
- for (i = 0; i < num_parents; i++)
- parent_names[i] = of_clk_get_parent_name(node, i);
+ of_clk_parent_fill(node, parent_names, num_parents);
reg = ti_clk_get_reg_addr(node, 0);
--
1.7.9.5
Hi Dinh,
On Mon, Jul 06, 2015 at 10:59:05PM -0500, [email protected] wrote:
> From: Dinh Nguyen <[email protected]>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Cc: "Emilio L?pez" <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
On 07/06, [email protected] wrote:
> From: Dinh Nguyen <[email protected]>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Cc: "Emilio L?pez" <[email protected]>
> ---
Adds a warning. Squashed this in:
diff --git a/drivers/clk/sunxi/clk-sun6i-ar100.c b/drivers/clk/sunxi/clk-sun6i-ar100.c
index a203b6f62ee7..3a2ea010f148 100644
--- a/drivers/clk/sunxi/clk-sun6i-ar100.c
+++ b/drivers/clk/sunxi/clk-sun6i-ar100.c
@@ -182,7 +182,6 @@ static int sun6i_a31_ar100_clk_probe(struct platform_device *pdev)
struct resource *r;
struct clk *clk;
int nparents;
- int i;
ar100 = devm_kzalloc(&pdev->dev, sizeof(*ar100), GFP_KERNEL);
if (!ar100)
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
On 07/06, [email protected] wrote:
> From: Dinh Nguyen <[email protected]>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> Cc: Boris Brezillon <[email protected]>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
On 07/06, [email protected] wrote:
> From: Dinh Nguyen <[email protected]>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
On 07/06, [email protected] wrote:
> From: Dinh Nguyen <[email protected]>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> Acked-by: Santosh Shilimkar <[email protected]>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
On 07/06, [email protected] wrote:
> From: Dinh Nguyen <[email protected]>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> Tested-by Gabriel Fernandez <[email protected]>
> Cc: Peter Griffin <[email protected]>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
On 07/06, [email protected] wrote:
> From: Dinh Nguyen <[email protected]>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> Cc: Tero Kristo <[email protected]>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
On 07/06, [email protected] wrote:
> From: Dinh Nguyen <[email protected]>
>
> Use of_clk_parent_fill to fill in the parent clock names' array.
>
> Signed-off-by: Dinh Nguyen <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Cc: "Emilio L?pez" <[email protected]>
> ---
Applied to clk-next with that fix I posted.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Hi,
On 17 July 2015 at 17:53, Stephen Boyd <[email protected]> wrote:
> On 07/06, [email protected] wrote:
>> From: Dinh Nguyen <[email protected]>
>>
>> Use of_clk_parent_fill to fill in the parent clock names' array.
>>
>> Signed-off-by: Dinh Nguyen <[email protected]>
>> Cc: Maxime Ripard <[email protected]>
>> Cc: "Emilio López" <[email protected]>
>> ---
>
> Applied to clk-next with that fix I posted.
The kernelci.org bot reported sunxi a20 boot failures[1][2] in
next-20150720 and next-20150721. I have bisected[3] these failures to
this commit. However, I have not investigated any further but
reverting this commit on top of next-20150721 gets the boards booting
again.
Cheers,
Tyler
[1] http://storage.kernelci.org/next/next-20150721/arm-sunxi_defconfig/lab-tbaker/boot-sun7i-a20-cubietruck.html
[2] http://storage.kernelci.org/next/next-20150721/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-mhart/boot-sun7i-a20-cubieboard2.html
[3] http://hastebin.com/nehatedece.vhdl
On Tue, 21 Jul 2015, Tyler Baker wrote:
> Hi,
>
> On 17 July 2015 at 17:53, Stephen Boyd <[email protected]> wrote:
> > On 07/06, [email protected] wrote:
> >> From: Dinh Nguyen <[email protected]>
> >>
> >> Use of_clk_parent_fill to fill in the parent clock names' array.
> >>
> >> Signed-off-by: Dinh Nguyen <[email protected]>
> >> Cc: Maxime Ripard <[email protected]>
> >> Cc: "Emilio López" <[email protected]>
> >> ---
> >
> > Applied to clk-next with that fix I posted.
>
> The kernelci.org bot reported sunxi a20 boot failures[1][2] in
> next-20150720 and next-20150721. I have bisected[3] these failures to
> this commit. However, I have not investigated any further but
> reverting this commit on top of next-20150721 gets the boards booting
> again.
>
Can you please try this patch?
-->8-
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index e8c5185..958655f 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -204,7 +204,7 @@ static void __init sun6i_ahb1_clk_setup(struct device_node *node)
return;
/* we have a mux, we will have >1 parents */
- of_clk_parent_fill(node, parents, SUN6I_AHB1_MAX_PARENTS);
+ i = of_clk_parent_fill(node, parents, SUN6I_AHB1_MAX_PARENTS);
of_property_read_string(node, "clock-output-names", &clk_name);
ahb1 = kzalloc(sizeof(struct sun6i_ahb1_clk), GFP_KERNEL);
@@ -789,7 +789,7 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
reg = of_iomap(node, 0);
- of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS);
+ i = of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS);
of_property_read_string(node, "clock-output-names", &clk_name);
clk = clk_register_mux(NULL, clk_name, parents, i,
Hi Dinh,
On 21 July 2015 at 08:22, Dinh Nguyen <[email protected]> wrote:
> On Tue, 21 Jul 2015, Tyler Baker wrote:
>
>> Hi,
>>
>> On 17 July 2015 at 17:53, Stephen Boyd <[email protected]> wrote:
>> > On 07/06, [email protected] wrote:
>> >> From: Dinh Nguyen <[email protected]>
>> >>
>> >> Use of_clk_parent_fill to fill in the parent clock names' array.
>> >>
>> >> Signed-off-by: Dinh Nguyen <[email protected]>
>> >> Cc: Maxime Ripard <[email protected]>
>> >> Cc: "Emilio López" <[email protected]>
>> >> ---
>> >
>> > Applied to clk-next with that fix I posted.
>>
>> The kernelci.org bot reported sunxi a20 boot failures[1][2] in
>> next-20150720 and next-20150721. I have bisected[3] these failures to
>> this commit. However, I have not investigated any further but
>> reverting this commit on top of next-20150721 gets the boards booting
>> again.
>>
>
> Can you please try this patch?
I've tested the patch below on top of next-20150721 and can confirm it
fixes the sunxi a20 issues I've reported.
> -->8-
>
> diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
> index e8c5185..958655f 100644
> --- a/drivers/clk/sunxi/clk-sunxi.c
> +++ b/drivers/clk/sunxi/clk-sunxi.c
> @@ -204,7 +204,7 @@ static void __init sun6i_ahb1_clk_setup(struct device_node *node)
> return;
>
> /* we have a mux, we will have >1 parents */
> - of_clk_parent_fill(node, parents, SUN6I_AHB1_MAX_PARENTS);
> + i = of_clk_parent_fill(node, parents, SUN6I_AHB1_MAX_PARENTS);
> of_property_read_string(node, "clock-output-names", &clk_name);
>
> ahb1 = kzalloc(sizeof(struct sun6i_ahb1_clk), GFP_KERNEL);
> @@ -789,7 +789,7 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
>
> reg = of_iomap(node, 0);
>
> - of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS);
> + i = of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS);
> of_property_read_string(node, "clock-output-names", &clk_name);
>
> clk = clk_register_mux(NULL, clk_name, parents, i,
Thanks,
Tyler
On 07/21/2015 09:29 AM, Tyler Baker wrote:
> Hi Dinh,
>
> On 21 July 2015 at 08:22, Dinh Nguyen <[email protected]> wrote:
>> On Tue, 21 Jul 2015, Tyler Baker wrote:
>>
>>> Hi,
>>>
>>> On 17 July 2015 at 17:53, Stephen Boyd <[email protected]> wrote:
>>>> On 07/06, [email protected] wrote:
>>>>> From: Dinh Nguyen <[email protected]>
>>>>>
>>>>> Use of_clk_parent_fill to fill in the parent clock names' array.
>>>>>
>>>>> Signed-off-by: Dinh Nguyen <[email protected]>
>>>>> Cc: Maxime Ripard <[email protected]>
>>>>> Cc: "Emilio López" <[email protected]>
>>>>> ---
>>>> Applied to clk-next with that fix I posted.
>>> The kernelci.org bot reported sunxi a20 boot failures[1][2] in
>>> next-20150720 and next-20150721. I have bisected[3] these failures to
>>> this commit. However, I have not investigated any further but
>>> reverting this commit on top of next-20150721 gets the boards booting
>>> again.
>>>
>> Can you please try this patch?
> I've tested the patch below on top of next-20150721 and can confirm it
> fixes the sunxi a20 issues I've reported.
Thanks both. I've squashed this in and pushed it out to clk-next.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project