Skip to contentSkip to conversation

clk: make use of of_clk_parent_fill helper function

PATCH Applied [email protected] 4 participants 19 messages Jul 7, 2015 – Jul 21, 2015

Subsystems (6)
lore
Share & tools
lore
#1 lore raw

PATCH v2 1/6 clk: at91: make use of of_clk_parent_fill helper function

In reply to [email protected]

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

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(-)
drivers/clk/at91/clk-main.c +1 -6
index c240045..13f481b 100644
@@ -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);
 
drivers/clk/at91/clk-master.c +1 -6
index f98eafe..38f646d 100644
@@ -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);
 
drivers/clk/at91/clk-programmable.c +1 -6
index 8c86c0f..21492ac 100644
@@ -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))
drivers/clk/at91/clk-slow.c +2 -12
index 98a84a8..84c19d7 100644
@@ -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);
 
drivers/clk/at91/clk-smd.c +1 -6
index 3817ea8..a7f8501 100644
@@ -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);
 
drivers/clk/at91/clk-usb.c +1 -6
index b0cbd2b..b3cbf45 100644
@@ -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);
 
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 2/6 clk: qoriq: make use of of_clk_parent_fill helper function

In reply to [email protected]

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

---
 drivers/clk/clk-qoriq.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/clk/clk-qoriq.c +2 -3
index cda90a9..d3f4570 100644
@@ -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)
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v2 3/6 clk: keystone: make use of of_clk_parent_fill helper function

In reply to [email protected]

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

---
 drivers/clk/keystone/pll.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/clk/keystone/pll.c +1 -2
index 4a375ea..d6ef063 100644
@@ -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;
Signature · 1 line
1.7.9.5
#17 lore raw

PATCH v2 6/6 clk: ti: make use of of_clk_parent_fill helper function

In reply to [email protected]

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

---
 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(-)
drivers/clk/ti/apll.c +1 -3
index 49baf38..523880e 100644
@@ -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;
 
drivers/clk/ti/composite.c +1 -3
index 96f83ce..dbef218 100644
@@ -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) {
drivers/clk/ti/dpll.c +1 -3
index 2aacf7a..49acdf2 100644
@@ -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;
 
drivers/clk/ti/fapll.c +1 -2
index 730aa62..b1c741b 100644
@@ -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);
drivers/clk/ti/mux.c +1 -3
index 5cdeed5..99fe27e 100644
@@ -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);
 
Signature · 1 line
1.7.9.5
#0 lore raw

v2 cover clk: make use of of_clk_parent_fill helper function

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(-)
Signature · 1 line
1.7.9.5
#7 lore raw

PATCH v2 4/6 clk: st: make use of of_clk_parent_fill helper function

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

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(-)
drivers/clk/st/clk-flexgen.c +2 -4
index 657ca14..ed0696c 100644
@@ -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;
 }
 
drivers/clk/st/clkgen-mux.c +2 -5
index 4fbe6e0..b83654a 100644
@@ -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;
 }
 
Signature · 1 line
1.7.9.5
#9 lore raw

PATCH v2 5/6 clk: sunxi: make use of of_clk_parent_fill helper function

In reply to [email protected]

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

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(-)
drivers/clk/sunxi/clk-a20-gmac.c +1 -3
index 0dcf4f2..1611b03 100644
@@ -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);
drivers/clk/sunxi/clk-factors.c +1 -3
index 8c20190..2589457 100644
@@ -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
drivers/clk/sunxi/clk-sun6i-ar100.c +1 -2
index 63cf149..6f229ff 100644
@@ -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);
 
drivers/clk/sunxi/clk-sunxi.c +2 -8
index 9a82f17..eed66f8 100644
@@ -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,
Signature · 1 line
1.7.9.5
Acked-by on v2 5/6
#10 lore raw

Re: [PATCHv2 5/6] clk: sunxi: make use of of_clk_parent_fill helper function

Hi Dinh,

Quoted 7 lines · 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.

Cc Maxime Ripard <[email protected]>
Cc "Emilio López" <[email protected]>

Thanks!

Maxime

Signature · 3 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#11 lore raw

Re: [PATCHv2 5/6] clk: sunxi: make use of of_clk_parent_fill helper function

In reply to [email protected]
Quoted 8 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

Cc Maxime Ripard <[email protected]>
Cc "Emilio López" <[email protected]>

---

Adds a warning. Squashed this in:

drivers/clk/sunxi/clk-sun6i-ar100.c +0 -1
index a203b6f62ee7..3a2ea010f148 100644
@@ -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)
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Applied
#2 lore raw

Re: [PATCHv2 1/6] clk: at91: make use of of_clk_parent_fill helper function

In reply to [email protected]
Quoted 7 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

Cc Boris Brezillon <[email protected]>

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Applied
#4 lore raw

Re: [PATCHv2 2/6] clk: qoriq: make use of of_clk_parent_fill helper function

In reply to [email protected]
Quoted 6 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Applied
#6 lore raw

Re: [PATCHv2 3/6] clk: keystone: make use of of_clk_parent_fill helper function

