]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/arm/include/asm/arch-sunxi/timer.h
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / arch / arm / include / asm / arch-sunxi / timer.h
index 6aacfd7b39696db1f498570974f9aec017f4eace..9a5e488a38080f489494fd1f45a987c68142d1b6 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/types.h>
+#include <asm/arch/watchdog.h>
 
 /* General purpose timer */
 struct sunxi_timer {
@@ -38,12 +39,6 @@ struct sunxi_64cnt {
        u32 hi;                 /* 0xa8 */
 };
 
-/* Watchdog */
-struct sunxi_wdog {
-       u32 ctl;                /* 0x90 */
-       u32 mode;               /* 0x94 */
-};
-
 /* Rtc */
 struct sunxi_rtc {
        u32 ctl;                /* 0x100 */
@@ -72,15 +67,20 @@ struct sunxi_timer_reg {
        struct sunxi_timer timer[6];    /* We have 6 timers */
        u8 res2[16];
        struct sunxi_avs avs;
-       struct sunxi_wdog wdog;
-       u8 res3[8];
-       struct sunxi_64cnt cnt64;
+#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
+       struct sunxi_wdog wdog; /* 0x90 */
+       /* XXX the following is not accurate for sun5i/sun7i */
+       struct sunxi_64cnt cnt64;       /* 0xa0 */
        u8 res4[0x58];
        struct sunxi_rtc rtc;
        struct sunxi_alarm alarm;
        struct sunxi_tgp tgp[4];
        u8 res5[8];
        u32 cpu_cfg;
+#else /* CONFIG_MACH_SUN6I || CONFIG_MACH_SUN8I || ... */
+       u8 res3[16];
+       struct sunxi_wdog wdog[5];      /* We have 5 watchdogs */
+#endif
 };
 
 #endif /* __ASSEMBLY__ */