aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-11-15 11:08:51 -0500
committerArnd Bergmann <arnd@arndb.de>2012-11-15 11:08:51 -0500
commitcb64babf9ebe06984d87c08d241d05e2f6a7eb5b (patch)
tree61cd54de0b0dc5c42a99ee733e9984700b0732b7 /drivers/watchdog
parent809a3226ad7cf0807f79ddc31ed2094dbb9911fd (diff)
parentcc4b1e24b93dd529b1d49258bee044d319b5b129 (diff)
Merge tag 'omap-for-v3.8/cleanup-prcm-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
From Tony Lindgren <tony@atomide.com>: More PRCM cleanups via Paul Walmsley <paul@pwsan.com>: Second set of OMAP PRCM cleanups for 3.8. These patches remove the use of omap_prcm_get_reset_sources() from the OMAP watchdog driver, and remove mach-omap2/prcm.c and plat-omap/include/plat/prcm.h. Basic test logs for this branch on top of Tony's cleanup-prcm branch at commit 7fc54fd3084457c7f11b9e2e1e3fcd19a3badc33 are here: http://www.pwsan.com/omap/testlogs/prcm_cleanup_b_3.8/20121108151646/ However, cleanup-prcm at 7fc54fd3 does not include some fixes that are needed for a successful test. With several reverts, fixes, and workarounds applied, the following test logs were obtained: http://www.pwsan.com/omap/testlogs/TEST_prcm_cleanup_b_3.8/20121108151930/ which indicate that the series tests cleanly. This second pull request updates one of the patches which broke with rmk's allnoconfigs, and also updates the tag description to indicate that 7fc54fd3 is building cleanly here. * tag 'omap-for-v3.8/cleanup-prcm-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (27 commits) ARM: OMAP2: Fix compillation error in cm_common ARM: OMAP2+: PRCM: remove obsolete prcm.[ch] ARM: OMAP2+: hwmod: call to _omap4_disable_module() should use the SoC-specific call ARM: OMAP2+: PRCM: consolidate PRCM-related timeout macros ARM: OMAP2+: PRCM: split and relocate the PRM/CM globals setup ARM: OMAP2+: PRCM: remove omap2_cm_wait_idlest() ARM: OMAP2+: CM/clock: convert _omap2_module_wait_ready() to use SoC-independent CM functions ARM: OMAP2xxx: APLL/CM: convert to use omap2_cm_wait_module_ready() ARM: OMAP2+: board files: use SoC-specific system restart functions ARM: OMAP2+: PRCM: create SoC-specific chip restart functions ARM: OMAP2xxx: clock: move virt_prcm_set code into clkt2xxx_virt_prcm_set.c ARM: OMAP2xxx: clock: remove global 'dclk' variable ARM: OMAP2/3: PRM: add SoC reset functions (using the CORE DPLL method) ARM: OMAP2+: common: remove mach-omap2/common.c globals and map_common_io code ARM: OMAP2+: PRCM: remove omap_prcm_get_reset_sources() watchdog: OMAP: use standard GETBOOTSTATUS interface; use platform_data fn ptr ARM: OMAP2+: WDT: move init; add read_reset_sources pdata function pointer ARM: OMAP1: CGRM: fix omap1_get_reset_sources() return type ARM: OMAP2+: PRM: create PRM reset source API for the watchdog timer driver ARM: OMAP1: create read_reset_sources() function (for initial use by watchdog) ... Conflicts: arch/arm/mach-omap2/cm33xx.c arch/arm/mach-omap2/io.c arch/arm/mach-omap2/prm_common.c Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/omap_wdt.c26
1 files changed, 12 insertions, 14 deletions
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);