diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-06-20 22:47:53 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-07-12 11:24:07 +0200 |
commit | 269f1aac1410d27959bd073a089eb85eed55c8a1 (patch) | |
tree | 506d36e2a45b5720d1761c3f1a8d707ecc7ab02f /drivers/clk/ux500/u8540_clk.c | |
parent | 1e6cbc0691abc6b1a053f98d8ce1d692c8c71501 (diff) | |
download | linux-269f1aac1410d27959bd073a089eb85eed55c8a1.tar.bz2 |
ARM: ux500: use CLK_OF_DECLARE()
The ux500 DT support predates the CLK_OF_DECLARE macro and calls
directly into the clk driver from platform code.
Converting this to CLK_OF_DECLARE makes the code much nicer and
similar to how modern platforms do it today. It also removes the
last user of cpu_is_u8500_family() etc.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/clk/ux500/u8540_clk.c')
-rw-r--r-- | drivers/clk/ux500/u8540_clk.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/clk/ux500/u8540_clk.c b/drivers/clk/ux500/u8540_clk.c index 86549e59fb42..133859f0e2bf 100644 --- a/drivers/clk/ux500/u8540_clk.c +++ b/drivers/clk/ux500/u8540_clk.c @@ -12,14 +12,8 @@ #include <linux/clkdev.h> #include <linux/clk-provider.h> #include <linux/mfd/dbx500-prcmu.h> -#include <linux/platform_data/clk-ux500.h> #include "clk.h" -static const struct of_device_id u8540_clk_of_match[] = { - { .compatible = "stericsson,u8540-clks", }, - { } -}; - /* CLKRST4 is missing making it hard to index things */ enum clkrst_index { CLKRST1_INDEX = 0, @@ -30,19 +24,12 @@ enum clkrst_index { CLKRST_MAX, }; -void u8540_clk_init(void) +static void u8540_clk_init(struct device_node *np) { struct clk *clk; - struct device_node *np = NULL; u32 bases[CLKRST_MAX]; int i; - if (of_have_populated_dt()) - np = of_find_matching_node(NULL, u8540_clk_of_match); - if (!np) { - pr_err("Either DT or U8540 Clock node not found\n"); - return; - } for (i = 0; i < ARRAY_SIZE(bases); i++) { struct resource r; @@ -607,3 +594,4 @@ void u8540_clk_init(void) bases[CLKRST6_INDEX], BIT(0), CLK_SET_RATE_GATE); clk_register_clkdev(clk, NULL, "rng"); } +CLK_OF_DECLARE(u8540_clks, "stericsson,u8540-clks", u8540_clk_init); |