From 8113d238fb985d73e7607510c89fcc3bfbe98052 Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Tue, 4 Oct 2022 10:54:36 -0500 Subject: alerts: ignore RTC_DEAD alerts BUG=b:244476137 TEST=none Change-Id: I07b6cf0e65b578aa28a61185ff1e0a7b12a63380 Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935022 Reviewed-by: Andrey Pronin Commit-Queue: Andrey Pronin --- chip/g/alerts.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/chip/g/alerts.c b/chip/g/alerts.c index 7396248fc0..d0d0ba8e48 100644 --- a/chip/g/alerts.c +++ b/chip/g/alerts.c @@ -116,6 +116,13 @@ static void alert_interrupt_process(int alert) alert_intr_clear(alert); } +#define IGNORE_GLOBALSEC_ALERT(name) \ + DECLARE_IRQ(GC_IRQNUM_GLOBALSEC_##name##_ALERT_INT, ignore_##name, 1); \ + void ignore_##name(void) \ + { \ + alert_intr_clear(ALERT_NUM_##name); \ + } + #define GLOBALSEC_ALERT_COUNTER(name) \ DECLARE_IRQ(GC_IRQNUM_GLOBALSEC_##name##_ALERT_INT, handler_##name, 1); \ void handler_##name(void) \ @@ -159,7 +166,8 @@ GLOBALSEC_ALERT_COUNTER(KEYMGR0_SHA_FAULT); GLOBALSEC_ALERT_COUNTER(KEYMGR0_SHA_HKEY); GLOBALSEC_ALERT_COUNTER(PMU_BATTERY_MON); GLOBALSEC_ALERT_COUNTER(PMU_PMU_WDOG); -GLOBALSEC_ALERT_COUNTER(RTC0_RTC_DEAD); +/* Filter out RTC_DEAD alerts */ +IGNORE_GLOBALSEC_ALERT(RTC0_RTC_DEAD); GLOBALSEC_ALERT_COUNTER(TEMP0_MAX_TEMP); GLOBALSEC_ALERT_COUNTER(TEMP0_MAX_TEMP_DIFF); GLOBALSEC_ALERT_COUNTER(TEMP0_MIN_TEMP); -- cgit v1.2.1