aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/imx2_wdt.c1
-rw-r--r--drivers/watchdog/omap_wdt.c26
2 files changed, 12 insertions, 15 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index bcfab2b00ad2..9a45d0294cf4 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -33,7 +33,6 @@
33#include <linux/uaccess.h> 33#include <linux/uaccess.h>
34#include <linux/timer.h> 34#include <linux/timer.h>
35#include <linux/jiffies.h> 35#include <linux/jiffies.h>
36#include <mach/hardware.h>
37 36
38#define DRIVER_NAME "imx2-wdt" 37#define DRIVER_NAME "imx2-wdt"
39 38
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index f5db18dbc0f9..477a1d47a64c 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -46,8 +46,8 @@
46#include <linux/slab.h> 46#include <linux/slab.h>
47#include <linux/pm_runtime.h> 47#include <linux/pm_runtime.h>
48#include <mach/hardware.h> 48#include <mach/hardware.h>
49#include <plat/cpu.h> 49
50#include <plat/prcm.h> 50#include <linux/platform_data/omap-wd-timer.h>
51 51
52#include "omap_wdt.h" 52#include "omap_wdt.h"
53 53
@@ -202,8 +202,10 @@ static ssize_t omap_wdt_write(struct file *file, const char __user *data,
202static long omap_wdt_ioctl(struct file *file, unsigned int cmd, 202static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
203 unsigned long arg) 203 unsigned long arg)
204{ 204{
205 struct omap_wd_timer_platform_data *pdata;
205 struct omap_wdt_dev *wdev; 206 struct omap_wdt_dev *wdev;
206 int new_margin; 207 u32 rs;
208 int new_margin, bs;
207 static const struct watchdog_info ident = { 209 static const struct watchdog_info ident = {
208 .identity = "OMAP Watchdog", 210 .identity = "OMAP Watchdog",
209 .options = WDIOF_SETTIMEOUT, 211 .options = WDIOF_SETTIMEOUT,
@@ -211,6 +213,7 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
211 }; 213 };
212 214
213 wdev = file->private_data; 215 wdev = file->private_data;
216 pdata = wdev->dev->platform_data;
214 217
215 switch (cmd) { 218 switch (cmd) {
216 case WDIOC_GETSUPPORT: 219 case WDIOC_GETSUPPORT:
@@ -219,17 +222,12 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
219 case WDIOC_GETSTATUS: 222 case WDIOC_GETSTATUS:
220 return put_user(0, (int __user *)arg); 223 return put_user(0, (int __user *)arg);
221 case WDIOC_GETBOOTSTATUS: 224 case WDIOC_GETBOOTSTATUS:
222#ifdef CONFIG_ARCH_OMAP1 225 if (!pdata || !pdata->read_reset_sources)
223 if (cpu_is_omap16xx()) 226 return put_user(0, (int __user *)arg);
224 return put_user(__raw_readw(ARM_SYSST), 227 rs = pdata->read_reset_sources();
225 (int __user *)arg); 228 bs = (rs & (1 << OMAP_MPU_WD_RST_SRC_ID_SHIFT)) ?
226#endif 229 WDIOF_CARDRESET : 0;
227#ifdef CONFIG_ARCH_OMAP2PLUS 230 return put_user(bs, (int __user *)arg);
228 if (cpu_is_omap24xx())
229 return put_user(omap_prcm_get_reset_sources(),
230 (int __user *)arg);
231#endif
232 return put_user(0, (int __user *)arg);
233 case WDIOC_KEEPALIVE: 231 case WDIOC_KEEPALIVE:
234 spin_lock(&wdt_lock); 232 spin_lock(&wdt_lock);
235 omap_wdt_ping(wdev); 233 omap_wdt_ping(wdev);