aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2009-12-03 15:36:51 +0530
committerKevin Hilman <khilman@deeprootsystems.com>2010-02-04 13:29:45 -0800
commitf979aa6e17fe11fb7b603992c742898175327499 (patch)
tree306559cb153eb744cc4493cf3565716a3abaf26e
parentc1978e1dfb3d171010f6a22eb0a9eed89a245666 (diff)
downloadkernel_samsung_aries-f979aa6e17fe11fb7b603992c742898175327499.zip
kernel_samsung_aries-f979aa6e17fe11fb7b603992c742898175327499.tar.gz
kernel_samsung_aries-f979aa6e17fe11fb7b603992c742898175327499.tar.bz2
davinci: make /proc/davinci_clocks display multi-rooted clock tree
This patch modifies clock dump to take care of clock tress rooted at multiple oscillators. Current code assumes the entire tree is rooted on a single oscillator. When using off-chip clock synthesizers, some of the clocks can be obtained from a different on-board oscillator. Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-rw-r--r--arch/arm/mach-davinci/clock.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index 0fa68c5..2c27cae 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -516,12 +516,15 @@ dump_clock(struct seq_file *s, unsigned nest, struct clk *parent)
static int davinci_ck_show(struct seq_file *m, void *v)
{
- /* Show clock tree; we know the main oscillator is first.
- * We trust nonzero usecounts equate to PSC enables...
+ struct clk *clk;
+
+ /*
+ * Show clock tree; We trust nonzero usecounts equate to PSC enables...
*/
mutex_lock(&clocks_mutex);
- if (!list_empty(&clocks))
- dump_clock(m, 0, list_first_entry(&clocks, struct clk, node));
+ list_for_each_entry(clk, &clocks, node)
+ if (!clk->parent)
+ dump_clock(m, 0, clk);
mutex_unlock(&clocks_mutex);
return 0;