summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-sunxi/timer.h
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-11-30 16:27:14 +0800
committerMaxime Ripard <maxime.ripard@free-electrons.com>2017-04-20 13:30:00 +0200
commit6c7ae2bfc9f052b89c4a874842a6f44cc2e1f0a9 (patch)
tree915646f90fc9a745fafaefc84b89fe58953742d9 /arch/arm/include/asm/arch-sunxi/timer.h
parent409677ec1706c1374f9ce5e1833ae425dd0a9602 (diff)
sunxi: Fix watchdog reset function for R40
The watchdog found on the R40 SoC is the older variant found on the A20. Add the proper "#if defines" to make it work. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi/timer.h')
-rw-r--r--arch/arm/include/asm/arch-sunxi/timer.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/timer.h b/arch/arm/include/asm/arch-sunxi/timer.h
index a665309803..ccdf942534 100644
--- a/arch/arm/include/asm/arch-sunxi/timer.h
+++ b/arch/arm/include/asm/arch-sunxi/timer.h
@@ -67,7 +67,7 @@ struct sunxi_timer_reg {
struct sunxi_timer timer[6]; /* We have 6 timers */
u8 res2[16];
struct sunxi_avs avs;
-#ifdef CONFIG_SUNXI_GEN_SUN4I
+#if defined(CONFIG_SUNXI_GEN_SUN4I) || defined(CONFIG_MACH_SUN8I_R40)
struct sunxi_wdog wdog; /* 0x90 */
/* XXX the following is not accurate for sun5i/sun7i */
struct sunxi_64cnt cnt64; /* 0xa0 */
@@ -77,8 +77,7 @@ struct sunxi_timer_reg {
struct sunxi_tgp tgp[4];
u8 res5[8];
u32 cpu_cfg;
-#endif
-#ifdef CONFIG_SUNXI_GEN_SUN6I
+#elif defined(CONFIG_SUNXI_GEN_SUN6I)
u8 res3[16];
struct sunxi_wdog wdog[5]; /* We have 5 watchdogs */
#endif