summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-bcm2835/core.c
diff options
context:
space:
mode:
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);