diff options
author | Stephen Warren <swarren@wwwdotorg.org> | 2012-12-24 23:55:01 -0500 |
---|---|---|
committer | Stephen Warren <swarren@wwwdotorg.org> | 2013-01-14 23:46:59 -0500 |
commit | 526d239c301e6cb7fe6657642c43d6c524590745 (patch) | |
tree | ace90967411bf1a61b1a0baf9acaace67ff71d4a /drivers/clk | |
parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) |
clk: bcm2835: probe for fixed-clock in device tree
This will allow fixed-clocks to be registered in device tree, which in
turn will allow clock clients to look up their clocks in device tree.
The first driver to use this feature will be the bcm2835 SDHCI/MMC
driver. In the long run, it is likely these fixed clocks will be
replaced with an actual clock implementation which speaks to the
VideoCore processor, but this change should be transparent to clock
consumers.
Cc: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk-bcm2835.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/clk/clk-bcm2835.c b/drivers/clk/clk-bcm2835.c index e69991aab43a..792bc57a9db7 100644 --- a/drivers/clk/clk-bcm2835.c +++ b/drivers/clk/clk-bcm2835.c | |||
@@ -20,6 +20,13 @@ | |||
20 | #include <linux/clk-provider.h> | 20 | #include <linux/clk-provider.h> |
21 | #include <linux/clkdev.h> | 21 | #include <linux/clkdev.h> |
22 | #include <linux/clk/bcm2835.h> | 22 | #include <linux/clk/bcm2835.h> |
23 | #include <linux/clk-provider.h> | ||
24 | #include <linux/of.h> | ||
25 | |||
26 | static const __initconst struct of_device_id clk_match[] = { | ||
27 | { .compatible = "fixed-clock", .data = of_fixed_clk_setup, }, | ||
28 | { } | ||
29 | }; | ||
23 | 30 | ||
24 | /* | 31 | /* |
25 | * These are fixed clocks. They're probably not all root clocks and it may | 32 | * These are fixed clocks. They're probably not all root clocks and it may |
@@ -56,4 +63,6 @@ void __init bcm2835_init_clocks(void) | |||
56 | ret = clk_register_clkdev(clk, NULL, "20215000.uart"); | 63 | ret = clk_register_clkdev(clk, NULL, "20215000.uart"); |
57 | if (ret) | 64 | if (ret) |
58 | pr_err("uart1_pclk alias not registered\n"); | 65 | pr_err("uart1_pclk alias not registered\n"); |
66 | |||
67 | of_clk_init(clk_match); | ||
59 | } | 68 | } |