]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-realview/core.c
Merge branch 'for-rmk-realview' of git://linux-arm.org/linux-2.6 into devel
[karo-tx-linux.git] / arch / arm / mach-realview / core.c
index 86aa6d74126fe968778f905635111e18aae96f89..5f1d55963cedb8e7b4d3cbd0b6e71a24c84b10c9 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/io.h>
 #include <linux/smc911x.h>
 
+#include <asm/clkdev.h>
 #include <asm/system.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
@@ -218,12 +219,59 @@ static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco)
        writel(0, sys_lock);
 }
 
-struct clk realview_clcd_clk = {
-       .name   = "CLCDCLK",
+static struct clk oscvco_clk = {
        .params = &realview_oscvco_params,
        .setvco = realview_oscvco_set,
 };
 
+/*
+ * These are fixed clocks.
+ */
+static struct clk ref24_clk = {
+       .rate   = 24000000,
+};
+
+static struct clk_lookup lookups[] = {
+       {       /* UART0 */
+               .dev_id         = "dev:f1",
+               .clk            = &ref24_clk,
+       }, {    /* UART1 */
+               .dev_id         = "dev:f2",
+               .clk            = &ref24_clk,
+       }, {    /* UART2 */
+               .dev_id         = "dev:f3",
+               .clk            = &ref24_clk,
+       }, {    /* UART3 */
+               .dev_id         = "fpga:09",
+               .clk            = &ref24_clk,
+       }, {    /* KMI0 */
+               .dev_id         = "fpga:06",
+               .clk            = &ref24_clk,
+       }, {    /* KMI1 */
+               .dev_id         = "fpga:07",
+               .clk            = &ref24_clk,
+       }, {    /* MMC0 */
+               .dev_id         = "fpga:05",
+               .clk            = &ref24_clk,
+       }, {    /* EB:CLCD */
+               .dev_id         = "dev:20",
+               .clk            = &oscvco_clk,
+       }, {    /* PB:CLCD */
+               .dev_id         = "issp:20",
+               .clk            = &oscvco_clk,
+       }
+};
+
+static int __init clk_init(void)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(lookups); i++)
+               clkdev_add(&lookups[i]);
+       return 0;
+}
+arch_initcall(clk_init);
+
 /*
  * CLCD support.
  */