diff options
author | Eric Anholt <eric@anholt.net> | 2015-09-28 17:22:02 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-10-01 20:12:03 -0400 |
commit | 4f61d8e220c110de90a02736ceb55e1e398d6be7 (patch) | |
tree | 28f6bc202294b63ba65926cf15532c0a2f5b0619 /drivers/clk/bcm | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
clk: bcm2835: Move under bcm/ with other Broadcom SoC clk drivers.
clk-bcm2835.c predates the drivers under bcm/, but all the new BCM
drivers are going in there so let's follow them.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/bcm')
-rw-r--r-- | drivers/clk/bcm/Makefile | 1 | ||||
-rw-r--r-- | drivers/clk/bcm/clk-bcm2835.c | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile index 8a7a477862c7..ee2349bbe1f1 100644 --- a/drivers/clk/bcm/Makefile +++ b/drivers/clk/bcm/Makefile | |||
@@ -3,4 +3,5 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o | |||
3 | obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o | 3 | obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o |
4 | obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm21664.o | 4 | obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm21664.o |
5 | obj-$(CONFIG_COMMON_CLK_IPROC) += clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o | 5 | obj-$(CONFIG_COMMON_CLK_IPROC) += clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o |
6 | obj-$(CONFIG_ARCH_BCM2835) += clk-bcm2835.o | ||
6 | obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o | 7 | obj-$(CONFIG_ARCH_BCM_CYGNUS) += clk-cygnus.o |
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c new file mode 100644 index 000000000000..dd295e498309 --- /dev/null +++ b/drivers/clk/bcm/clk-bcm2835.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Broadcom | ||
3 | * Copyright (C) 2012 Stephen Warren | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/clk-provider.h> | ||
21 | #include <linux/clkdev.h> | ||
22 | #include <linux/clk/bcm2835.h> | ||
23 | #include <linux/of.h> | ||
24 | |||
25 | /* | ||
26 | * These are fixed clocks. They're probably not all root clocks and it may | ||
27 | * be possible to turn them on and off but until this is mapped out better | ||
28 | * it's the only way they can be used. | ||
29 | */ | ||
30 | void __init bcm2835_init_clocks(void) | ||
31 | { | ||
32 | struct clk *clk; | ||
33 | int ret; | ||
34 | |||
35 | clk = clk_register_fixed_rate(NULL, "apb_pclk", NULL, CLK_IS_ROOT, | ||
36 | 126000000); | ||
37 | if (IS_ERR(clk)) | ||
38 | pr_err("apb_pclk not registered\n"); | ||
39 | |||
40 | clk = clk_register_fixed_rate(NULL, "uart0_pclk", NULL, CLK_IS_ROOT, | ||
41 | 3000000); | ||
42 | if (IS_ERR(clk)) | ||
43 | pr_err("uart0_pclk not registered\n"); | ||
44 | ret = clk_register_clkdev(clk, NULL, "20201000.uart"); | ||
45 | if (ret) | ||
46 | pr_err("uart0_pclk alias not registered\n"); | ||
47 | |||
48 | clk = clk_register_fixed_rate(NULL, "uart1_pclk", NULL, CLK_IS_ROOT, | ||
49 | 125000000); | ||
50 | if (IS_ERR(clk)) | ||
51 | pr_err("uart1_pclk not registered\n"); | ||
52 | ret = clk_register_clkdev(clk, NULL, "20215000.uart"); | ||
53 | if (ret) | ||
54 | pr_err("uart1_pclk alias not registered\n"); | ||
55 | } | ||