summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcm2835/core.c
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2013-10-19 14:20:49 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-10-22 15:28:58 +0200
commit4754cc79f619ebb08c7e2a1040539a0732ec2993 (patch)
tree8abd9497efca646669b45f085ba4f6a9cb0a067a /arch/arm/mach-bcm2835/core.c
parent55f6869c33e62f6ba253e4fa6fcb9724288a0deb (diff)
downloadbarebox-4754cc79f619ebb08c7e2a1040539a0732ec2993.tar.gz
barebox-4754cc79f619ebb08c7e2a1040539a0732ec2993.tar.xz
ARM: bcm2835: cleanup clock registering
Sync exposed names while at it. Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-bcm2835/core.c')
-rw-r--r--arch/arm/mach-bcm2835/core.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/arch/arm/mach-bcm2835/core.c b/arch/arm/mach-bcm2835/core.c
index 906e4344dd..6835960e8a 100644
--- a/arch/arm/mach-bcm2835/core.c
+++ b/arch/arm/mach-bcm2835/core.c
@@ -32,37 +32,20 @@
#include <mach/core.h>
#include <linux/amba/bus.h>
-enum brcm_clks {
- dummy, clk_ref_3, clk_ref_1, clks_max
-};
-
-static struct clk *clks[clks_max];
-
static int bcm2835_clk_init(void)
{
- int ret;
-
- clks[dummy] = clk_fixed("dummy", 0);
- clks[clk_ref_3] = clk_fixed("ref3", 3 * 1000 * 1000);
- clks[clk_ref_1] = clk_fixed("ref1", 1 * 1000 * 1000);
+ struct clk *clk;
- ret = clk_register_clkdev(clks[dummy], "apb_pclk", NULL);
- if (ret)
- goto clk_err;
+ clk = clk_fixed("apb_pclk", 0);
+ clk_register_clkdev(clk, "apb_pclk", NULL);
- ret = clk_register_clkdev(clks[clk_ref_3], NULL, "uart0-pl0110");
- if (ret)
- goto clk_err;
+ clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000);
+ clk_register_clkdev(clk, NULL, "uart0-pl0110");
- ret = clk_register_clkdev(clks[clk_ref_1], NULL, "bcm2835-cs");
- if (ret)
- goto clk_err;
+ clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000);
+ clk_register_clkdev(clk, NULL, "bcm2835-cs");
return 0;
-
-clk_err:
- return ret;
-
}
postcore_initcall(bcm2835_clk_init);