Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173307
b: refs/heads/master
c: f02bf3b
h: refs/heads/master
i:
  173305: cf8ff7b
  173303: 4eadc4a
v: v3
  • Loading branch information
Sekhar Nori authored and Kevin Hilman committed Nov 25, 2009
1 parent 1a7a56e commit a43fa7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd87444802ddceaa2259bc5ac48c1d2e42a99a3f
refs/heads/master: f02bf3b396846f3da60b4962aeaae8652e20f0dd
10 changes: 7 additions & 3 deletions trunk/arch/arm/mach-davinci/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@ int clk_register(struct clk *clk)
clk->name, clk->parent->name))
return -EINVAL;

INIT_LIST_HEAD(&clk->children);

mutex_lock(&clocks_mutex);
list_add_tail(&clk->node, &clocks);
if (clk->parent)
list_add_tail(&clk->childnode, &clk->parent->children);
mutex_unlock(&clocks_mutex);

/* If rate is already set, use it */
Expand All @@ -146,6 +150,7 @@ void clk_unregister(struct clk *clk)

mutex_lock(&clocks_mutex);
list_del(&clk->node);
list_del(&clk->childnode);
mutex_unlock(&clocks_mutex);
}
EXPORT_SYMBOL(clk_unregister);
Expand Down Expand Up @@ -352,9 +357,8 @@ dump_clock(struct seq_file *s, unsigned nest, struct clk *parent)
/* REVISIT show device associations too */

/* cost is now small, but not linear... */
list_for_each_entry(clk, &clocks, node) {
if (clk->parent == parent)
dump_clock(s, nest + NEST_DELTA, clk);
list_for_each_entry(clk, &parent->children, childnode) {
dump_clock(s, nest + NEST_DELTA, clk);
}
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-davinci/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ struct clk {
u8 lpsc;
u8 psc_ctlr;
struct clk *parent;
struct list_head children; /* list of children */
struct list_head childnode; /* parent's child list node */
struct pll_data *pll_data;
u32 div_reg;
};
Expand Down

0 comments on commit a43fa7f

Please sign in to comment.