summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/pm-t3.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2013-09-11 15:08:17 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-26 19:45:38 -0700
commit07ef3ad4aa88886e98c9a931558ae96a4495ae81 (patch)
tree8d02d5371b1433bd7867055a9609aaa0e8a7c094 /arch/arm/mach-tegra/pm-t3.c
parent1bd0c7fc716f9e5e91e484f1a1cc6facfdfe2076 (diff)
ARM: tegra: fix warning during LP0
- with CONFIG_DEBUG_ATOMIC_SLEEP enabled, below warning was seen BUG: sleeping function called from invalid context at /kernel/kernel/mutex.c:85 - function 'tegra_get_clock_by_name()' was being called from atomic context in 'tegra_lp0_cpu_mode()' - move function tegra_get_clock_by_name("cclk_lp") to separate init function and call it through subsys_initcall() to avoid this warning during LP0 Bug 1355279 Bug 1318641 Change-Id: I42df042051938d75366884946e7f660522f3c26c Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/273034 (cherry picked from commit 9c126a72c41aa66fb9bf394426e331d379aa5c40) Reviewed-on: http://git-master/r/275055 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/pm-t3.c')
-rw-r--r--arch/arm/mach-tegra/pm-t3.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/pm-t3.c b/arch/arm/mach-tegra/pm-t3.c
index a6918766f97c..a405bdb82d99 100644
--- a/arch/arm/mach-tegra/pm-t3.c
+++ b/arch/arm/mach-tegra/pm-t3.c
@@ -115,6 +115,8 @@
#define CLK_RST_CONTROLLER_PLLX_MISC_0 \
(IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0xE4)
+static struct clk *cclk_lp;
+
static int cluster_switch_prolog_clock(unsigned int flags)
{
u32 reg;
@@ -651,15 +653,20 @@ void tegra_lp0_resume_mc(void)
tegra_mc_timing_restore();
}
+static int __init get_clock_cclk_lp(void)
+{
+ if (!cclk_lp)
+ cclk_lp = tegra_get_clock_by_name("cclk_lp");
+ return 0;
+}
+
+subsys_initcall(get_clock_cclk_lp);
+
void tegra_lp0_cpu_mode(bool enter)
{
- static struct clk *cclk_lp;
static bool entered_on_g = false;
unsigned int flags;
- if (!cclk_lp)
- cclk_lp = tegra_get_clock_by_name("cclk_lp");
-
if (enter)
entered_on_g = !is_lp_cluster();