]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-integrator/core.c
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / arch / arm / mach-integrator / core.c
index 595b7392ee4eb9bfdad41ba8b9cc69243d49cf6c..c89c949b4d459930fc7ed6d0098cbe8e7126f3fa 100644 (file)
@@ -21,6 +21,8 @@
 #include <linux/amba/serial.h>
 #include <linux/io.h>
 
+#include <asm/clkdev.h>
+#include <mach/clkdev.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/hardware/arm_timer.h>
@@ -108,10 +110,43 @@ static struct amba_device *amba_devs[] __initdata = {
        &kmi1_device,
 };
 
+/*
+ * These are fixed clocks.
+ */
+static struct clk clk24mhz = {
+       .rate   = 24000000,
+};
+
+static struct clk uartclk = {
+       .rate   = 14745600,
+};
+
+static struct clk_lookup lookups[] __initdata = {
+       {       /* UART0 */
+               .dev_id         = "mb:16",
+               .clk            = &uartclk,
+       }, {    /* UART1 */
+               .dev_id         = "mb:17",
+               .clk            = &uartclk,
+       }, {    /* KMI0 */
+               .dev_id         = "mb:18",
+               .clk            = &clk24mhz,
+       }, {    /* KMI1 */
+               .dev_id         = "mb:19",
+               .clk            = &clk24mhz,
+       }, {    /* MMCI - IntegratorCP */
+               .dev_id         = "mb:1c",
+               .clk            = &uartclk,
+       }
+};
+
 static int __init integrator_init(void)
 {
        int i;
 
+       for (i = 0; i < ARRAY_SIZE(lookups); i++)
+               clkdev_add(&lookups[i]);
+
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];
                amba_device_register(d, &iomem_resource);