]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: omap clk tweak
authorRichard Woodruff <r-woodruff2@ti.com>
Fri, 18 Nov 2005 01:15:03 +0000 (17:15 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 18 Nov 2005 01:15:03 +0000 (17:15 -0800)
This fixes USB OMAP2 clock parents that Nishant pointed out
they were off.

It also adds in an information proc file for clocks.

Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock.h
arch/arm/plat-omap/clock.c

index aee5bdd7084606fc4ccfa17e4bc8034fe43c5919..5b16880f836d7e90cea1f18f8fd6b2c97fd727d2 100644 (file)
@@ -651,7 +651,7 @@ static u32 omap2_get_clksel(u32 *div_sel, u32 *field_mask,
                case 13:                                /* dss2 */
                        mask = 0x1; break;
                case 25:                                /* usb */
-                       mask = 0xf; break;
+                       mask = 0x7; break;
                }
        }
 
index 4aeab5591bd395d7cb93cbeaa0db2d53642ef78e..f818f9dd9fe6aece247af9bf33e366eff91cf2e2 100644 (file)
@@ -859,7 +859,7 @@ static struct clk core_l3_ck = {    /* Used for ick and fck, interconnect */
 
 static struct clk usb_l4_ick = {       /* FS-USB interface clock */
        .name           = "usb_l4_ick",
-       .parent         = &core_ck,
+       .parent         = &core_l3_ck,
        .flags          = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X |
                                RATE_CKCTL | CM_CORE_SEL1 | DELAYED_APP |
                                CONFIG_PARTICIPANT,
@@ -1839,7 +1839,7 @@ static struct clk usb_fck = {
 
 static struct clk usbhs_ick = {
        .name           = "usbhs_ick",
-       .parent         = &l4_ck,
+       .parent         = &core_l3_ck,
        .flags          = CLOCK_IN_OMAP243X,
        .enable_reg     = (void __iomem *)&CM_ICLKEN2_CORE,
        .enable_bit     = 6,
index 7ce39b986e23348622092e3ca8d5627ad0b1af3e..befb326273de9e1b61144ad640758c279d7c5d30 100644 (file)
@@ -302,3 +302,65 @@ int __init clk_init(struct clk_functions * custom_clocks)
 
        return 0;
 }
+
+#ifdef CONFIG_PROC_FS
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+static void *omap_ck_start(struct seq_file *m, loff_t *pos)
+{
+       return *pos < 1 ? (void *)1 : NULL;
+}
+
+static void *omap_ck_next(struct seq_file *m, void *v, loff_t *pos)
+{
+       ++*pos;
+       return NULL;
+}
+
+static void omap_ck_stop(struct seq_file *m, void *v)
+{
+}
+
+int omap_ck_show(struct seq_file *m, void *v)
+{
+       struct clk *cp;
+
+       list_for_each_entry(cp, &clocks, node)
+               seq_printf(m,"%s %ld %d\n", cp->name, cp->rate, cp->usecount);
+
+       return 0;
+}
+
+static struct seq_operations omap_ck_op = {
+       .start =        omap_ck_start,
+       .next =         omap_ck_next,
+       .stop =         omap_ck_stop,
+       .show =         omap_ck_show
+};
+
+static int omap_ck_open(struct inode *inode, struct file *file)
+{
+       return seq_open(file, &omap_ck_op);
+}
+
+static struct file_operations proc_omap_ck_operations = {
+       .open           = omap_ck_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = seq_release,
+};
+
+int __init omap_ck_init(void)
+{
+    struct proc_dir_entry *entry;
+
+       entry = create_proc_entry("omap_clocks", 0, NULL);
+       if (entry)
+               entry->proc_fops = &proc_omap_ck_operations;
+       return 0;
+
+}
+__initcall(omap_ck_init);
+#endif /* CONFIG_DEBUG_PROC_FS */
+