aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 14:51:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 14:51:39 -0500
commitd01e4afdbb65e030fd6f1f96c30a558e2eb0f279 (patch)
tree02ef82b2740cf93a98199eded5ef765fa6e03052 /drivers/watchdog
parent8287361abca36504da813638310d2547469283eb (diff)
parent794b175fc0c0c4844dbb7b137a73bbfd01f6c608 (diff)
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC cleanups on various subarchitectures from Olof Johansson: "Cleanup patches for various ARM platforms and some of their associated drivers. There's also a branch in here that enables Freescale i.MX to be part of the multiplatform support -- the first "big" SoC that is moved over (more multiplatform work comes in a separate branch later during the merge window)." Conflicts fixed as per Olof, including a silent semantic one in arch/arm/mach-omap2/board-generic.c (omap_prcm_restart() was renamed to omap3xxx_restart(), and a new user of the old name was added). * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (189 commits) ARM: omap: fix typo on timer cleanup ARM: EXYNOS: Remove unused regs-mem.h file ARM: EXYNOS: Remove unused non-dt support for dwmci controller ARM: Kirkwood: Use hw_pci.ops instead of hw_pci.scan ARM: OMAP3: cm-t3517: use GPTIMER for system clock ARM: OMAP2+: timer: remove CONFIG_OMAP_32K_TIMER ARM: SAMSUNG: use devm_ functions for ADC driver ARM: EXYNOS: no duplicate mask/unmask in eint0_15 ARM: S3C24XX: SPI clock channel setup is fixed for S3C2443 ARM: EXYNOS: Remove i2c0 resource information and setting of device names ARM: Kirkwood: checkpatch cleanups ARM: Kirkwood: Fix sparse warnings. ARM: Kirkwood: Remove unused includes ARM: kirkwood: cleanup lsxl board includes ARM: integrator: use BUG_ON where possible ARM: integrator: push down SC dependencies ARM: integrator: delete static UART1 mapping ARM: integrator: delete SC mapping on the CP ARM: integrator: remove static CP syscon mapping ARM: integrator: remove static AP syscon mapping ...
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 d8da5162f0dd..43cc1a1e25d4 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);