/** * Watchdog interrupt handler * */ static irqreturn_t dsps_wdog_bite_irq(int irq, void *dev_id) { pr_err("%s\n", __func__); dsps_log_sfr(); dsps_restart_handler(); return IRQ_HANDLED; }
static irqreturn_t dsps_wdog_bite_irq(int irq, void *dev_id) { struct dsps_data *drv = dev_id; atomic_set(&drv->wd_crash, 1); dsps_log_sfr(); dsps_restart_handler(drv); return IRQ_HANDLED; }
static void dsps_smsm_state_cb(void *data, uint32_t old_state, uint32_t new_state) { struct dsps_data *drv = data; if (drv->crash == 1) { pr_debug("SMSM_RESET state change ignored\n"); drv->crash = 0; } else if (new_state & SMSM_RESET) { dsps_log_sfr(); dsps_restart_handler(drv); } }
/** * SMSM state change callback * */ static void dsps_smsm_state_cb(void *data, uint32_t old_state, uint32_t new_state) { pr_debug("%s\n", __func__); if (dsps_crash_shutdown_g == 1) { pr_debug("%s: SMSM_RESET state change ignored\n", __func__); dsps_crash_shutdown_g = 0; return; } if (new_state & SMSM_RESET) { dsps_log_sfr(); dsps_restart_handler(); } }