diff options
| author | Doug Zobel <dzobel1@motorola.com> | 2014-09-25 16:44:32 -0500 |
|---|---|---|
| committer | Doug Zobel <dzobel1@motorola.com> | 2014-09-25 16:46:19 -0500 |
| commit | 5fe013f79b93a67e8aa070172bd1ab35c51c3ab4 (patch) | |
| tree | 9bb9f10440423569d957405e576d7a84d216e19d /arch/arm/mach-omap2/pm-debug.c | |
| parent | 4f9af9948ef92869d86447062520b690b7c11d12 (diff) | |
| download | olio-linux-3.10-5fe013f79b93a67e8aa070172bd1ab35c51c3ab4.tar.xz olio-linux-3.10-5fe013f79b93a67e8aa070172bd1ab35c51c3ab4.zip | |
IKXCLOCK-3875 omap: disable offmode by default
Add a module pramater to disable OMAP offmode by default. Can
be overridden by sysfs or kernel cmdline
Change-Id: I7f14a57f951bc104117cc0547c4cda28bcd13f94
Diffstat (limited to 'arch/arm/mach-omap2/pm-debug.c')
| -rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index b5dff42606c..ea5a306d1f1 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -38,8 +38,16 @@ #include "pm.h" #include "pm-debug-regs.h" +/* enable_off_mode is the runtime flag for enable/disable of offmode */ u32 enable_off_mode; +/* + * global_disable_off_mode supercedes enable_off_mode and keeps + * offmode disabled as long as it is set + */ +bool global_disable_off_mode = 1; +module_param(global_disable_off_mode, bool, 0644); + #ifdef CONFIG_DEBUG_FS #include <linux/debugfs.h> #include <linux/seq_file.h> @@ -236,9 +244,13 @@ static int option_set(void *data, u64 val) { u32 *option = data; - *option = val; - if (option == &enable_off_mode) { + if (global_disable_off_mode) { + pr_warn("Disable global_disable_off_mode " + "before enabling off mode"); + return -EINVAL; + } + if (val) omap_pm_enable_off_mode(); else @@ -247,6 +259,8 @@ static int option_set(void *data, u64 val) omap3_pm_off_mode_enable(val); } + *option = val; + return 0; } |