ARM: tegra11: clock: Set shared ceiling users "always On"
Alex Frid [Fri, 18 Jan 2013 04:55:33 +0000 (20:55 -0800)]
Shared ceiling users apply caps to shared bus rate even if they are
disabled (this way shared bus clock can stay disabled when only cap
is applied). To properly reflect this relationship initialize shared
ceiling users in ON state with refcount 1.

Change-Id: I80ff49b0eea993c16c3918709bf9215f7ba97bd7
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/192627
(cherry picked from commit 15f5946258c0b9048a219709fd9f6a74258a16c9)
Reviewed-on: http://git-master/r/195658
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

arch/arm/mach-tegra/tegra11_clocks.c

index 1a01876..e506329 100644 (file)
@@ -4917,6 +4917,11 @@ static void tegra_clk_shared_bus_user_init(struct clk *c)
        c->state = OFF;
        c->set = true;
 
+       if (c->u.shared_bus_user.mode == SHARED_CEILING) {
+               c->state = ON;
+               c->refcnt++;
+       }
+
        if (c->u.shared_bus_user.client_id) {
                c->u.shared_bus_user.client =
                        tegra_get_clock_by_name(c->u.shared_bus_user.client_id);