aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bresticker <abrestic@chromium.org>2015-02-24 22:56:07 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-03-31 05:59:31 -0400
commita47eb351d2bd17cdf01de070f13cb12f6be4a0c5 (patch)
treef314573b31bbcbdbc27b8ab66ad8a1f21467f5c9
parent8cb94af684ecfea38e8c9ff8d8519ff751a66968 (diff)
CLK: Pistachio: Register external clock gates
Register the clock gates for the external audio and ethernet reference clocks provided by the top-level general control block. Signed-off-by: Damien Horsley <Damien.Horsley@imgtec.com> Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Cc: Mike Turquette <mturquette@linaro.org> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Cc: James Hartley <james.hartley@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Patchwork: https://patchwork.linux-mips.org/patch/9321/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--drivers/clk/pistachio/clk-pistachio.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/clk/pistachio/clk-pistachio.c b/drivers/clk/pistachio/clk-pistachio.c
index 3351808ea42a..8c0fe8828f99 100644
--- a/drivers/clk/pistachio/clk-pistachio.c
+++ b/drivers/clk/pistachio/clk-pistachio.c
@@ -306,3 +306,24 @@ static void __init pistachio_cr_periph_init(struct device_node *np)
306} 306}
307CLK_OF_DECLARE(pistachio_cr_periph, "img,pistachio-cr-periph", 307CLK_OF_DECLARE(pistachio_cr_periph, "img,pistachio-cr-periph",
308 pistachio_cr_periph_init); 308 pistachio_cr_periph_init);
309
310static struct pistachio_gate pistachio_ext_gates[] __initdata = {
311 GATE(EXT_CLK_ENET_IN, "enet_clk_in_gate", "enet_clk_in", 0x58, 5),
312 GATE(EXT_CLK_AUDIO_IN, "audio_clk_in_gate", "audio_clk_in", 0x58, 8)
313};
314
315static void __init pistachio_cr_top_init(struct device_node *np)
316{
317 struct pistachio_clk_provider *p;
318
319 p = pistachio_clk_alloc_provider(np, EXT_CLK_NR_CLKS);
320 if (!p)
321 return;
322
323 pistachio_clk_register_gate(p, pistachio_ext_gates,
324 ARRAY_SIZE(pistachio_ext_gates));
325
326 pistachio_clk_register_provider(p);
327}
328CLK_OF_DECLARE(pistachio_cr_top, "img,pistachio-cr-top",
329 pistachio_cr_top_init);