From 330d0127c2ad148af26efea742c4ed0c78956a8c Mon Sep 17 00:00:00 2001 From: Jun Lin Date: Fri, 7 Oct 2022 13:06:37 +0800 Subject: zephyr: eSPI: disable interrupt before sysjump This commit disables the host interrupts before sysjump. This prevents the ISR from trigger during sysjump to cause the unexpected symptom. BANCH=none BUG=b:246963730 TEST=in skyrim, the hostcmd broken after sysjump symptom is fixed by the related PR and CL. Signed-off-by: Jun Lin Change-Id: I861c907b0c251c642ae3e59d1a6553c3c52be38a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3937849 Reviewed-by: Diana Z Reviewed-by: Keith Short Code-Coverage: Zoss Reviewed-by: Fabio Baltieri Tested-by: CH Lin Commit-Queue: Keith Short --- zephyr/shim/src/espi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zephyr/shim/src/espi.c b/zephyr/shim/src/espi.c index d6f6bed314..5b3920b356 100644 --- a/zephyr/shim/src/espi.c +++ b/zephyr/shim/src/espi.c @@ -779,3 +779,13 @@ uint32_t get_8042_data(uint32_t data) return kbc->data; } + +static void espi_sysjump(void) +{ + uint32_t enable = 0; + + /* Disable host interface interrupts during the sysjump */ + espi_write_lpc_request(espi_dev, ECUSTOM_HOST_SUBS_INTERRUPT_EN, + &enable); +} +DECLARE_HOOK(HOOK_SYSJUMP, espi_sysjump, HOOK_PRIO_DEFAULT); -- cgit v1.2.1