[U-Boot] [PATCH 3/3] ARM: sunxi: Fix reset command on sun6i/sun8i

Ian Campbell ijc at hellion.org.uk
Tue Oct 21 20:51:15 CEST 2014


On Sun, 2014-10-12 at 10:40 +0800, Chen-Yu Tsai wrote:
> On Sat, Oct 11, 2014 at 11:33 PM, Ian Campbell <ijc at hellion.org.uk> wrote:
> > On Sat, 2014-10-04 at 20:37 +0800, Chen-Yu Tsai wrote:
> >> +#else /* CONFIG_SUN6I || CONFIG_SUN8I || .. */
> >> +     static const struct sunxi_wdog *wdog =
> >> +              ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
> >> +
> >> +     /* Set the watchdog for its shortest interval (.5s) and wait */
> >> +     writel(WDT_CFG_RESET, &wdog->cfg);
> >> +     writel(WDT_MODE_EN, &wdog->mode);
> >> +     writel(WDT_CTRL_KEY | WDT_CTRL_RESTART, &wdog->ctl);
> >
> > That's annoyingly close to the 4/5/7i version, but not quite close
> > enough to allow any meaningful sharing :-/
> 
> I suppose it is possible to share using clrsetbits...

I think it probably isn't worth it.

> 
> >> +     while (1) {
> >> +             /* sun5i sometimes gets stuck without this */
> >
> > Is this not therefore unnecessary on 6i/8i?
> 
> The kernel restart driver uses this.
> But Allwinner's original code does not.

Unless it is needed in practice lets just leave it out.

Ian.



More information about the U-Boot mailing list