msm: watchdog: make watchdog a platform device
There are now several conditionals that control how the watchdog
behaves. We have described these in terms cpu_is and machine_is macros.
Instead, convert tunables to platform data so we can keep the driver
clean.
Additionally, since it is a platform device, we can now move the
suspending code to the suspend_noirq function, which leaves the watchdog
on for more of the suspend process.
Change-Id: If47b3abbeeaa40f4e6f0f5d301d0a28efa8d3535
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-apq8064.c b/arch/arm/mach-msm/board-apq8064.c
index 4aa6abe..88ce818 100644
--- a/arch/arm/mach-msm/board-apq8064.c
+++ b/arch/arm/mach-msm/board-apq8064.c
@@ -38,6 +38,7 @@
#include <linux/bootmem.h>
#include <asm/setup.h>
+#include "msm_watchdog.h"
#include "board-apq8064.h"
#define MSM_PMEM_KERNEL_EBI1_SIZE 0x600000
@@ -493,6 +494,7 @@
&android_pmem_device,
&android_pmem_adsp_device,
&android_pmem_audio_device,
+ &msm8064_device_watchdog,
};
static struct platform_device *sim_devices[] __initdata = {
@@ -733,6 +735,10 @@
static void __init apq8064_sim_init(void)
{
+ struct msm_watchdog_pdata *wdog_pdata = (struct msm_watchdog_pdata *)
+ &msm8064_device_watchdog.dev.platform_data;
+
+ wdog_pdata->bark_time = 15000;
apq8064_common_init();
platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices));
}