17 #include <linux/export.h>
26 #define DRV_NAME "olpc-xo1-pm"
28 static unsigned long acpi_base;
29 static unsigned long pms_base;
48 wakeup_mask &= ~value;
54 unsigned long saved_sci_mask;
65 saved_sci_mask &= 0xffff0000;
68 do_olpc_suspend_lowlevel();
80 void *pgd_addr =
__va(read_cr3());
85 __asm__(
"movl %0,%%eax" : :
"r" (pgd_addr));
87 : :
"D" (&ofw_bios_entry));
91 "outb %al, $0x71\n\t");
95 static void xo1_power_off(
void)
120 .valid = xo1_power_state_valid,
121 .enter = xo1_power_state_enter,
130 if (!machine_is_olpc())
139 dev_err(&pdev->
dev,
"can't fetch device resource info\n");
143 pms_base = res->
start;
144 else if (
strcmp(pdev->
name,
"olpc-xo1-pm-acpi") == 0)
145 acpi_base = res->
start;
148 if (pms_base && acpi_base) {
163 else if (
strcmp(pdev->
name,
"olpc-xo1-pm-acpi") == 0)
172 .name =
"cs5535-pms",
175 .probe = xo1_pm_probe,
181 .name =
"olpc-xo1-pm-acpi",
184 .probe = xo1_pm_probe,
188 static int __init xo1_pm_init(
void)