Commit e07b2b59 authored by Mike Turquette's avatar Mike Turquette

Merge branch 'clk-fixes' into clk-next

parents 95713978 8e33f91a
...@@ -43,7 +43,7 @@ Example ...@@ -43,7 +43,7 @@ Example
clock-output-names = clock-output-names =
"tpu0", "mmcif1", "sdhi3", "sdhi2", "tpu0", "mmcif1", "sdhi3", "sdhi2",
"sdhi1", "sdhi0", "mmcif0"; "sdhi1", "sdhi0", "mmcif0";
renesas,clock-indices = < clock-indices = <
R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
R8A7790_CLK_MMCIF0 R8A7790_CLK_MMCIF0
......
...@@ -156,6 +156,7 @@ cpg_mstp_clock_register(const char *name, const char *parent_name, ...@@ -156,6 +156,7 @@ cpg_mstp_clock_register(const char *name, const char *parent_name,
static void __init cpg_mstp_clocks_init(struct device_node *np) static void __init cpg_mstp_clocks_init(struct device_node *np)
{ {
struct mstp_clock_group *group; struct mstp_clock_group *group;
const char *idxname;
struct clk **clks; struct clk **clks;
unsigned int i; unsigned int i;
...@@ -184,6 +185,11 @@ static void __init cpg_mstp_clocks_init(struct device_node *np) ...@@ -184,6 +185,11 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
for (i = 0; i < MSTP_MAX_CLOCKS; ++i) for (i = 0; i < MSTP_MAX_CLOCKS; ++i)
clks[i] = ERR_PTR(-ENOENT); clks[i] = ERR_PTR(-ENOENT);
if (of_find_property(np, "clock-indices", &i))
idxname = "clock-indices";
else
idxname = "renesas,clock-indices";
for (i = 0; i < MSTP_MAX_CLOCKS; ++i) { for (i = 0; i < MSTP_MAX_CLOCKS; ++i) {
const char *parent_name; const char *parent_name;
const char *name; const char *name;
...@@ -197,8 +203,7 @@ static void __init cpg_mstp_clocks_init(struct device_node *np) ...@@ -197,8 +203,7 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
continue; continue;
parent_name = of_clk_get_parent_name(np, i); parent_name = of_clk_get_parent_name(np, i);
ret = of_property_read_u32_index(np, "renesas,clock-indices", i, ret = of_property_read_u32_index(np, idxname, i, &clkidx);
&clkidx);
if (parent_name == NULL || ret < 0) if (parent_name == NULL || ret < 0)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment