From e2dbb8059f28bb8c5c8ec948d07a5b2eeb493847 Mon Sep 17 00:00:00 2001 From: Ramesh Thomas Date: Fri, 5 Aug 2016 14:09:05 -0700 Subject: [PATCH] power_mgmt: PM should use GPS1 instead of GPS0 QMSI boot loader uses GPS0. power.c should use GPS1 for its purpose because GPS1 is reserved for PM use. Switched to use GPS1 instead. Jira: ZEP-647 Change-Id: I653450cd0b42aa80bef21c8a42f4aa39cdaef2ed Signed-off-by: Ramesh Thomas --- arch/x86/soc/quark_se/power.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/soc/quark_se/power.c b/arch/x86/soc/quark_se/power.c index c1aa7e1b4d7..5c55330f83d 100644 --- a/arch/x86/soc/quark_se/power.c +++ b/arch/x86/soc/quark_se/power.c @@ -24,7 +24,8 @@ #define _LOW_POWER_MODE 0xD02ED02E #define _DEVICE_SUSPEND_ONLY_MODE 0x1D1E1D1E -#define _GPS0 0xb0800100 +/* GPS1 is reserved for PM use */ +#define _GPS1 0xb0800104 /* Variables used to save CPU state */ uint64_t _pm_save_gdtr; @@ -38,16 +39,16 @@ void _sys_soc_set_power_policy(uint32_t pm_policy) { switch (pm_policy) { case SYS_PM_DEEP_SLEEP: - sys_write32(_DEEP_SLEEP_MODE, _GPS0); + sys_write32(_DEEP_SLEEP_MODE, _GPS1); break; case SYS_PM_LOW_POWER_STATE: - sys_write32(_LOW_POWER_MODE, _GPS0); + sys_write32(_LOW_POWER_MODE, _GPS1); break; case SYS_PM_DEVICE_SUSPEND_ONLY: - sys_write32(_DEVICE_SUSPEND_ONLY_MODE, _GPS0); + sys_write32(_DEVICE_SUSPEND_ONLY_MODE, _GPS1); break; case SYS_PM_NOT_HANDLED: - sys_write32(0, _GPS0); + sys_write32(0, _GPS1); break; default: __ASSERT(0, "Unknown PM policy"); @@ -59,7 +60,7 @@ int _sys_soc_get_power_policy(void) { uint32_t mode; - mode = sys_read32(_GPS0); + mode = sys_read32(_GPS1); switch (mode) { case _DEEP_SLEEP_MODE: