summaryrefslogtreecommitdiff
path: root/arch/arm/mach-sunxi/board.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-20 13:53:51 -0400
committerTom Rini <trini@konsulko.com>2019-05-20 13:53:51 -0400
commit79764b5081d276596dc9294dece73354f81a6801 (patch)
tree35b590b7fa99f65de5b44efa9e208af58dfa028d /arch/arm/mach-sunxi/board.c
parent956520cd7012dfa871bfd06b5f9defd148b4572c (diff)
parentc598c4837d782f6d9481f4be07ae5d679c6df976 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
- H6 WDT reset fix (Clément) - H6 SPL_TEXT_BASE fixes (Clément, Jonas) - NPI-M1+ emac enablment (Emmanuel)
Diffstat (limited to 'arch/arm/mach-sunxi/board.c')
-rw-r--r--arch/arm/mach-sunxi/board.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 7f5b633e012..8e9bb63d9d2 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -289,9 +289,14 @@ void reset_cpu(ulong addr)
writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
}
#elif defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6)
+#if defined(CONFIG_MACH_SUN50I_H6)
+ /* WDOG is broken for some H6 rev. use the R_WDOG instead */
static const struct sunxi_wdog *wdog =
- ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
-
+ (struct sunxi_wdog *)SUNXI_R_WDOG_BASE;
+#else
+ static const struct sunxi_wdog *wdog =
+ ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;
+#endif
/* Set the watchdog for its shortest interval (.5s) and wait */
writel(WDT_CFG_RESET, &wdog->cfg);
writel(WDT_MODE_EN, &wdog->mode);