After enabling CONFIG_DEBUG_ATOMIC_SLEEP,during LP0 we see warning
regarding sleep in atomic region for clk_enable and clk_disable.
To fix this, we need to use clk_enable_locked and clk_disable_locked
instead.These functions do not acquire locks.
Bug
1534913
Change-Id: I7ca661a8030308107c3467d9d524c79b6ec374e8
Signed-off-by: Gaurav Sarode <gsarode@nvidia.com>
Reviewed-on: http://git-master/r/438904
(cherry picked from commit
908ff199970a093a022f4434afc1689ba979bfed)
Reviewed-on: http://git-master/r/440467
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
mutex_unlock(&clock_list_lock);
}
-static int clk_enable_locked(struct clk *c)
+int clk_enable_locked(struct clk *c)
{
int ret = 0;
return ret;
}
-static void clk_disable_locked(struct clk *c)
+void clk_disable_locked(struct clk *c)
{
if (c->refcnt == 0) {
WARN(1, "Attempting to disable clock %s with refcnt 0", c->name);
int tegra_clk_shared_bus_update(struct clk *c);
void tegra3_set_cpu_skipper_delay(int delay);
unsigned long tegra_clk_measure_input_freq(void);
+int clk_enable_locked(struct clk *c);
+void clk_disable_locked(struct clk *c);
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
static inline bool tegra_clk_is_parent_allowed(struct clk *c, struct clk *p)
{ return true; }
/* emc switched to the new parent by low level code, but ref
count and s/w state need to be updated */
- clk_disable(p);
- clk_enable(tegra_clk_emc.parent);
+ clk_disable_locked(p);
+ clk_enable_locked(tegra_clk_emc.parent);
}
rate = clk_get_rate_all_locked(&tegra_clk_emc);