diff options
| -rw-r--r-- | arch/arm/mach-omap2/Kconfig | 9 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap-pm-noop.c | 29 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap-pm.h | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 25 | 
5 files changed, 38 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 281a0a7614a..9b9c99c9f34 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -420,15 +420,6 @@ config OMAP3_SDRC_AC_TIMING  	  wish to say no.  Selecting yes without understanding what is  	  going on could result in system crashes; -config DISABLE_OMAP_ERRATA_i583 -	bool "Override errata i583 -	depends on ARCH_OMAP3 -	default n -	help -	  Errata i583 affects JDEC memory timing when waking from OFF mode on -	  ES 1.1 and older OMAP3.  If the system clock is 26MHz or 38.4MHz and -	  there is no DDR on CS1, then it is safe to disable this errata check. -  config OMAP4_ERRATA_I688  	bool "OMAP4 errata: Async Bridge Corruption"  	depends on (ARCH_OMAP4 || SOC_OMAP5) && !ARCH_MULTIPLATFORM diff --git a/arch/arm/mach-omap2/omap-pm-noop.c b/arch/arm/mach-omap2/omap-pm-noop.c index aeb217bfab1..6a3be2bebdd 100644 --- a/arch/arm/mach-omap2/omap-pm-noop.c +++ b/arch/arm/mach-omap2/omap-pm-noop.c @@ -25,6 +25,7 @@  #include "omap_device.h"  #include "omap-pm.h" +static bool off_mode_enabled;  static int dummy_context_loss_counter;  /* @@ -280,6 +281,28 @@ unsigned long omap_pm_cpu_get_freq(void)  	return 0;  } +/** + * omap_pm_enable_off_mode - notify OMAP PM that off-mode is enabled + * + * Intended for use only by OMAP PM core code to notify this layer + * that off mode has been enabled. + */ +void omap_pm_enable_off_mode(void) +{ +	off_mode_enabled = true; +} + +/** + * omap_pm_disable_off_mode - notify OMAP PM that off-mode is disabled + * + * Intended for use only by OMAP PM core code to notify this layer + * that off mode has been disabled. + */ +void omap_pm_disable_off_mode(void) +{ +	off_mode_enabled = false; +} +  /*   * Device context loss tracking   */ @@ -297,14 +320,12 @@ int omap_pm_get_dev_context_loss_count(struct device *dev)  	if (dev->pm_domain == &omap_device_pm_domain) {  		count = omap_device_get_context_loss_count(pdev);  	} else { -		WARN_ONCE(omap_pm_get_off_mode(), -			"omap_pm: using dummy context loss counter; device %s " -			"should be converted to omap_device", +		WARN_ONCE(off_mode_enabled, "omap_pm: using dummy context loss counter; device %s should be converted to omap_device",  			  dev_name(dev));  		count = dummy_context_loss_counter; -		if (omap_pm_get_off_mode()) { +		if (off_mode_enabled) {  			count++;  			/*  			 * Context loss count has to be a non-negative value. diff --git a/arch/arm/mach-omap2/omap-pm.h b/arch/arm/mach-omap2/omap-pm.h index 4511a53b8e3..67faa7b8fe9 100644 --- a/arch/arm/mach-omap2/omap-pm.h +++ b/arch/arm/mach-omap2/omap-pm.h @@ -18,7 +18,6 @@  #include <linux/cpufreq.h>  #include <linux/clk.h>  #include <linux/opp.h> -#include <linux/power/omap_prm.h>  /*   * agent_id values for use with omap_pm_set_min_bus_tput(): @@ -347,4 +346,7 @@ unsigned long omap_pm_cpu_get_freq(void);   */  int omap_pm_get_dev_context_loss_count(struct device *dev); +void omap_pm_enable_off_mode(void); +void omap_pm_disable_off_mode(void); +  #endif diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index b5dff42606c..cc38db9edf0 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -227,7 +227,9 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir)  static int option_get(void *data, u64 *val)  { -	*val = omap_pm_get_off_mode(); +	u32 *option = data; + +	*val = *option;  	return 0;  } diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 844b10723a2..23eb24308cc 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -39,7 +39,6 @@  #include "clockdomain.h"  #include "powerdomain.h" -#include "omap-pm.h"  #include "soc.h"  #include "common.h"  #include "cm3xxx.h" @@ -52,7 +51,6 @@  #include "sram.h"  #include "control.h"  #include "pm-debug-regs.h" -#include "iomap.h"  /* pm34xx errata defined in pm.h */  u16 pm34xx_errata; @@ -295,8 +293,7 @@ void omap_sram_idle(void)  	/* PER */  	if (per_next_state < PWRDM_POWER_ON) { -		per_going_off = (per_next_state == PWRDM_POWER_OFF) ? -			OFF_MODE : 0; +		per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;  		omap2_gpio_prepare_for_idle(per_going_off);  	} @@ -305,9 +302,6 @@ void omap_sram_idle(void)  		if (core_next_state == PWRDM_POWER_OFF) {  			omap3_core_save_context();  			omap3_cm_save_context(); - -			omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, -						   WKUP_MOD, PM_WKEN);  		}  	} @@ -358,10 +352,10 @@ void omap_sram_idle(void)  			omap3_sram_restore_context();  			omap2_sms_restore_context();  		} -		if (core_next_state == PWRDM_POWER_OFF) { -			omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, -						     WKUP_MOD, PM_WKEN); -		} +		if (core_next_state == PWRDM_POWER_OFF) +			omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK, +					       OMAP3430_GR_MOD, +					       OMAP3_PRM_VOLTCTRL_OFFSET);  	}  	omap3_intc_resume_idle(); @@ -681,10 +675,8 @@ static void __init pm_errata_configure(void)  		enable_omap3630_toggle_l2_on_restore();  		if (omap_rev() < OMAP3630_REV_ES1_2) -			pm34xx_errata |= PM_PER_MEMORIES_ERRATUM_i582; -#ifndef CONFIG_DISABLE_OMAP_ERRATA_i583 -			pm34xx_errata |= PM_SDRC_WAKEUP_ERRATUM_i583; -#endif +			pm34xx_errata |= (PM_SDRC_WAKEUP_ERRATUM_i583 | +					  PM_PER_MEMORIES_ERRATUM_i582);  	} else if (cpu_is_omap34xx()) {  		pm34xx_errata |= PM_PER_MEMORIES_ERRATUM_i582;  	} @@ -753,9 +745,6 @@ int __init omap3_pm_init(void)  	omap_pm_suspend = omap3_pm_suspend;  #endif -	if (omap_pm_get_off_mode()) -		omap3_pm_off_mode_enable(true); -  	arm_pm_idle = omap3_pm_idle;  	omap3_idle_init();  |