In reply to [email protected]
Quoted 7 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Applied
#8 lore raw

Re: [PATCHv2 4/6] clk: st: make use of of_clk_parent_fill helper function

In reply to [email protected]
Quoted 8 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

Tested-by Gabriel Fernandez <[email protected]>
Cc: Peter Griffin <[email protected]>
---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Applied
#18 lore raw

Re: [PATCHv2 6/6] clk: ti: make use of of_clk_parent_fill helper function

In reply to [email protected]
Quoted 7 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

---

Applied to clk-next

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Applied
#12 lore raw

Re: [PATCHv2 5/6] clk: sunxi: make use of of_clk_parent_fill helper function

In reply to [email protected]
Quoted 8 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

Cc Maxime Ripard <[email protected]>
Cc "Emilio López" <[email protected]>

---

Applied to clk-next with that fix I posted.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
#13 lore raw

Re: [PATCHv2 5/6] clk: sunxi: make use of of_clk_parent_fill helper function

Hi,

Quoted 11 lines · Stephen Boyd
Quoted 8 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

Cc Maxime Ripard <[email protected]>
Cc "Emilio L=C3=B3pez" <[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+C=
ONFIG_PROVE_LOCKING=3Dy/lab-mhart/boot-sun7i-a20-cubieboard2.html
[3] http://hastebin.com/nehatedece.vhdl

#14 lore raw

Re: [PATCHv2 5/6] clk: sunxi: make use of of_clk_parent_fill helper function

Quoted 13 lines · Tyler Baker

Hi,

Quoted 10 lines · Stephen Boyd
Quoted 8 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

Cc Maxime Ripard <[email protected]>
Cc "Emilio López" <[email protected]>

---

Quoted 8 lines
Quoted 1 line

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-

drivers/clk/sunxi/clk-sunxi.c +2 -2
index e8c5185..958655f 100644
@@ -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,
#15 lore raw

Re: [PATCHv2 5/6] clk: sunxi: make use of of_clk_parent_fill helper function

Hi Dinh,

On 21 July 2015 at 08:22, Dinh Nguyen <[email protected]> wrot= e:

Quoted 17 lines · Tyler Baker
Quoted 16 lines

Hi,

Quoted 11 lines · Stephen Boyd
Quoted 8 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

Cc Maxime Ripard <[email protected]>
Cc "Emilio L=C3=B3pez" <[email protected]>

---

Applied to clk-next with that fix I posted.

Quoted 8 lines
Quoted 6 lines

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.

drivers/clk/sunxi/clk-sunxi.=

Quoted 3 lines

-->8-

drivers/clk/sunxi/clk-sunxi.= renamed from drivers/clk/sunxi/clk-sunxi.c +0 -0

c

drivers/clk/sunxi/clk-sunxi.c static void __init sun6i_ahb1_clk_setup(struct device=

Quoted 4 lines

index e8c5185..958655f 100644

drivers/clk/sunxi/clk-sunxi.c +0 -0
@@ -204,7 +204,7 @@ static void __init sun6i_ahb1_clk_setup(struct device=

_node *node)

drivers/clk/sunxi/clk-sunxi.c static void __init sunxi_mux_clk_setup(struct device_=

Quoted 9 lines
drivers/clk/sunxi/clk-sunxi.c +1 -1
                return;
 
        /* we have a mux, we will have >1 parents */
-       of_clk_parent_fill(node, parents, SUN6I_AHB1_MAX_PARENTS);
+       i =3D of_clk_parent_fill(node, parents, SUN6I_AHB1_MAX_PARENTS);
        of_property_read_string(node, "clock-output-names", &clk_name);
 
        ahb1 =3D kzalloc(sizeof(struct sun6i_ahb1_clk), GFP_KERNEL);
@@ -789,7 +789,7 @@ static void __init sunxi_mux_clk_setup(struct device_=

node *node,

drivers/clk/sunxi/clk-sunxi.c static void __init sunxi_mux_clk_setup(struct device_node *node,

Quoted 8 lines
drivers/clk/sunxi/clk-sunxi.c +1 -1
        reg =3D of_iomap(node, 0);
 
-       of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS);
+       i =3D of_clk_parent_fill(node, parents, SUNXI_MAX_PARENTS);
        of_property_read_string(node, "clock-output-names", &clk_name);
 
        clk =3D clk_register_mux(NULL, clk_name, parents, i,

Thanks,

Tyler

#16 lore raw

Re: [PATCHv2 5/6] clk: sunxi: make use of of_clk_parent_fill helper function

Quoted 24 lines · Tyler Baker

Hi Dinh,

Quoted 21 lines · Dinh Nguyen
Quoted 19 lines · Tyler Baker

Hi,

Quoted 10 lines · Stephen Boyd
Quoted 8 lines · On 07/06, [email protected] wrote:

From: Dinh Nguyen <[email protected]>

Use of_clk_parent_fill to fill in the parent clock names' array.

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.

Quoted 3 lines
Quoted 1 line

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.

Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project