aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-02-14 15:15:03 -0500
committerJason Cooper <jason@lakedaemon.net>2014-02-16 21:33:59 -0500
commite4aec65c865d200196efd42f26ff1630b44997a5 (patch)
tree439b22bc209b32b054538333639d4521b0c13720
parentc642e6a95bbb0bee488078b740ee5b3bac57f7fb (diff)
clk: mvebu: add Armada 375 support to the corediv clock driver
This commit adds support for the Core Divider clocks of the Armada 375. Compared to Armada 370 and XP the Core Divider clocks of the 375 cannot be gated: only their ratio can be changed. This is reflected by the fact that the enable, disable and is_enabled clock operations are not defined, and that the enable_bit_offset field is also undefined. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--drivers/clk/mvebu/clk-corediv.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/clk/mvebu/clk-corediv.c b/drivers/clk/mvebu/clk-corediv.c
index f9e8a120f22b..4da60760be10 100644
--- a/drivers/clk/mvebu/clk-corediv.c
+++ b/drivers/clk/mvebu/clk-corediv.c
@@ -204,6 +204,18 @@ static const struct clk_corediv_soc_desc armada370_corediv_soc = {
204 .ratio_offset = 0x8, 204 .ratio_offset = 0x8,
205}; 205};
206 206
207static const struct clk_corediv_soc_desc armada375_corediv_soc = {
208 .descs = mvebu_corediv_desc,
209 .ndescs = ARRAY_SIZE(mvebu_corediv_desc),
210 .ops = {
211 .recalc_rate = clk_corediv_recalc_rate,
212 .round_rate = clk_corediv_round_rate,
213 .set_rate = clk_corediv_set_rate,
214 },
215 .ratio_reload = BIT(8),
216 .ratio_offset = 0x8,
217};
218
207static void __init 219static void __init
208mvebu_corediv_clk_init(struct device_node *node, 220mvebu_corediv_clk_init(struct device_node *node,
209 const struct clk_corediv_soc_desc *soc_desc) 221 const struct clk_corediv_soc_desc *soc_desc)
@@ -271,3 +283,10 @@ static void __init armada370_corediv_clk_init(struct device_node *node)
271} 283}
272CLK_OF_DECLARE(armada370_corediv_clk, "marvell,armada-370-corediv-clock", 284CLK_OF_DECLARE(armada370_corediv_clk, "marvell,armada-370-corediv-clock",
273 armada370_corediv_clk_init); 285 armada370_corediv_clk_init);
286
287static void __init armada375_corediv_clk_init(struct device_node *node)
288{
289 return mvebu_corediv_clk_init(node, &armada375_corediv_soc);
290}
291CLK_OF_DECLARE(armada375_corediv_clk, "marvell,armada-375-corediv-clock",
292 armada375_corediv_clk_init);