aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2016-08-18 10:29:40 -0400
committerIngo Molnar <mingo@kernel.org>2016-08-18 13:23:27 -0400
commit70b5b18f716a2d7ab20c2cfaea21919b9fdfb805 (patch)
tree9d55ff59bb4dc0bb676cde94686d80b2eb6a9639 /arch/x86
parent3684b03d8e9a889eda94ee74421959a9d55e5e19 (diff)
x86/platform/intel-mid: Run PWRMU command immediately
On some firmwares we have to tell how exactly we want the command to be proceeded. The default case, based on the official BSP code, is to run it immediately. This appears to be a safer approach based on the documentation. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1471530580-94247-1-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/platform/intel-mid/pwr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/platform/intel-mid/pwr.c b/arch/x86/platform/intel-mid/pwr.c
index c901a3423772..0548741b6894 100644
--- a/arch/x86/platform/intel-mid/pwr.c
+++ b/arch/x86/platform/intel-mid/pwr.c
@@ -44,6 +44,10 @@
44/* Bits in PM_CMD */ 44/* Bits in PM_CMD */
45#define PM_CMD_CMD(x) ((x) << 0) 45#define PM_CMD_CMD(x) ((x) << 0)
46#define PM_CMD_IOC (1 << 8) 46#define PM_CMD_IOC (1 << 8)
47#define PM_CMD_CM_NOP (0 << 9)
48#define PM_CMD_CM_IMMEDIATE (1 << 9)
49#define PM_CMD_CM_DELAY (2 << 9)
50#define PM_CMD_CM_TRIGGER (3 << 9)
47#define PM_CMD_D3cold (1 << 21) 51#define PM_CMD_D3cold (1 << 21)
48 52
49/* List of commands */ 53/* List of commands */
@@ -137,7 +141,7 @@ static int mid_pwr_wait(struct mid_pwr *pwr)
137 141
138static int mid_pwr_wait_for_cmd(struct mid_pwr *pwr, u8 cmd) 142static int mid_pwr_wait_for_cmd(struct mid_pwr *pwr, u8 cmd)
139{ 143{
140 writel(PM_CMD_CMD(cmd), pwr->regs + PM_CMD); 144 writel(PM_CMD_CMD(cmd) | PM_CMD_CM_IMMEDIATE, pwr->regs + PM_CMD);
141 return mid_pwr_wait(pwr); 145 return mid_pwr_wait(pwr);
142} 146}
143 147