#4474 NORM Never A: EC explodes if EC (write) command executed too closely to suspension
Zarro Boogs per Child
bugtracker at laptop.org
Fri Oct 26 18:24:31 EDT 2007
#4474: EC explodes if EC (write) command executed too closely to suspension
---------------------------------+------------------------------------------
Reporter: dilinger | Owner: David.Lin
Type: defect | Status: new
Priority: normal | Milestone: Never Assigned
Component: embedded controller | Version:
Keywords: | Verified: 0
---------------------------------+------------------------------------------
In the kernel's olpc_fixup_sleep, we need to execute olpc_ec_mask_unset()
to disable 1% SOC SCIs while we've suspended. However, if it is run
without any sort of delay at the end, the following things happen:
- we execute EC_WRITE_SCI_MASK (0x1b) cmd
- we wait for the ACK via IBF/OBF flags
- we send a byte to the EC (the SCI mask)
- we wait for IBF to be clear
at this point, the EC transaction should be done. however..
- we proceed to suspend
When we awaken, the EC's IBF/OBF flags are hosed; all EC communication
fails. If we reboot into OFW, all of its EC communications fail.
However, if we add a udelay(250) after the EC_WRITE_SCI_MASK command but
prior to suspending, when the system resumes the EC is fine. Another
thing that works is to run another EC command (EC_READ_SCI_MASK) prior to
suspend.
So basically, there's some sort of race in the EC.. if we suspend too
quickly after a write command, it gets confused.
--
Ticket URL: <https://dev.laptop.org/ticket/4474>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list