> +static int rwdt_restart(struct watchdog_device *wdev, unsigned long action,
> +                     void *data)
> +{
> +     struct rwdt_priv *priv = watchdog_get_drvdata(wdev);
> +
> +     pm_runtime_get_sync(wdev->parent);
> +
> +     rwdt_write(priv, 0x00, RWTCSRB);
> +     rwdt_write(priv, 0x00, RWTCSRA);
> +     rwdt_write(priv, 0xffff, RWTCNT);
> +
> +     while (readb_relaxed(priv->base + RWTCSRA) & RWTCSRA_WRFLG)
> +             cpu_relax();
> +
> +     rwdt_write(priv, 0x80, RWTCSRA);
> +     return 0;
> +}

I used to have this simpler version (back then for the UP case):

+       rwdt_start(wdev);
+       rwdt_write(priv, 0xffff, RWTCNT);
+       return 0;

It should still work probably...

Attachment: signature.asc
Description: PGP signature

Reply via email to