/* Note that the spec says a DIFFERENT value must be written to the reload register each time. The "perturb" variable deals with this by adding 1 to the count every other time the function is called.  */
static void mpcore_wdt_keepalive(struct mpcore_wdt *wdt)
/* Note that the spec says a DIFFERENT value must be written to the reload register each time. The "perturb" variable deals with this by adding 1 to the count every other time the function is called.  */
static void mpcore_wdt_keepalive(struct mpcore_wdt *wdt)
{
	unsigned int count;
	count = (mpcore_timer_rate / 256) * mpcore_margin;
	spin_lock(&wdt_lock);
	writel(count + wdt->perturb, wdt->base + TWD_WDOG_LOAD);
	wdt->perturb = wdt->perturb ? 0 : 1;
	spin_unlock(&wdt_lock);
}