Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339794
b: refs/heads/master
c: 129f557
h: refs/heads/master
v: v3
  • Loading branch information
Paul Walmsley committed Nov 8, 2012
1 parent 9b53f25 commit 6b3aa41
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37c67d03989eca60b28d67398d9388f653454c5d
refs/heads/master: 129f557723701b20257f5ad4deb89aac0afb95ac
26 changes: 12 additions & 14 deletions trunk/drivers/watchdog/omap_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <mach/hardware.h>
#include <plat/cpu.h>
#include <plat/prcm.h>

#include <linux/platform_data/omap-wd-timer.h>

#include "omap_wdt.h"

Expand Down Expand Up @@ -202,15 +202,18 @@ static ssize_t omap_wdt_write(struct file *file, const char __user *data,
static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct omap_wd_timer_platform_data *pdata;
struct omap_wdt_dev *wdev;
int new_margin;
u32 rs;
int new_margin, bs;
static const struct watchdog_info ident = {
.identity = "OMAP Watchdog",
.options = WDIOF_SETTIMEOUT,
.firmware_version = 0,
};

wdev = file->private_data;
pdata = wdev->dev->platform_data;

switch (cmd) {
case WDIOC_GETSUPPORT:
Expand All @@ -219,17 +222,12 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd,
case WDIOC_GETSTATUS:
return put_user(0, (int __user *)arg);
case WDIOC_GETBOOTSTATUS:
#ifdef CONFIG_ARCH_OMAP1
if (cpu_is_omap16xx())
return put_user(__raw_readw(ARM_SYSST),
(int __user *)arg);
#endif
#ifdef CONFIG_ARCH_OMAP2PLUS
if (cpu_is_omap24xx())
return put_user(omap_prcm_get_reset_sources(),
(int __user *)arg);
#endif
return put_user(0, (int __user *)arg);
if (!pdata || !pdata->read_reset_sources)
return put_user(0, (int __user *)arg);
rs = pdata->read_reset_sources();
bs = (rs & (1 << OMAP_MPU_WD_RST_SRC_ID_SHIFT)) ?
WDIOF_CARDRESET : 0;
return put_user(bs, (int __user *)arg);
case WDIOC_KEEPALIVE:
spin_lock(&wdt_lock);
omap_wdt_ping(wdev);
Expand Down

0 comments on commit 6b3aa41

Please sign in to comment.