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/devices-fsm9xxx.c b/arch/arm/mach-msm/devices-fsm9xxx.c
index 5f4d940..639eeae 100644
--- a/arch/arm/mach-msm/devices-fsm9xxx.c
+++ b/arch/arm/mach-msm/devices-fsm9xxx.c
@@ -419,6 +419,15 @@
.bark_time = 11000,
.has_secure = false,
.has_vic = true,
+ .base = MSM_TMR_BASE + WDT1_OFFSET,
+};
+
+static struct resource msm_watchdog_resources[] = {
+ {
+ .start = INT_WDT1_ACCSCSSBARK,
+ .end = INT_WDT1_ACCSCSSBARK,
+ .flags = IORESOURCE_IRQ,
+ },
};
struct platform_device fsm9xxx_device_watchdog = {
@@ -427,5 +436,7 @@
.dev = {
.platform_data = &fsm_watchdog_pdata,
},
+ .num_resources = ARRAY_SIZE(msm_watchdog_resources),
+ .resource = msm_watchdog_resources,
};