msm: watchdog: Get the base and irq from platform data
The FSM targets need to use the Watchdog1 timer instead of the
Watchdog0 timer. Add support to get the base and the interrupt
information from the platform data so that the watchdog driver
can support both WDT0 and WDT1.
Change-Id: Ibce013c0287e34dbd702d75dab2c3f321132e9ed
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
diff --git a/arch/arm/mach-msm/msm_watchdog.h b/arch/arm/mach-msm/msm_watchdog.h
index 00ff0b6..5fb82ee 100644
--- a/arch/arm/mach-msm/msm_watchdog.h
+++ b/arch/arm/mach-msm/msm_watchdog.h
@@ -13,6 +13,10 @@
#ifndef __ARCH_ARM_MACH_MSM_MSM_WATCHDOG_H
#define __ARCH_ARM_MACH_MSM_MSM_WATCHDOG_H
+/* The base is just address of the WDT_RST register */
+#define WDT0_OFFSET 0x38
+#define WDT1_OFFSET 0x60
+
struct msm_watchdog_pdata {
/* pet interval period in ms */
unsigned int pet_time;
@@ -23,6 +27,7 @@
bool has_vic;
/* You have to be running in secure mode to use FIQ */
bool use_kernel_fiq;
+ void __iomem *base;
};
struct msm_watchdog_dump {