#3919 HIGH Never A: Power off via Geode, not EC side effect
Zarro Boogs per Child
bugtracker at laptop.org
Thu Sep 27 19:16:54 EDT 2007
#3919: Power off via Geode, not EC side effect
-------------------------------+--------------------------------------------
Reporter: wmb at firmworks.com | Owner: dilinger
Type: defect | Status: new
Priority: high | Milestone: Never Assigned
Component: kernel | Version:
Keywords: | Verified: 0
-------------------------------+--------------------------------------------
The current implementation of olpc_power_off() in arch/i386/kernel/olpc.c
works by turning the EC microcontroller off then back on, depending on the
assumption that the EC will turn off the main CPU during its reset
sequence. That assumption is not guaranteed, and may in fact change soon.
A better way is to tell the Geode to turn itself off, using the following
code, which should go in olpc-pm.c, not olpc.c
{{{
olpc_power_off(void)
{
/* Enable all of these controls with 0 delay */
outl(0x40000000, pms_base + PM_SCLK);
outl(0x40000000, pms_base + PM_IN_SLPCTL);
outl(0x40000000, pms_base + PM_WKXD);
outl(0x40000000, pms_base + PM_WKD);
/* Clear status bits (possibly unnecessary) */
outl(0x0002ffff, pms_base + PM_SSC);
outl(0xffffffff, acpi_base + PM_GPE0_STS);
/* Write SLP_EN bit to start the machinery */
outl(0x00002000, acpi_base + PM1_CNT1);
}
}}}
--
Ticket URL: <https://dev.laptop.org/ticket/3919>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list