> Date: Fri, 2 Sep 2016 08:31:20 +0200
> From: Marcus Glocker <mar...@nazgul.ch>
> 
> Trying to disable the watchdog on the allwinner,sun5i-r8 breaks the
> reboot ('reboot failed; spinning').  Can we change this back at least
> for the A10?

Sorry for dropping the ball here.  But does it work if instead of
WDOG_EN, you enable/disable WDOG_RST_EN based on the period being >0
or not?

> Index: sxidog.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/armv7/sunxi/sxidog.c,v
> retrieving revision 1.9
> diff -u -p -r1.9 sxidog.c
> --- sxidog.c  27 Aug 2016 14:13:14 -0000      1.9
> +++ sxidog.c  2 Sep 2016 06:27:21 -0000
> @@ -148,9 +148,8 @@ sxidog_callback(void *arg, int period)
>  
>       switch (sc->sc_type) {
>       case SXIDOG_A10:
> -             enable = (period > 0) ? WDOG_EN : 0;
>               SXIWRITE4(sc, WDOG_MODE_REG,
> -                 enable | WDOG_RST_EN | WDOG_INTV_VALUE(period));
> +                 WDOG_EN | WDOG_RST_EN | WDOG_INTV_VALUE(period));
>               SXIWRITE4(sc, WDOG_CTRL_REG, WDOG_KEY | WDOG_RSTART);
>               break;
>       case SXIDOG_A31:
> 
> 

Reply via email to