driver: wdt: npcx: Remove watchdog reset waiting loop in ISR
NPCX watchdog driver has a WDT_NPCX_DELAY_CYCLES for delay the watchdog reset time after the watchdog timeout. For some systems, users would like to use the watchdog timeout ISR but don't reset the chip immediately. Let the system have the final chance to ongoing the system before the real hardware reset time. Removing the watchdog reset waiting loop in ISR lets users decide whether wait for watchdog reset by themself. Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
This commit is contained in:
parent
248aebbb70
commit
7b7129ba9f
1 changed files with 3 additions and 6 deletions
|
@ -114,16 +114,13 @@ static void wdt_t0out_isr(const struct device *dev, struct npcx_wui *wui)
|
||||||
struct wdt_npcx_data *const data = DRV_DATA(dev);
|
struct wdt_npcx_data *const data = DRV_DATA(dev);
|
||||||
ARG_UNUSED(wui);
|
ARG_UNUSED(wui);
|
||||||
|
|
||||||
|
LOG_DBG("WDT reset will issue after %d delay cycle! WUI(%d %d %d)",
|
||||||
|
CONFIG_WDT_NPCX_DELAY_CYCLES, wui->table, wui->group, wui->bit);
|
||||||
|
|
||||||
/* Handle watchdog event here. */
|
/* Handle watchdog event here. */
|
||||||
if (data->cb) {
|
if (data->cb) {
|
||||||
data->cb(dev, 0);
|
data->cb(dev, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_DBG("WDT issued! WUI(%d %d %d)", wui->table, wui->group, wui->bit);
|
|
||||||
|
|
||||||
/* Wait for watchdog event and reset occurred! */
|
|
||||||
while (1)
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wdt_config_t0out_interrupt(const struct device *dev)
|
static void wdt_config_t0out_interrupt(const struct device *dev)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue