From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Tue, 21 Oct 2014 19:51:15 +0100 Subject: [U-Boot] [PATCH 3/3] ARM: sunxi: Fix reset command on sun6i/sun8i In-Reply-To: References: <1412426248-20050-1-git-send-email-wens@csie.org> <1412426248-20050-4-git-send-email-wens@csie.org> <1413041628.11505.26.camel@hellion.org.uk> Message-ID: <1413917475.20604.32.camel@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, 2014-10-12 at 10:40 +0800, Chen-Yu Tsai wrote: > On Sat, Oct 11, 2014 at 11:33 PM, Ian Campbell 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.