aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/versatile
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-01-20 15:31:41 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-02-13 05:20:48 -0500
commitbf6edb4bb1fabd73bebcd0ae85cdeb14c5893f3b (patch)
treec6abfe8226ced0b44e3b57ba952be8888faaea41 /drivers/clk/versatile
parent09c978bc7bdcfc3db91801454273a4330e1933bf (diff)
clk: versatile: pass a parent to the ICST clock
As we want to actually define the parent frequency in the device tree for the ICST clocks, modify the clock registration function to take a parent argument. Cc: Mike Turquette <mturquette@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/clk/versatile')
-rw-r--r--drivers/clk/versatile/clk-icst.c1
-rw-r--r--drivers/clk/versatile/clk-icst.h1
-rw-r--r--drivers/clk/versatile/clk-impd1.c6
-rw-r--r--drivers/clk/versatile/clk-integrator.c4
-rw-r--r--drivers/clk/versatile/clk-realview.c4
5 files changed, 11 insertions, 5 deletions
diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
index 8cbfcf88fae3..c98adbe62733 100644
--- a/drivers/clk/versatile/clk-icst.c
+++ b/drivers/clk/versatile/clk-icst.c
@@ -120,6 +120,7 @@ static const struct clk_ops icst_ops = {
120struct clk *icst_clk_register(struct device *dev, 120struct clk *icst_clk_register(struct device *dev,
121 const struct clk_icst_desc *desc, 121 const struct clk_icst_desc *desc,
122 const char *name, 122 const char *name,
123 const char *parent_name,
123 void __iomem *base) 124 void __iomem *base)
124{ 125{
125 struct clk *clk; 126 struct clk *clk;
diff --git a/drivers/clk/versatile/clk-icst.h b/drivers/clk/versatile/clk-icst.h
index be99dd0da785..04e6f0aef588 100644
--- a/drivers/clk/versatile/clk-icst.h
+++ b/drivers/clk/versatile/clk-icst.h
@@ -16,4 +16,5 @@ struct clk_icst_desc {
16struct clk *icst_clk_register(struct device *dev, 16struct clk *icst_clk_register(struct device *dev,
17 const struct clk_icst_desc *desc, 17 const struct clk_icst_desc *desc,
18 const char *name, 18 const char *name,
19 const char *parent_name,
19 void __iomem *base); 20 void __iomem *base);
diff --git a/drivers/clk/versatile/clk-impd1.c b/drivers/clk/versatile/clk-impd1.c
index 844f8d711a12..6d8b8e1a080a 100644
--- a/drivers/clk/versatile/clk-impd1.c
+++ b/drivers/clk/versatile/clk-impd1.c
@@ -93,13 +93,15 @@ void integrator_impd1_clk_init(void __iomem *base, unsigned int id)
93 imc = &impd1_clks[id]; 93 imc = &impd1_clks[id];
94 94
95 imc->vco1name = kasprintf(GFP_KERNEL, "lm%x-vco1", id); 95 imc->vco1name = kasprintf(GFP_KERNEL, "lm%x-vco1", id);
96 clk = icst_clk_register(NULL, &impd1_icst1_desc, imc->vco1name, base); 96 clk = icst_clk_register(NULL, &impd1_icst1_desc, imc->vco1name, NULL,
97 base);
97 imc->vco1clk = clk; 98 imc->vco1clk = clk;
98 imc->clks[0] = clkdev_alloc(clk, NULL, "lm%x:01000", id); 99 imc->clks[0] = clkdev_alloc(clk, NULL, "lm%x:01000", id);
99 100
100 /* VCO2 is also called "CLK2" */ 101 /* VCO2 is also called "CLK2" */
101 imc->vco2name = kasprintf(GFP_KERNEL, "lm%x-vco2", id); 102 imc->vco2name = kasprintf(GFP_KERNEL, "lm%x-vco2", id);
102 clk = icst_clk_register(NULL, &impd1_icst2_desc, imc->vco2name, base); 103 clk = icst_clk_register(NULL, &impd1_icst2_desc, imc->vco2name, NULL,
104 base);
103 imc->vco2clk = clk; 105 imc->vco2clk = clk;
104 106
105 /* MMCI uses CLK2 right off */ 107 /* MMCI uses CLK2 right off */
diff --git a/drivers/clk/versatile/clk-integrator.c b/drivers/clk/versatile/clk-integrator.c
index 19864b5690e9..5d36a719fefb 100644
--- a/drivers/clk/versatile/clk-integrator.c
+++ b/drivers/clk/versatile/clk-integrator.c
@@ -43,6 +43,7 @@ static void __init of_integrator_cm_osc_setup(struct device_node *np)
43 struct clk *clk = ERR_PTR(-EINVAL); 43 struct clk *clk = ERR_PTR(-EINVAL);
44 const char *clk_name = np->name; 44 const char *clk_name = np->name;
45 const struct clk_icst_desc *desc = &cm_auxosc_desc; 45 const struct clk_icst_desc *desc = &cm_auxosc_desc;
46 const char *parent_name;
46 47
47 if (!cm_base) { 48 if (!cm_base) {
48 /* Remap the core module base if not done yet */ 49 /* Remap the core module base if not done yet */
@@ -60,7 +61,8 @@ static void __init of_integrator_cm_osc_setup(struct device_node *np)
60 } 61 }
61 } 62 }
62 63
63 clk = icst_clk_register(NULL, desc, clk_name, cm_base); 64 parent_name = of_clk_get_parent_name(np, 0);
65 clk = icst_clk_register(NULL, desc, clk_name, parent_name, cm_base);
64 if (!IS_ERR(clk)) 66 if (!IS_ERR(clk))
65 of_clk_add_provider(np, of_clk_src_simple_get, clk); 67 of_clk_add_provider(np, of_clk_src_simple_get, clk);
66} 68}
diff --git a/drivers/clk/versatile/clk-realview.c b/drivers/clk/versatile/clk-realview.c
index 747e7b31117c..c8b523117fb7 100644
--- a/drivers/clk/versatile/clk-realview.c
+++ b/drivers/clk/versatile/clk-realview.c
@@ -85,10 +85,10 @@ void __init realview_clk_init(void __iomem *sysbase, bool is_pb1176)
85 /* ICST VCO clock */ 85 /* ICST VCO clock */
86 if (is_pb1176) 86 if (is_pb1176)
87 clk = icst_clk_register(NULL, &realview_osc0_desc, 87 clk = icst_clk_register(NULL, &realview_osc0_desc,
88 "osc0", sysbase); 88 "osc0", NULL, sysbase);
89 else 89 else
90 clk = icst_clk_register(NULL, &realview_osc4_desc, 90 clk = icst_clk_register(NULL, &realview_osc4_desc,
91 "osc4", sysbase); 91 "osc4", NULL, sysbase);
92 92
93 clk_register_clkdev(clk, NULL, "dev:clcd"); 93 clk_register_clkdev(clk, NULL, "dev:clcd");
94 clk_register_clkdev(clk, NULL, "issp:clcd"); 94 clk_register_clkdev(clk, NULL, "issp:clcd");