sunxi: use sun6i-style watchdog for H6
authorIcenowy Zheng <icenowy@aosc.io>
Sat, 21 Jul 2018 08:20:27 +0000 (16:20 +0800)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 31 Jul 2018 06:08:13 +0000 (11:38 +0530)
The H6 SoC has a sun6i-style watchdog in its timer part.

Enable the usage of it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/include/asm/arch-sunxi/timer.h
arch/arm/mach-sunxi/board.c

index cb02dd8bf8fbda747e39390bf8723471d2860bc1..6f138d04b806495d2af17d641b02efa9a71bab08 100644 (file)
@@ -76,7 +76,7 @@ struct sunxi_timer_reg {
        struct sunxi_tgp tgp[4];
        u8 res5[8];
        u32 cpu_cfg;
-#elif defined(CONFIG_SUNXI_GEN_SUN6I)
+#elif defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6)
        u8 res3[16];
        struct sunxi_wdog wdog[5];      /* We have 5 watchdogs */
 #endif
index 58fef05bd737b57bdcc27b90087bfe1fb4421ab6..40a6436ca58a6cf23933c3621aeb56e1b7ba9ab1 100644 (file)
@@ -282,7 +282,7 @@ void reset_cpu(ulong addr)
                /* sun5i sometimes gets stuck without this */
                writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode);
        }
-#elif defined(CONFIG_SUNXI_GEN_SUN6I)
+#elif defined(CONFIG_SUNXI_GEN_SUN6I) || defined(CONFIG_MACH_SUN50I_H6)
        static const struct sunxi_wdog *wdog =
                 ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog;