]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/cpu/clock.c
sh: Show all clocks and their state in /proc/clocks
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / cpu / clock.c
index 73334c689e9d860d8f66d3916f86b64cc7291458..f5eb56e6bc59b8bb68e8b1552f82f64150b527ea 100644 (file)
@@ -308,15 +308,11 @@ static int show_clocks(char *buf, char **start, off_t off,
        list_for_each_entry_reverse(clk, &clock_list, node) {
                unsigned long rate = clk_get_rate(clk);
 
-               /*
-                * Don't bother listing dummy clocks with no ancestry
-                * that only support enable and disable ops.
-                */
-               if (unlikely(!rate && !clk->parent))
-                       continue;
-
-               p += sprintf(p, "%-12s\t: %ld.%02ldMHz\n", clk->name,
-                            rate / 1000000, (rate % 1000000) / 10000);
+               p += sprintf(p, "%-12s\t: %ld.%02ldMHz\t%s\n", clk->name,
+                            rate / 1000000, (rate % 1000000) / 10000,
+                            ((clk->flags & CLK_ALWAYS_ENABLED) ||
+                             (atomic_read(&clk->kref.refcount) != 1)) ?
+                            "enabled" : "disabled");
        }
 
        return p - buf;