[ARM] tegra: clock: Initialize clocks that have no enable
authorColin Cross <ccross@android.com>
Thu, 14 Oct 2010 02:16:02 +0000 (19:16 -0700)
committerColin Cross <ccross@android.com>
Mon, 25 Oct 2010 21:41:34 +0000 (14:41 -0700)
Change-Id: I136713c2a2ff9fec9fc629ae8f91709e49016618
Signed-off-by: Colin Cross <ccross@android.com>
arch/arm/mach-tegra/clock.c

index 008614d44e97f4bece92e6e36281203d0ee9c76b..44b2e234c1ea85254f593706b47a3af03543a66f 100644 (file)
@@ -166,6 +166,15 @@ void clk_init(struct clk *c)
        if (c->ops && c->ops->init)
                c->ops->init(c);
 
+       if (!c->ops || !c->ops->enable) {
+               c->refcnt++;
+               c->set = 1;
+               if (c->parent)
+                       c->state = c->parent->state;
+               else
+                       c->state = ON;
+       }
+
        clk_recalculate_rate(c);
 
        list_add(&c->node, &clocks);