---
drivers/clk/mvebu/common.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/clk/mvebu/common.c b/drivers/clk/mvebu/common.c
index 25ceccf..730625b 100644
--- a/drivers/clk/mvebu/common.c
+++ b/drivers/clk/mvebu/common.c
@@ -119,19 +119,20 @@ void __init mvebu_clk_gating_setup(struct
device_node *np,
const struct clk_gating_soc_desc *desc)
{
struct clk_gating_ctrl *ctrl;
- struct clk *clk;
void __iomem *base;
- const char *default_parent = NULL;
+ struct of_phandle_args clkspec;
+ const char *default_parent = "tclk";
int n;
base = of_iomap(np, 0);
if (WARN_ON(!base))
return;
- clk = of_clk_get(np, 0);
- if (!IS_ERR(clk)) {
- default_parent = __clk_get_name(clk);
- clk_put(clk);
+ if (!of_parse_phandle_with_args(np, "clocks", "#clock-cells", 0,
&clkspec)) {
+ of_property_read_string_index(clkspec.np, "clock-output-names",
+ clkspec.args_count ? clkspec.args[0] : 0,
+ &default_parent);
+ of_node_put(clkspec.np);
OK here you duplicate the code from of_clk_get_parent_name, I wonder why
you didn't use the function.But whatever.
Here you will get default_parent = "mvebu-sar" which is the name of the node, you
can't have "tclk" because this name is not in the device tree, but it will be
created by the initialization of the core clocks.