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