Skip to content

Commit 70b5b18

Browse files
andy-shevIngo Molnar
authored andcommitted
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 <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/1471530580-94247-1-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar <[email protected]>
1 parent 3684b03 commit 70b5b18

File tree

1 file changed

+5
-1
lines changed
  • arch/x86/platform/intel-mid

1 file changed

+5
-1
lines changed

arch/x86/platform/intel-mid/pwr.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
/* Bits in PM_CMD */
4545
#define PM_CMD_CMD(x) ((x) << 0)
4646
#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)
4751
#define PM_CMD_D3cold (1 << 21)
4852

4953
/* List of commands */
@@ -137,7 +141,7 @@ static int mid_pwr_wait(struct mid_pwr *pwr)
137141

138142
static int mid_pwr_wait_for_cmd(struct mid_pwr *pwr, u8 cmd)
139143
{
140-
writel(PM_CMD_CMD(cmd), pwr->regs + PM_CMD);
144+
writel(PM_CMD_CMD(cmd) | PM_CMD_CM_IMMEDIATE, pwr->regs + PM_CMD);
141145
return mid_pwr_wait(pwr);
142146
}
143147

0 commit comments

Comments
 (0)