summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Lin <CHLin56@nuvoton.com>2022-10-06 15:21:56 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-10 22:05:38 +0000
commit6045f083da62a46cbb0d37f30893eb877a9b7b62 (patch)
tree3a55d8b516fb8f1bf213df1e159da86eb7b5651f
parent7cb58895c4bf51761acd8df0629c3ca12853e750 (diff)
downloadchrome-ec-6045f083da62a46cbb0d37f30893eb877a9b7b62.tar.gz
zephyr: shim: eSPI: enable host interface interrupts explictly
In PR:51013, we drop the enabling of host interface interrupts during driver initialization because it makes more sense to enable interrupts after we set the eSPI configuration and register callbacks. This CL implements the logic above in the eSPI shim by calling eSPI API to enable interrupts. BRANCH=none BUG=b:246963730 TEST=in npcx9_evb, test the kbc/pm channel/port80 communication are normal between EC and host emulator. TEST=in skyrim, the hostcmd broken after sysjump symptom is fixed by the related PR and CL. Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: Ieea4fd6f52b809110c835df227443d368cf12093 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3936230 Tested-by: CH Lin <chlin56@nuvoton.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/shim/src/espi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zephyr/shim/src/espi.c b/zephyr/shim/src/espi.c
index 5b3920b356..6a8e18e262 100644
--- a/zephyr/shim/src/espi.c
+++ b/zephyr/shim/src/espi.c
@@ -685,6 +685,7 @@ static void espi_peripheral_handler(const struct device *dev,
static int zephyr_shim_setup_espi(const struct device *unused)
{
+ uint32_t enable = 1;
static const struct {
espi_callback_handler_t handler;
enum espi_bus_event event_type;
@@ -732,6 +733,9 @@ static int zephyr_shim_setup_espi(const struct device *unused)
return -1;
}
+ /* Enable host interface interrupts */
+ espi_write_lpc_request(espi_dev, ECUSTOM_HOST_SUBS_INTERRUPT_EN,
+ &enable);
return 0;
}