Commit a542c487 authored by Sekhar Nori's avatar Sekhar Nori Committed by Kevin Hilman

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: default avatarSekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 3edfbf47
...@@ -504,12 +504,15 @@ dump_clock(struct seq_file *s, unsigned nest, struct clk *parent) ...@@ -504,12 +504,15 @@ dump_clock(struct seq_file *s, unsigned nest, struct clk *parent)
static int davinci_ck_show(struct seq_file *m, void *v) static int davinci_ck_show(struct seq_file *m, void *v)
{ {
/* Show clock tree; we know the main oscillator is first. struct clk *clk;
* We trust nonzero usecounts equate to PSC enables...
/*
* Show clock tree; We trust nonzero usecounts equate to PSC enables...
*/ */
mutex_lock(&clocks_mutex); mutex_lock(&clocks_mutex);
if (!list_empty(&clocks)) list_for_each_entry(clk, &clocks, node)
dump_clock(m, 0, list_first_entry(&clocks, struct clk, node)); if (!clk->parent)
dump_clock(m, 0, clk);
mutex_unlock(&clocks_mutex); mutex_unlock(&clocks_mutex);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment