summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-01-15 16:48:40 -0800
committerChromeOS bot <3su6n15k.default@developer.gserviceaccount.com>2016-01-25 19:31:24 +0000
commit58f817b7dc3ae604c9994560d11ec65f2faddf11 (patch)
tree83422f8dec6c8a1f23d4711d3d00693d265ac8de
parentbecae1a08246f28f5bea462943ed4aa50651e566 (diff)
downloadchrome-ec-58f817b7dc3ae604c9994560d11ec65f2faddf11.tar.gz
mec1322: lpc: Clear STATUS_PROCESSING LPC status bit on init
When a sysjump host command is received, there is a (usually) small period of time when the EC has sent a reply packet back to the host, but interrupts are still enabled. If the host sends a new host command, STATUS_PROCESSING will be set by the EC ISR, but the host command will never be handled due to pending sysjump. In this case, STATUS_PROCESSING will still be set, so we need to clear it on LPC post-sysjump re-init. BUG=chrome-os-partner:49318 TEST=Add 200ms msleep before call to interrupt_disable() in jump_to_image(), boot to software sync, and verify host commands are handled successfully post-sysjump and system continues to boot. BRANCH=glados, cyan Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Id0878df738541f7d5d158821a68988a8e6dc6759 Reviewed-on: https://chromium-review.googlesource.com/322431 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@chromium.org> (cherry picked from commit e933d0b7b6984bc8abf40b3364695d9955a9a426) Reviewed-on: https://chromium-review.googlesource.com/323651 Commit-Queue: Keith Tzeng <keith.tzeng@quantatw.com> Tested-by: Keith Tzeng <keith.tzeng@quantatw.com>
-rw-r--r--chip/mec1322/lpc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/chip/mec1322/lpc.c b/chip/mec1322/lpc.c
index c486f75e77..915743fc67 100644
--- a/chip/mec1322/lpc.c
+++ b/chip/mec1322/lpc.c
@@ -229,12 +229,15 @@ static void setup_lpc(void)
MEC1322_LPC_ACPI_EC0_BAR = 0x00628304;
MEC1322_INT_ENABLE(15) |= 1 << 6;
MEC1322_INT_BLK_EN |= 1 << 15;
+ /* Clear STATUS_PROCESSING bit in case it was set during sysjump */
+ MEC1322_ACPI_EC_STATUS(0) &= ~EC_LPC_STATUS_PROCESSING;
task_enable_irq(MEC1322_IRQ_ACPIEC0_IBF);
/* Set up ACPI1 for 0x200/0x204 */
MEC1322_LPC_ACPI_EC1_BAR = 0x02008407;
MEC1322_INT_ENABLE(15) |= 1 << 8;
MEC1322_INT_BLK_EN |= 1 << 15;
+ MEC1322_ACPI_EC_STATUS(1) &= ~EC_LPC_STATUS_PROCESSING;
task_enable_irq(MEC1322_IRQ_ACPIEC1_IBF);
/* Set up 8042 interface at 0x60/0x64 */