msm: clock: Support depends in toplevel
Two types of clocks support depends (branches and rcgs) and soon
we'll be adding a third (rpm). Support depends in the core so as
to avoid duplicating that logic all over.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock.h b/arch/arm/mach-msm/clock.h
index db49133..89775b4 100644
--- a/arch/arm/mach-msm/clock.h
+++ b/arch/arm/mach-msm/clock.h
@@ -56,11 +56,13 @@
* struct clk
* @count: enable refcount
* @lock: protects clk_enable()/clk_disable() path and @count
+ * @depends: non-direct parent of clock to enable when this clock is enabled
*/
struct clk {
uint32_t flags;
struct clk_ops *ops;
const char *dbg_name;
+ struct clk *depends;
struct list_head children;
struct list_head siblings;