aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/platform/olpc/olpc-xo1-pm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/platform/olpc/olpc-xo1-pm.c')
-rw-r--r--arch/x86/platform/olpc/olpc-xo1-pm.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/x86/platform/olpc/olpc-xo1-pm.c b/arch/x86/platform/olpc/olpc-xo1-pm.c
index 0ce8616c88ae..d75582d1aa55 100644
--- a/arch/x86/platform/olpc/olpc-xo1-pm.c
+++ b/arch/x86/platform/olpc/olpc-xo1-pm.c
@@ -18,6 +18,7 @@
18#include <linux/pm.h> 18#include <linux/pm.h>
19#include <linux/mfd/core.h> 19#include <linux/mfd/core.h>
20#include <linux/suspend.h> 20#include <linux/suspend.h>
21#include <linux/olpc-ec.h>
21 22
22#include <asm/io.h> 23#include <asm/io.h>
23#include <asm/olpc.h> 24#include <asm/olpc.h>
@@ -51,16 +52,11 @@ EXPORT_SYMBOL_GPL(olpc_xo1_pm_wakeup_clear);
51static int xo1_power_state_enter(suspend_state_t pm_state) 52static int xo1_power_state_enter(suspend_state_t pm_state)
52{ 53{
53 unsigned long saved_sci_mask; 54 unsigned long saved_sci_mask;
54 int r;
55 55
56 /* Only STR is supported */ 56 /* Only STR is supported */
57 if (pm_state != PM_SUSPEND_MEM) 57 if (pm_state != PM_SUSPEND_MEM)
58 return -EINVAL; 58 return -EINVAL;
59 59
60 r = olpc_ec_cmd(EC_SET_SCI_INHIBIT, NULL, 0, NULL, 0);
61 if (r)
62 return r;
63
64 /* 60 /*
65 * Save SCI mask (this gets lost since PM1_EN is used as a mask for 61 * Save SCI mask (this gets lost since PM1_EN is used as a mask for
66 * wakeup events, which is not necessarily the same event set) 62 * wakeup events, which is not necessarily the same event set)
@@ -76,16 +72,6 @@ static int xo1_power_state_enter(suspend_state_t pm_state)
76 /* Restore SCI mask (using dword access to CS5536_PM1_EN) */ 72 /* Restore SCI mask (using dword access to CS5536_PM1_EN) */
77 outl(saved_sci_mask, acpi_base + CS5536_PM1_STS); 73 outl(saved_sci_mask, acpi_base + CS5536_PM1_STS);
78 74
79 /* Tell the EC to stop inhibiting SCIs */
80 olpc_ec_cmd(EC_SET_SCI_INHIBIT_RELEASE, NULL, 0, NULL, 0);
81
82 /*
83 * Tell the wireless module to restart USB communication.
84 * Must be done twice.
85 */
86 olpc_ec_cmd(EC_WAKE_UP_WLAN, NULL, 0, NULL, 0);
87 olpc_ec_cmd(EC_WAKE_UP_WLAN, NULL, 0, NULL, 0);
88
89 return 0; 75 return 0;
90} 76}
91 77