aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-09-17 05:34:24 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-09-26 05:05:53 -0400
commitd625a730675decc49f25f761d0e2e20e45e0ff46 (patch)
tree8b91c81678419b22985d0b8f05d49ebe2f395cb3 /drivers/clk
parent89da2dfafc9ffc79067e196053431d957c77db45 (diff)
clk: ux500: Add Device Tree support for the RTC clock
This patch enables the RTC fixed frequency clock to be specified from Device Tree via phandles to the "rtc32k-clock" node. Acked-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/ux500/u8500_of_clk.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
index 4fcafd007656..fc647cf1dd97 100644
--- a/drivers/clk/ux500/u8500_of_clk.c
+++ b/drivers/clk/ux500/u8500_of_clk.c
@@ -60,7 +60,7 @@ void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
60 struct device_node *np = NULL; 60 struct device_node *np = NULL;
61 struct device_node *child = NULL; 61 struct device_node *child = NULL;
62 const char *sgaclk_parent = NULL; 62 const char *sgaclk_parent = NULL;
63 struct clk *clk; 63 struct clk *clk, *rtc_clk;
64 64
65 if (of_have_populated_dt()) 65 if (of_have_populated_dt())
66 np = of_find_matching_node(NULL, u8500_clk_of_match); 66 np = of_find_matching_node(NULL, u8500_clk_of_match);
@@ -84,7 +84,7 @@ void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
84 84
85 /* FIXME: Add sys, ulp and int clocks here. */ 85 /* FIXME: Add sys, ulp and int clocks here. */
86 86
87 clk = clk_register_fixed_rate(NULL, "rtc32k", "NULL", 87 rtc_clk = clk_register_fixed_rate(NULL, "rtc32k", "NULL",
88 CLK_IS_ROOT|CLK_IGNORE_UNUSED, 88 CLK_IS_ROOT|CLK_IGNORE_UNUSED,
89 32768); 89 32768);
90 90
@@ -548,5 +548,8 @@ void u8500_of_clk_init(u32 clkrst1_base, u32 clkrst2_base, u32 clkrst3_base,
548 548
549 if (!of_node_cmp(child->name, "prcc-kernel-clock")) 549 if (!of_node_cmp(child->name, "prcc-kernel-clock"))
550 of_clk_add_provider(child, ux500_twocell_get, prcc_kclk); 550 of_clk_add_provider(child, ux500_twocell_get, prcc_kclk);
551
552 if (!of_node_cmp(child->name, "rtc32k-clock"))
553 of_clk_add_provider(child, of_clk_src_simple_get, rtc_clk);
551 } 554 }
552} 555}