soc: qcom: watchdog_v2: Increase timeout for forced bites
Though we configure the watchdog timeout to be only one tick when deliberately trying to force a watchdog bite, the watchdog bite interrupt may be processed asynchronously by the secure environment on a different CPU. Therefore, we need to increase the amount of time we spend waiting for the watchdog bite to happen before falling back on other reset methods, to avoid a race condition between the fallback reset code and the secure environment itself. Change-Id: I73de0abbf8cdd77f22374886f4a89b25743b86eb Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
This commit is contained in:
parent
67dbe9f83b
commit
5acff0a6d4
1 changed files with 18 additions and 0 deletions
|
@ -386,6 +386,24 @@ static int msm_watchdog_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void msm_trigger_wdog_bite(void)
|
||||||
|
{
|
||||||
|
if (!wdog_data)
|
||||||
|
return;
|
||||||
|
pr_info("Causing a watchdog bite!");
|
||||||
|
__raw_writel(1, wdog_data->base + WDT0_BITE_TIME);
|
||||||
|
mb();
|
||||||
|
__raw_writel(1, wdog_data->base + WDT0_RST);
|
||||||
|
mb();
|
||||||
|
/* Delay to make sure bite occurs */
|
||||||
|
mdelay(2000);
|
||||||
|
pr_err("Wdog - STS: 0x%x, CTL: 0x%x, BARK TIME: 0x%x, BITE TIME: 0x%x",
|
||||||
|
__raw_readl(wdog_data->base + WDT0_STS),
|
||||||
|
__raw_readl(wdog_data->base + WDT0_EN),
|
||||||
|
__raw_readl(wdog_data->base + WDT0_BARK_TIME),
|
||||||
|
__raw_readl(wdog_data->base + WDT0_BITE_TIME));
|
||||||
|
}
|
||||||
|
|
||||||
static irqreturn_t wdog_bark_handler(int irq, void *dev_id)
|
static irqreturn_t wdog_bark_handler(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct msm_watchdog_data *wdog_dd = (struct msm_watchdog_data *)dev_id;
|
struct msm_watchdog_data *wdog_dd = (struct msm_watchdog_data *)dev_id;
|
||||||
|
|
Loading…
Add table
Reference in a new issue