arm64: rockchip: add watchdog support
authorXiao Feng <xf@rock-chips.com>
Mon, 12 Jan 2015 06:01:48 +0000 (14:01 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 12 Jan 2015 10:15:26 +0000 (18:15 +0800)
Signed-off-by: Xiao Feng <xf@rock-chips.com>
drivers/watchdog/rk29_wdt.c

index 5ed94e5c020df72c4f844f9eb62e76950c67876c..4065372a3e9486568d7ac97eb1152491fdaea376 100644 (file)
@@ -32,7 +32,9 @@
 #include <linux/clk.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
+#ifndef CONFIG_ARM64
 #include <asm/mach/map.h>
+#endif
 #ifdef CONFIG_OF
 #include <linux/of.h>
 #endif
@@ -124,7 +126,17 @@ static char                 expect_close;
                printk(KERN_INFO msg); \
        } while (0)
 
-#define wdt_writel(v, offset) do { writel_relaxed(v, wdt_base + offset); dsb(); } while (0)
+#ifdef CONFIG_ARM64
+#define wdt_writel(v, offset) do { \
+       writel_relaxed(v, wdt_base + offset);\
+       dsb(sy);\
+       } while (0)
+#else
+#define wdt_writel(v, offset) do { \
+       writel_relaxed(v, wdt_base + offset);\
+       dsb();\
+       } while (0)
+#endif
 
 /* functions */
 void rk29_wdt_keepalive(void)