From 0d1215e34724bf9e4db329e818d699f5d11986ac Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Fri, 30 Sep 2011 21:27:37 -0700 Subject: ARM: tegra: power: Add Tegra3 cpu idle parameters Add Tegra3 cpu idle parameters: lp2_0_in_idle and lp_n_in_idle to independently control LP2 mode for boot and secondary cpus. Change-Id: I7e526b9bd78a9d5c3235307bbc89f5fb507bec2b Reviewed-on: http://git-master/r/55630 Reviewed-by: Aleksandr Frid Tested-by: Aleksandr Frid Reviewed-by: Scott Williams Reviewed-by: Yu-Huan Hsu Rebase-Id: Rc6a468b2e9e065c344b2386366d5a47d77ddf037 --- arch/arm/mach-tegra/cpuidle-t3.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/mach-tegra/cpuidle-t3.c') diff --git a/arch/arm/mach-tegra/cpuidle-t3.c b/arch/arm/mach-tegra/cpuidle-t3.c index 8ef8ed45e8bd..d9645ecb1a0c 100644 --- a/arch/arm/mach-tegra/cpuidle-t3.c +++ b/arch/arm/mach-tegra/cpuidle-t3.c @@ -67,6 +67,12 @@ static s64 tegra_cpu_wake_by_time[4] = { LLONG_MAX, LLONG_MAX, LLONG_MAX, LLONG_MAX }; #endif +static bool lp2_0_in_idle = true; +module_param(lp2_0_in_idle, bool, 0644); + +static bool lp2_n_in_idle = true; +module_param(lp2_n_in_idle, bool, 0644); + static struct clk *cpu_clk_for_dvfs; static struct clk *twd_clk; @@ -117,6 +123,9 @@ bool tegra3_lp2_is_allowed(struct cpuidle_device *dev, if (!tegra_all_cpus_booted) return false; + if ((!lp2_0_in_idle && !dev->cpu) || (!lp2_n_in_idle && dev->cpu)) + return false; + /* On A01, LP2 on slave CPU's cause ranhdom CPU hangs. * Refer to Bug 804085. */ -- cgit v1.2.3