blob: b0e541d022e68a23d6edb8d05bd306d21d291728 [file] [log] [blame]
Komal Shah7768a132006-09-29 01:59:18 -07001/*
Felipe Balbi28171422008-09-20 04:14:01 +03002 * omap_wdt.c
Komal Shah7768a132006-09-29 01:59:18 -07003 *
Felipe Balbi28171422008-09-20 04:14:01 +03004 * Watchdog driver for the TI OMAP 16xx & 24xx/34xx 32KHz (non-secure) watchdog
Komal Shah7768a132006-09-29 01:59:18 -07005 *
6 * Author: MontaVista Software, Inc.
7 * <gdavis@mvista.com> or <source@mvista.com>
8 *
9 * 2003 (c) MontaVista Software, Inc. This file is licensed under the
10 * terms of the GNU General Public License version 2. This program is
11 * licensed "as is" without any warranty of any kind, whether express
12 * or implied.
13 *
14 * History:
15 *
16 * 20030527: George G. Davis <gdavis@mvista.com>
17 * Initially based on linux-2.4.19-rmk7-pxa1/drivers/char/sa1100_wdt.c
18 * (c) Copyright 2000 Oleg Drokin <green@crimea.edu>
Alan Cox29fa0582008-10-27 15:17:56 +000019 * Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk>
Komal Shah7768a132006-09-29 01:59:18 -070020 *
21 * Copyright (c) 2004 Texas Instruments.
22 * 1. Modified to support OMAP1610 32-KHz watchdog timer
23 * 2. Ported to 2.6 kernel
24 *
25 * Copyright (c) 2005 David Brownell
26 * Use the driver model and standard identifiers; handle bigger timeouts.
27 */
28
Joe Perches27c766a2012-02-15 15:06:19 -080029#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
30
Komal Shah7768a132006-09-29 01:59:18 -070031#include <linux/module.h>
Komal Shah7768a132006-09-29 01:59:18 -070032#include <linux/types.h>
33#include <linux/kernel.h>
Komal Shah7768a132006-09-29 01:59:18 -070034#include <linux/mm.h>
Komal Shah7768a132006-09-29 01:59:18 -070035#include <linux/watchdog.h>
36#include <linux/reboot.h>
Komal Shah7768a132006-09-29 01:59:18 -070037#include <linux/init.h>
38#include <linux/err.h>
39#include <linux/platform_device.h>
40#include <linux/moduleparam.h>
Wim Van Sebroeck089ab072008-07-15 11:46:11 +000041#include <linux/io.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090042#include <linux/slab.h>
Varadarajan, Charulatha7ec5ad02010-09-23 20:02:43 +053043#include <linux/pm_runtime.h>
Paul Walmsley129f5572012-10-29 20:49:44 -060044#include <linux/platform_data/omap-wd-timer.h>
Komal Shah7768a132006-09-29 01:59:18 -070045
46#include "omap_wdt.h"
47
48static unsigned timer_margin;
49module_param(timer_margin, uint, 0);
50MODULE_PARM_DESC(timer_margin, "initial watchdog timeout (in seconds)");
51
Felipe Balbi28171422008-09-20 04:14:01 +030052struct omap_wdt_dev {
53 void __iomem *base; /* physical */
54 struct device *dev;
Aaro Koskinen67c0f552012-10-10 23:23:32 +030055 bool omap_wdt_users;
Felipe Balbi28171422008-09-20 04:14:01 +030056 struct resource *mem;
Aaro Koskinen67c0f552012-10-10 23:23:32 +030057 int wdt_trgr_pattern;
58 struct mutex lock; /* to avoid races with PM */
Felipe Balbi28171422008-09-20 04:14:01 +030059};
60
Aaro Koskinen67c0f552012-10-10 23:23:32 +030061static void omap_wdt_reload(struct omap_wdt_dev *wdev)
Komal Shah7768a132006-09-29 01:59:18 -070062{
Felipe Balbi28171422008-09-20 04:14:01 +030063 void __iomem *base = wdev->base;
Felipe Balbib3112182008-09-20 04:14:03 +030064
Komal Shah7768a132006-09-29 01:59:18 -070065 /* wait for posted write to complete */
Felipe Balbi9f69e3b2008-09-20 04:14:02 +030066 while ((__raw_readl(base + OMAP_WATCHDOG_WPS)) & 0x08)
Komal Shah7768a132006-09-29 01:59:18 -070067 cpu_relax();
Felipe Balbib3112182008-09-20 04:14:03 +030068
Aaro Koskinen67c0f552012-10-10 23:23:32 +030069 wdev->wdt_trgr_pattern = ~wdev->wdt_trgr_pattern;
70 __raw_writel(wdev->wdt_trgr_pattern, (base + OMAP_WATCHDOG_TGR));
Felipe Balbib3112182008-09-20 04:14:03 +030071
Komal Shah7768a132006-09-29 01:59:18 -070072 /* wait for posted write to complete */
Felipe Balbi9f69e3b2008-09-20 04:14:02 +030073 while ((__raw_readl(base + OMAP_WATCHDOG_WPS)) & 0x08)
Komal Shah7768a132006-09-29 01:59:18 -070074 cpu_relax();
75 /* reloaded WCRR from WLDR */
76}
77
Felipe Balbi28171422008-09-20 04:14:01 +030078static void omap_wdt_enable(struct omap_wdt_dev *wdev)
Komal Shah7768a132006-09-29 01:59:18 -070079{
Felipe Balbib3112182008-09-20 04:14:03 +030080 void __iomem *base = wdev->base;
81
Komal Shah7768a132006-09-29 01:59:18 -070082 /* Sequence to enable the watchdog */
Felipe Balbi9f69e3b2008-09-20 04:14:02 +030083 __raw_writel(0xBBBB, base + OMAP_WATCHDOG_SPR);
84 while ((__raw_readl(base + OMAP_WATCHDOG_WPS)) & 0x10)
Komal Shah7768a132006-09-29 01:59:18 -070085 cpu_relax();
Felipe Balbib3112182008-09-20 04:14:03 +030086
Felipe Balbi9f69e3b2008-09-20 04:14:02 +030087 __raw_writel(0x4444, base + OMAP_WATCHDOG_SPR);
88 while ((__raw_readl(base + OMAP_WATCHDOG_WPS)) & 0x10)
Komal Shah7768a132006-09-29 01:59:18 -070089 cpu_relax();
90}
91
Felipe Balbi28171422008-09-20 04:14:01 +030092static void omap_wdt_disable(struct omap_wdt_dev *wdev)
Komal Shah7768a132006-09-29 01:59:18 -070093{
Felipe Balbib3112182008-09-20 04:14:03 +030094 void __iomem *base = wdev->base;
95
Komal Shah7768a132006-09-29 01:59:18 -070096 /* sequence required to disable watchdog */
Felipe Balbi9f69e3b2008-09-20 04:14:02 +030097 __raw_writel(0xAAAA, base + OMAP_WATCHDOG_SPR); /* TIMER_MODE */
98 while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x10)
Komal Shah7768a132006-09-29 01:59:18 -070099 cpu_relax();
Felipe Balbib3112182008-09-20 04:14:03 +0300100
Felipe Balbi9f69e3b2008-09-20 04:14:02 +0300101 __raw_writel(0x5555, base + OMAP_WATCHDOG_SPR); /* TIMER_MODE */
102 while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x10)
Komal Shah7768a132006-09-29 01:59:18 -0700103 cpu_relax();
104}
105
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300106static void omap_wdt_set_timer(struct omap_wdt_dev *wdev,
107 unsigned int timeout)
Komal Shah7768a132006-09-29 01:59:18 -0700108{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300109 u32 pre_margin = GET_WLDR_VAL(timeout);
Felipe Balbib3112182008-09-20 04:14:03 +0300110 void __iomem *base = wdev->base;
Komal Shah7768a132006-09-29 01:59:18 -0700111
112 /* just count up at 32 KHz */
Felipe Balbi9f69e3b2008-09-20 04:14:02 +0300113 while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04)
Komal Shah7768a132006-09-29 01:59:18 -0700114 cpu_relax();
Felipe Balbib3112182008-09-20 04:14:03 +0300115
Felipe Balbi9f69e3b2008-09-20 04:14:02 +0300116 __raw_writel(pre_margin, base + OMAP_WATCHDOG_LDR);
117 while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04)
Komal Shah7768a132006-09-29 01:59:18 -0700118 cpu_relax();
119}
120
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300121static int omap_wdt_start(struct watchdog_device *wdog)
Komal Shah7768a132006-09-29 01:59:18 -0700122{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300123 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
Felipe Balbib3112182008-09-20 04:14:03 +0300124 void __iomem *base = wdev->base;
125
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300126 mutex_lock(&wdev->lock);
127
128 wdev->omap_wdt_users = true;
Komal Shah7768a132006-09-29 01:59:18 -0700129
Varadarajan, Charulatha7ec5ad02010-09-23 20:02:43 +0530130 pm_runtime_get_sync(wdev->dev);
Komal Shah7768a132006-09-29 01:59:18 -0700131
132 /* initialize prescaler */
Felipe Balbi9f69e3b2008-09-20 04:14:02 +0300133 while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x01)
Komal Shah7768a132006-09-29 01:59:18 -0700134 cpu_relax();
Felipe Balbib3112182008-09-20 04:14:03 +0300135
Felipe Balbi9f69e3b2008-09-20 04:14:02 +0300136 __raw_writel((1 << 5) | (PTV << 2), base + OMAP_WATCHDOG_CNTRL);
137 while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x01)
Komal Shah7768a132006-09-29 01:59:18 -0700138 cpu_relax();
139
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300140 omap_wdt_set_timer(wdev, wdog->timeout);
141 omap_wdt_reload(wdev); /* trigger loading of new timeout value */
Felipe Balbi28171422008-09-20 04:14:01 +0300142 omap_wdt_enable(wdev);
Felipe Balbib3112182008-09-20 04:14:03 +0300143
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300144 mutex_unlock(&wdev->lock);
Felipe Balbib3112182008-09-20 04:14:03 +0300145
Komal Shah7768a132006-09-29 01:59:18 -0700146 return 0;
147}
148
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300149static int omap_wdt_stop(struct watchdog_device *wdog)
Komal Shah7768a132006-09-29 01:59:18 -0700150{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300151 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
Felipe Balbib3112182008-09-20 04:14:03 +0300152
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300153 mutex_lock(&wdev->lock);
154 omap_wdt_disable(wdev);
155 pm_runtime_put_sync(wdev->dev);
156 wdev->omap_wdt_users = false;
157 mutex_unlock(&wdev->lock);
158 return 0;
Komal Shah7768a132006-09-29 01:59:18 -0700159}
160
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300161static int omap_wdt_ping(struct watchdog_device *wdog)
Komal Shah7768a132006-09-29 01:59:18 -0700162{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300163 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
Felipe Balbib3112182008-09-20 04:14:03 +0300164
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300165 mutex_lock(&wdev->lock);
166 omap_wdt_reload(wdev);
167 mutex_unlock(&wdev->lock);
Komal Shah7768a132006-09-29 01:59:18 -0700168
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300169 return 0;
Komal Shah7768a132006-09-29 01:59:18 -0700170}
171
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300172static int omap_wdt_set_timeout(struct watchdog_device *wdog,
173 unsigned int timeout)
174{
175 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
176
177 mutex_lock(&wdev->lock);
178 omap_wdt_disable(wdev);
179 omap_wdt_set_timer(wdev, timeout);
180 omap_wdt_enable(wdev);
181 omap_wdt_reload(wdev);
182 wdog->timeout = timeout;
183 mutex_unlock(&wdev->lock);
184
185 return 0;
186}
187
188static const struct watchdog_info omap_wdt_info = {
189 .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
190 .identity = "OMAP Watchdog",
191};
192
193static const struct watchdog_ops omap_wdt_ops = {
194 .owner = THIS_MODULE,
195 .start = omap_wdt_start,
196 .stop = omap_wdt_stop,
197 .ping = omap_wdt_ping,
198 .set_timeout = omap_wdt_set_timeout,
Komal Shah7768a132006-09-29 01:59:18 -0700199};
200
Bill Pemberton2d991a12012-11-19 13:21:41 -0500201static int omap_wdt_probe(struct platform_device *pdev)
Komal Shah7768a132006-09-29 01:59:18 -0700202{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300203 struct omap_wd_timer_platform_data *pdata = pdev->dev.platform_data;
204 bool nowayout = WATCHDOG_NOWAYOUT;
205 struct watchdog_device *omap_wdt;
Komal Shah7768a132006-09-29 01:59:18 -0700206 struct resource *res, *mem;
Felipe Balbi28171422008-09-20 04:14:01 +0300207 struct omap_wdt_dev *wdev;
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300208 u32 rs;
Felipe Balbib3112182008-09-20 04:14:03 +0300209 int ret;
Komal Shah7768a132006-09-29 01:59:18 -0700210
Aaro Koskinen4f4753d2012-10-10 23:23:33 +0300211 omap_wdt = devm_kzalloc(&pdev->dev, sizeof(*omap_wdt), GFP_KERNEL);
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300212 if (!omap_wdt)
213 return -ENOMEM;
214
Komal Shah7768a132006-09-29 01:59:18 -0700215 /* reserve static register mappings */
216 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Aaro Koskinen4f4753d2012-10-10 23:23:33 +0300217 if (!res)
218 return -ENOENT;
Komal Shah7768a132006-09-29 01:59:18 -0700219
Aaro Koskinen4f4753d2012-10-10 23:23:33 +0300220 mem = devm_request_mem_region(&pdev->dev, res->start,
221 resource_size(res), pdev->name);
222 if (!mem)
223 return -EBUSY;
Komal Shah7768a132006-09-29 01:59:18 -0700224
Aaro Koskinen4f4753d2012-10-10 23:23:33 +0300225 wdev = devm_kzalloc(&pdev->dev, sizeof(*wdev), GFP_KERNEL);
226 if (!wdev)
227 return -ENOMEM;
Felipe Balbib3112182008-09-20 04:14:03 +0300228
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300229 wdev->omap_wdt_users = false;
230 wdev->mem = mem;
231 wdev->dev = &pdev->dev;
232 wdev->wdt_trgr_pattern = 0x1234;
233 mutex_init(&wdev->lock);
Komal Shah7768a132006-09-29 01:59:18 -0700234
Aaro Koskinen4f4753d2012-10-10 23:23:33 +0300235 wdev->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
236 if (!wdev->base)
237 return -ENOMEM;
Felipe Balbi9f69e3b2008-09-20 04:14:02 +0300238
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300239 omap_wdt->info = &omap_wdt_info;
240 omap_wdt->ops = &omap_wdt_ops;
241 omap_wdt->min_timeout = TIMER_MARGIN_MIN;
242 omap_wdt->max_timeout = TIMER_MARGIN_MAX;
243
244 if (timer_margin >= TIMER_MARGIN_MIN &&
245 timer_margin <= TIMER_MARGIN_MAX)
246 omap_wdt->timeout = timer_margin;
247 else
248 omap_wdt->timeout = TIMER_MARGIN_DEFAULT;
249
250 watchdog_set_drvdata(omap_wdt, wdev);
251 watchdog_set_nowayout(omap_wdt, nowayout);
252
253 platform_set_drvdata(pdev, omap_wdt);
Felipe Balbi28171422008-09-20 04:14:01 +0300254
Varadarajan, Charulatha7ec5ad02010-09-23 20:02:43 +0530255 pm_runtime_enable(wdev->dev);
256 pm_runtime_get_sync(wdev->dev);
Ulrik Bech Hald789cd472009-06-12 16:18:32 -0500257
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300258 if (pdata && pdata->read_reset_sources)
259 rs = pdata->read_reset_sources();
260 else
261 rs = 0;
262 omap_wdt->bootstatus = (rs & (1 << OMAP_MPU_WD_RST_SRC_ID_SHIFT)) ?
263 WDIOF_CARDRESET : 0;
264
Felipe Balbi28171422008-09-20 04:14:01 +0300265 omap_wdt_disable(wdev);
Komal Shah7768a132006-09-29 01:59:18 -0700266
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300267 ret = watchdog_register_device(omap_wdt);
Aaro Koskinen1ba85382012-10-10 23:23:37 +0300268 if (ret) {
269 pm_runtime_disable(wdev->dev);
270 return ret;
271 }
Komal Shah7768a132006-09-29 01:59:18 -0700272
Felipe Balbi28171422008-09-20 04:14:01 +0300273 pr_info("OMAP Watchdog Timer Rev 0x%02x: initial timeout %d sec\n",
Felipe Balbi9f69e3b2008-09-20 04:14:02 +0300274 __raw_readl(wdev->base + OMAP_WATCHDOG_REV) & 0xFF,
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300275 omap_wdt->timeout);
Komal Shah7768a132006-09-29 01:59:18 -0700276
Varadarajan, Charulatha7ec5ad02010-09-23 20:02:43 +0530277 pm_runtime_put_sync(wdev->dev);
Ulrik Bech Hald789cd472009-06-12 16:18:32 -0500278
Komal Shah7768a132006-09-29 01:59:18 -0700279 return 0;
Komal Shah7768a132006-09-29 01:59:18 -0700280}
281
282static void omap_wdt_shutdown(struct platform_device *pdev)
283{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300284 struct watchdog_device *wdog = platform_get_drvdata(pdev);
285 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
Felipe Balbi28171422008-09-20 04:14:01 +0300286
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300287 mutex_lock(&wdev->lock);
Paul Walmsley0503add2011-03-10 22:40:05 -0700288 if (wdev->omap_wdt_users) {
Felipe Balbi28171422008-09-20 04:14:01 +0300289 omap_wdt_disable(wdev);
Paul Walmsley0503add2011-03-10 22:40:05 -0700290 pm_runtime_put_sync(wdev->dev);
291 }
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300292 mutex_unlock(&wdev->lock);
Komal Shah7768a132006-09-29 01:59:18 -0700293}
294
Bill Pemberton4b12b892012-11-19 13:26:24 -0500295static int omap_wdt_remove(struct platform_device *pdev)
Komal Shah7768a132006-09-29 01:59:18 -0700296{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300297 struct watchdog_device *wdog = platform_get_drvdata(pdev);
298 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
Felipe Balbi28171422008-09-20 04:14:01 +0300299
Shubhrajyoti D12c583d2012-01-11 19:50:18 +0530300 pm_runtime_disable(wdev->dev);
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300301 watchdog_unregister_device(wdog);
Felipe Balbib3112182008-09-20 04:14:03 +0300302
Komal Shah7768a132006-09-29 01:59:18 -0700303 return 0;
304}
305
306#ifdef CONFIG_PM
307
308/* REVISIT ... not clear this is the best way to handle system suspend; and
309 * it's very inappropriate for selective device suspend (e.g. suspending this
310 * through sysfs rather than by stopping the watchdog daemon). Also, this
311 * may not play well enough with NOWAYOUT...
312 */
313
314static int omap_wdt_suspend(struct platform_device *pdev, pm_message_t state)
315{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300316 struct watchdog_device *wdog = platform_get_drvdata(pdev);
317 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
Felipe Balbib3112182008-09-20 04:14:03 +0300318
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300319 mutex_lock(&wdev->lock);
Paul Walmsley0503add2011-03-10 22:40:05 -0700320 if (wdev->omap_wdt_users) {
Felipe Balbi28171422008-09-20 04:14:01 +0300321 omap_wdt_disable(wdev);
Paul Walmsley0503add2011-03-10 22:40:05 -0700322 pm_runtime_put_sync(wdev->dev);
323 }
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300324 mutex_unlock(&wdev->lock);
Felipe Balbib3112182008-09-20 04:14:03 +0300325
Komal Shah7768a132006-09-29 01:59:18 -0700326 return 0;
327}
328
329static int omap_wdt_resume(struct platform_device *pdev)
330{
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300331 struct watchdog_device *wdog = platform_get_drvdata(pdev);
332 struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog);
Felipe Balbib3112182008-09-20 04:14:03 +0300333
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300334 mutex_lock(&wdev->lock);
Felipe Balbi28171422008-09-20 04:14:01 +0300335 if (wdev->omap_wdt_users) {
Paul Walmsley0503add2011-03-10 22:40:05 -0700336 pm_runtime_get_sync(wdev->dev);
Felipe Balbi28171422008-09-20 04:14:01 +0300337 omap_wdt_enable(wdev);
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300338 omap_wdt_reload(wdev);
Komal Shah7768a132006-09-29 01:59:18 -0700339 }
Aaro Koskinen67c0f552012-10-10 23:23:32 +0300340 mutex_unlock(&wdev->lock);
Felipe Balbib3112182008-09-20 04:14:03 +0300341
Komal Shah7768a132006-09-29 01:59:18 -0700342 return 0;
343}
344
345#else
346#define omap_wdt_suspend NULL
347#define omap_wdt_resume NULL
348#endif
349
Xiao Jiange6ca04e2012-06-01 12:44:16 +0800350static const struct of_device_id omap_wdt_of_match[] = {
351 { .compatible = "ti,omap3-wdt", },
352 {},
353};
354MODULE_DEVICE_TABLE(of, omap_wdt_of_match);
355
Komal Shah7768a132006-09-29 01:59:18 -0700356static struct platform_driver omap_wdt_driver = {
357 .probe = omap_wdt_probe,
Bill Pemberton82268712012-11-19 13:21:12 -0500358 .remove = omap_wdt_remove,
Komal Shah7768a132006-09-29 01:59:18 -0700359 .shutdown = omap_wdt_shutdown,
360 .suspend = omap_wdt_suspend,
361 .resume = omap_wdt_resume,
362 .driver = {
363 .owner = THIS_MODULE,
364 .name = "omap_wdt",
Xiao Jiange6ca04e2012-06-01 12:44:16 +0800365 .of_match_table = omap_wdt_of_match,
Komal Shah7768a132006-09-29 01:59:18 -0700366 },
367};
368
Axel Linb8ec6112011-11-29 13:56:27 +0800369module_platform_driver(omap_wdt_driver);
Komal Shah7768a132006-09-29 01:59:18 -0700370
371MODULE_AUTHOR("George G. Davis");
372MODULE_LICENSE("GPL");
Kay Sieversf37d1932008-04-10 21:29:23 -0700373MODULE_ALIAS("platform:omap_wdt");