Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 1 | /* |
| 2 | * drivers/watchdog/ar7_wdt.c |
| 3 | * |
| 4 | * Copyright (C) 2007 Nicolas Thill <nico@openwrt.org> |
| 5 | * Copyright (c) 2005 Enrik Berkhan <Enrik.Berkhan@akk.org> |
| 6 | * |
| 7 | * Some code taken from: |
| 8 | * National Semiconductor SCx200 Watchdog support |
| 9 | * Copyright (c) 2001,2002 Christer Weinigel <wingel@nano-system.com> |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by |
| 13 | * the Free Software Foundation; either version 2 of the License, or |
| 14 | * (at your option) any later version. |
| 15 | * |
| 16 | * This program is distributed in the hope that it will be useful, |
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | * GNU General Public License for more details. |
| 20 | * |
| 21 | * You should have received a copy of the GNU General Public License |
| 22 | * along with this program; if not, write to the Free Software |
| 23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 24 | */ |
| 25 | |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 27 | |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 28 | #include <linux/module.h> |
| 29 | #include <linux/moduleparam.h> |
| 30 | #include <linux/errno.h> |
| 31 | #include <linux/init.h> |
| 32 | #include <linux/miscdevice.h> |
Florian Fainelli | 64d4062 | 2009-07-21 12:11:32 +0200 | [diff] [blame] | 33 | #include <linux/platform_device.h> |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 34 | #include <linux/watchdog.h> |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 35 | #include <linux/fs.h> |
| 36 | #include <linux/ioport.h> |
| 37 | #include <linux/io.h> |
| 38 | #include <linux/uaccess.h> |
Florian Fainelli | 780019d | 2010-01-27 09:10:06 +0100 | [diff] [blame] | 39 | #include <linux/clk.h> |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 40 | |
| 41 | #include <asm/addrspace.h> |
Florian Fainelli | c5e7f5a | 2009-06-03 13:05:48 +0200 | [diff] [blame] | 42 | #include <asm/mach-ar7/ar7.h> |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 43 | |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 44 | #define LONGNAME "TI AR7 Watchdog Timer" |
| 45 | |
| 46 | MODULE_AUTHOR("Nicolas Thill <nico@openwrt.org>"); |
| 47 | MODULE_DESCRIPTION(LONGNAME); |
| 48 | MODULE_LICENSE("GPL"); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 49 | |
| 50 | static int margin = 60; |
| 51 | module_param(margin, int, 0); |
| 52 | MODULE_PARM_DESC(margin, "Watchdog margin in seconds"); |
| 53 | |
Wim Van Sebroeck | 86a1e18 | 2012-03-05 16:51:11 +0100 | [diff] [blame] | 54 | static bool nowayout = WATCHDOG_NOWAYOUT; |
| 55 | module_param(nowayout, bool, 0); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 56 | MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close"); |
| 57 | |
| 58 | #define READ_REG(x) readl((void __iomem *)&(x)) |
| 59 | #define WRITE_REG(x, v) writel((v), (void __iomem *)&(x)) |
| 60 | |
| 61 | struct ar7_wdt { |
| 62 | u32 kick_lock; |
| 63 | u32 kick; |
| 64 | u32 change_lock; |
| 65 | u32 change; |
| 66 | u32 disable_lock; |
| 67 | u32 disable; |
| 68 | u32 prescale_lock; |
| 69 | u32 prescale; |
| 70 | }; |
| 71 | |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 72 | static unsigned long wdt_is_open; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 73 | static unsigned expect_close; |
Axel Lin | 1334f32 | 2011-11-29 13:54:01 +0800 | [diff] [blame] | 74 | static DEFINE_SPINLOCK(wdt_lock); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 75 | |
| 76 | /* XXX currently fixed, allows max margin ~68.72 secs */ |
| 77 | #define prescale_value 0xffff |
| 78 | |
Florian Fainelli | 64d4062 | 2009-07-21 12:11:32 +0200 | [diff] [blame] | 79 | /* Resource of the WDT registers */ |
| 80 | static struct resource *ar7_regs_wdt; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 81 | /* Pointer to the remapped WDT IO space */ |
| 82 | static struct ar7_wdt *ar7_wdt; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 83 | |
Florian Fainelli | 780019d | 2010-01-27 09:10:06 +0100 | [diff] [blame] | 84 | static struct clk *vbus_clk; |
| 85 | |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 86 | static void ar7_wdt_kick(u32 value) |
| 87 | { |
| 88 | WRITE_REG(ar7_wdt->kick_lock, 0x5555); |
| 89 | if ((READ_REG(ar7_wdt->kick_lock) & 3) == 1) { |
| 90 | WRITE_REG(ar7_wdt->kick_lock, 0xaaaa); |
| 91 | if ((READ_REG(ar7_wdt->kick_lock) & 3) == 3) { |
| 92 | WRITE_REG(ar7_wdt->kick, value); |
| 93 | return; |
| 94 | } |
| 95 | } |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 96 | pr_err("failed to unlock WDT kick reg\n"); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | static void ar7_wdt_prescale(u32 value) |
| 100 | { |
| 101 | WRITE_REG(ar7_wdt->prescale_lock, 0x5a5a); |
| 102 | if ((READ_REG(ar7_wdt->prescale_lock) & 3) == 1) { |
| 103 | WRITE_REG(ar7_wdt->prescale_lock, 0xa5a5); |
| 104 | if ((READ_REG(ar7_wdt->prescale_lock) & 3) == 3) { |
| 105 | WRITE_REG(ar7_wdt->prescale, value); |
| 106 | return; |
| 107 | } |
| 108 | } |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 109 | pr_err("failed to unlock WDT prescale reg\n"); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | static void ar7_wdt_change(u32 value) |
| 113 | { |
| 114 | WRITE_REG(ar7_wdt->change_lock, 0x6666); |
| 115 | if ((READ_REG(ar7_wdt->change_lock) & 3) == 1) { |
| 116 | WRITE_REG(ar7_wdt->change_lock, 0xbbbb); |
| 117 | if ((READ_REG(ar7_wdt->change_lock) & 3) == 3) { |
| 118 | WRITE_REG(ar7_wdt->change, value); |
| 119 | return; |
| 120 | } |
| 121 | } |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 122 | pr_err("failed to unlock WDT change reg\n"); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 123 | } |
| 124 | |
| 125 | static void ar7_wdt_disable(u32 value) |
| 126 | { |
| 127 | WRITE_REG(ar7_wdt->disable_lock, 0x7777); |
| 128 | if ((READ_REG(ar7_wdt->disable_lock) & 3) == 1) { |
| 129 | WRITE_REG(ar7_wdt->disable_lock, 0xcccc); |
| 130 | if ((READ_REG(ar7_wdt->disable_lock) & 3) == 2) { |
| 131 | WRITE_REG(ar7_wdt->disable_lock, 0xdddd); |
| 132 | if ((READ_REG(ar7_wdt->disable_lock) & 3) == 3) { |
| 133 | WRITE_REG(ar7_wdt->disable, value); |
| 134 | return; |
| 135 | } |
| 136 | } |
| 137 | } |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 138 | pr_err("failed to unlock WDT disable reg\n"); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | static void ar7_wdt_update_margin(int new_margin) |
| 142 | { |
| 143 | u32 change; |
Florian Fainelli | 780019d | 2010-01-27 09:10:06 +0100 | [diff] [blame] | 144 | u32 vbus_rate; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 145 | |
Florian Fainelli | 780019d | 2010-01-27 09:10:06 +0100 | [diff] [blame] | 146 | vbus_rate = clk_get_rate(vbus_clk); |
| 147 | change = new_margin * (vbus_rate / prescale_value); |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 148 | if (change < 1) |
| 149 | change = 1; |
| 150 | if (change > 0xffff) |
| 151 | change = 0xffff; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 152 | ar7_wdt_change(change); |
Florian Fainelli | 780019d | 2010-01-27 09:10:06 +0100 | [diff] [blame] | 153 | margin = change * prescale_value / vbus_rate; |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 154 | pr_info("timer margin %d seconds (prescale %d, change %d, freq %d)\n", |
| 155 | margin, prescale_value, change, vbus_rate); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 156 | } |
| 157 | |
| 158 | static void ar7_wdt_enable_wdt(void) |
| 159 | { |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 160 | pr_debug("enabling watchdog timer\n"); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 161 | ar7_wdt_disable(1); |
| 162 | ar7_wdt_kick(1); |
| 163 | } |
| 164 | |
| 165 | static void ar7_wdt_disable_wdt(void) |
| 166 | { |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 167 | pr_debug("disabling watchdog timer\n"); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 168 | ar7_wdt_disable(0); |
| 169 | } |
| 170 | |
| 171 | static int ar7_wdt_open(struct inode *inode, struct file *file) |
| 172 | { |
| 173 | /* only allow one at a time */ |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 174 | if (test_and_set_bit(0, &wdt_is_open)) |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 175 | return -EBUSY; |
| 176 | ar7_wdt_enable_wdt(); |
| 177 | expect_close = 0; |
| 178 | |
| 179 | return nonseekable_open(inode, file); |
| 180 | } |
| 181 | |
| 182 | static int ar7_wdt_release(struct inode *inode, struct file *file) |
| 183 | { |
| 184 | if (!expect_close) |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 185 | pr_warn("watchdog device closed unexpectedly, will not disable the watchdog timer\n"); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 186 | else if (!nowayout) |
| 187 | ar7_wdt_disable_wdt(); |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 188 | clear_bit(0, &wdt_is_open); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 189 | return 0; |
| 190 | } |
| 191 | |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 192 | static ssize_t ar7_wdt_write(struct file *file, const char *data, |
| 193 | size_t len, loff_t *ppos) |
| 194 | { |
| 195 | /* check for a magic close character */ |
| 196 | if (len) { |
| 197 | size_t i; |
| 198 | |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 199 | spin_lock(&wdt_lock); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 200 | ar7_wdt_kick(1); |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 201 | spin_unlock(&wdt_lock); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 202 | |
| 203 | expect_close = 0; |
| 204 | for (i = 0; i < len; ++i) { |
| 205 | char c; |
Wim Van Sebroeck | 7944d3a | 2008-08-06 20:19:41 +0000 | [diff] [blame] | 206 | if (get_user(c, data + i)) |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 207 | return -EFAULT; |
| 208 | if (c == 'V') |
| 209 | expect_close = 1; |
| 210 | } |
| 211 | |
| 212 | } |
| 213 | return len; |
| 214 | } |
| 215 | |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 216 | static long ar7_wdt_ioctl(struct file *file, |
| 217 | unsigned int cmd, unsigned long arg) |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 218 | { |
Wim Van Sebroeck | 42747d7 | 2009-12-26 18:55:22 +0000 | [diff] [blame] | 219 | static const struct watchdog_info ident = { |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 220 | .identity = LONGNAME, |
| 221 | .firmware_version = 1, |
Wim Van Sebroeck | e73a780 | 2009-05-11 18:33:00 +0000 | [diff] [blame] | 222 | .options = (WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | |
| 223 | WDIOF_MAGICCLOSE), |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 224 | }; |
| 225 | int new_margin; |
| 226 | |
| 227 | switch (cmd) { |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 228 | case WDIOC_GETSUPPORT: |
| 229 | if (copy_to_user((struct watchdog_info *)arg, &ident, |
| 230 | sizeof(ident))) |
| 231 | return -EFAULT; |
| 232 | return 0; |
| 233 | case WDIOC_GETSTATUS: |
| 234 | case WDIOC_GETBOOTSTATUS: |
| 235 | if (put_user(0, (int *)arg)) |
| 236 | return -EFAULT; |
| 237 | return 0; |
| 238 | case WDIOC_KEEPALIVE: |
| 239 | ar7_wdt_kick(1); |
| 240 | return 0; |
| 241 | case WDIOC_SETTIMEOUT: |
| 242 | if (get_user(new_margin, (int *)arg)) |
| 243 | return -EFAULT; |
| 244 | if (new_margin < 1) |
| 245 | return -EINVAL; |
| 246 | |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 247 | spin_lock(&wdt_lock); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 248 | ar7_wdt_update_margin(new_margin); |
| 249 | ar7_wdt_kick(1); |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 250 | spin_unlock(&wdt_lock); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 251 | |
| 252 | case WDIOC_GETTIMEOUT: |
| 253 | if (put_user(margin, (int *)arg)) |
| 254 | return -EFAULT; |
| 255 | return 0; |
Wim Van Sebroeck | 0c06090 | 2008-07-18 11:41:17 +0000 | [diff] [blame] | 256 | default: |
| 257 | return -ENOTTY; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 258 | } |
| 259 | } |
| 260 | |
Jan Engelhardt | b47a166 | 2008-01-22 20:48:10 +0100 | [diff] [blame] | 261 | static const struct file_operations ar7_wdt_fops = { |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 262 | .owner = THIS_MODULE, |
| 263 | .write = ar7_wdt_write, |
Alan Cox | 670d59c | 2008-08-04 17:53:22 +0100 | [diff] [blame] | 264 | .unlocked_ioctl = ar7_wdt_ioctl, |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 265 | .open = ar7_wdt_open, |
| 266 | .release = ar7_wdt_release, |
Arnd Bergmann | 6038f37 | 2010-08-15 18:52:59 +0200 | [diff] [blame] | 267 | .llseek = no_llseek, |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 268 | }; |
| 269 | |
| 270 | static struct miscdevice ar7_wdt_miscdev = { |
| 271 | .minor = WATCHDOG_MINOR, |
| 272 | .name = "watchdog", |
| 273 | .fops = &ar7_wdt_fops, |
| 274 | }; |
| 275 | |
Bill Pemberton | 2d991a1 | 2012-11-19 13:21:41 -0500 | [diff] [blame] | 276 | static int ar7_wdt_probe(struct platform_device *pdev) |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 277 | { |
| 278 | int rc; |
| 279 | |
Florian Fainelli | 64d4062 | 2009-07-21 12:11:32 +0200 | [diff] [blame] | 280 | ar7_regs_wdt = |
| 281 | platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); |
Thierry Reding | 4c271bb | 2013-01-21 11:09:25 +0100 | [diff] [blame] | 282 | ar7_wdt = devm_ioremap_resource(&pdev->dev, ar7_regs_wdt); |
| 283 | if (IS_ERR(ar7_wdt)) |
| 284 | return PTR_ERR(ar7_wdt); |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 285 | |
Florian Fainelli | 780019d | 2010-01-27 09:10:06 +0100 | [diff] [blame] | 286 | vbus_clk = clk_get(NULL, "vbus"); |
| 287 | if (IS_ERR(vbus_clk)) { |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 288 | pr_err("could not get vbus clock\n"); |
Julia Lawall | ae21cc2 | 2012-04-15 12:27:33 +0200 | [diff] [blame] | 289 | return PTR_ERR(vbus_clk); |
Florian Fainelli | 780019d | 2010-01-27 09:10:06 +0100 | [diff] [blame] | 290 | } |
| 291 | |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 292 | ar7_wdt_disable_wdt(); |
| 293 | ar7_wdt_prescale(prescale_value); |
| 294 | ar7_wdt_update_margin(margin); |
| 295 | |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 296 | rc = misc_register(&ar7_wdt_miscdev); |
| 297 | if (rc) { |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 298 | pr_err("unable to register misc device\n"); |
Julia Lawall | ae21cc2 | 2012-04-15 12:27:33 +0200 | [diff] [blame] | 299 | goto out; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 300 | } |
Julia Lawall | ae21cc2 | 2012-04-15 12:27:33 +0200 | [diff] [blame] | 301 | return 0; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 302 | |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 303 | out: |
Julia Lawall | ae21cc2 | 2012-04-15 12:27:33 +0200 | [diff] [blame] | 304 | clk_put(vbus_clk); |
| 305 | vbus_clk = NULL; |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 306 | return rc; |
| 307 | } |
| 308 | |
Bill Pemberton | 4b12b89 | 2012-11-19 13:26:24 -0500 | [diff] [blame] | 309 | static int ar7_wdt_remove(struct platform_device *pdev) |
Matteo Croce | c283cf2 | 2007-09-20 18:06:41 +0200 | [diff] [blame] | 310 | { |
| 311 | misc_deregister(&ar7_wdt_miscdev); |
Julia Lawall | ae21cc2 | 2012-04-15 12:27:33 +0200 | [diff] [blame] | 312 | clk_put(vbus_clk); |
| 313 | vbus_clk = NULL; |
Florian Fainelli | 64d4062 | 2009-07-21 12:11:32 +0200 | [diff] [blame] | 314 | return 0; |
| 315 | } |
| 316 | |
| 317 | static void ar7_wdt_shutdown(struct platform_device *pdev) |
| 318 | { |
| 319 | if (!nowayout) |
| 320 | ar7_wdt_disable_wdt(); |
| 321 | } |
| 322 | |
| 323 | static struct platform_driver ar7_wdt_driver = { |
| 324 | .probe = ar7_wdt_probe, |
Bill Pemberton | 8226871 | 2012-11-19 13:21:12 -0500 | [diff] [blame] | 325 | .remove = ar7_wdt_remove, |
Florian Fainelli | 64d4062 | 2009-07-21 12:11:32 +0200 | [diff] [blame] | 326 | .shutdown = ar7_wdt_shutdown, |
| 327 | .driver = { |
| 328 | .owner = THIS_MODULE, |
| 329 | .name = "ar7_wdt", |
| 330 | }, |
| 331 | }; |
| 332 | |
Axel Lin | b8ec611 | 2011-11-29 13:56:27 +0800 | [diff] [blame] | 333 | module_platform_driver(ar7_wdt_driver); |