Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 1 | /* |
Michal Simek | 9419c07 | 2013-05-31 07:56:33 +0200 | [diff] [blame] | 2 | * Watchdog Device Driver for Xilinx axi/xps_timebase_wdt |
| 3 | * |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 4 | * (C) Copyright 2013 - 2014 Xilinx, Inc. |
Michal Simek | 9419c07 | 2013-05-31 07:56:33 +0200 | [diff] [blame] | 5 | * (C) Copyright 2011 (Alejandro Cabrera <aldaya@gmail.com>) |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License |
| 9 | * as published by the Free Software Foundation; either version |
| 10 | * 2 of the License, or (at your option) any later version. |
| 11 | */ |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 12 | |
Michal Simek | f06cdfd | 2014-02-12 14:34:34 +0100 | [diff] [blame] | 13 | #include <linux/err.h> |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 14 | #include <linux/module.h> |
| 15 | #include <linux/types.h> |
| 16 | #include <linux/kernel.h> |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 17 | #include <linux/ioport.h> |
| 18 | #include <linux/watchdog.h> |
| 19 | #include <linux/io.h> |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 20 | #include <linux/of.h> |
| 21 | #include <linux/of_device.h> |
| 22 | #include <linux/of_address.h> |
| 23 | |
| 24 | /* Register offsets for the Wdt device */ |
| 25 | #define XWT_TWCSR0_OFFSET 0x0 /* Control/Status Register0 */ |
| 26 | #define XWT_TWCSR1_OFFSET 0x4 /* Control/Status Register1 */ |
| 27 | #define XWT_TBR_OFFSET 0x8 /* Timebase Register Offset */ |
| 28 | |
| 29 | /* Control/Status Register Masks */ |
| 30 | #define XWT_CSR0_WRS_MASK 0x00000008 /* Reset status */ |
| 31 | #define XWT_CSR0_WDS_MASK 0x00000004 /* Timer state */ |
| 32 | #define XWT_CSR0_EWDT1_MASK 0x00000002 /* Enable bit 1 */ |
| 33 | |
| 34 | /* Control/Status Register 0/1 bits */ |
| 35 | #define XWT_CSRX_EWDT2_MASK 0x00000001 /* Enable bit 2 */ |
| 36 | |
| 37 | /* SelfTest constants */ |
| 38 | #define XWT_MAX_SELFTEST_LOOP_COUNT 0x00010000 |
| 39 | #define XWT_TIMER_FAILED 0xFFFFFFFF |
| 40 | |
| 41 | #define WATCHDOG_NAME "Xilinx Watchdog" |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 42 | |
| 43 | struct xwdt_device { |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 44 | void __iomem *base; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 45 | u32 wdt_interval; |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 46 | spinlock_t spinlock; |
| 47 | struct watchdog_device xilinx_wdt_wdd; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 48 | }; |
| 49 | |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 50 | static int xilinx_wdt_start(struct watchdog_device *wdd) |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 51 | { |
Michal Simek | 5cf4e69 | 2014-02-12 14:34:33 +0100 | [diff] [blame] | 52 | u32 control_status_reg; |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 53 | struct xwdt_device *xdev = watchdog_get_drvdata(wdd); |
Michal Simek | 5cf4e69 | 2014-02-12 14:34:33 +0100 | [diff] [blame] | 54 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 55 | spin_lock(&xdev->spinlock); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 56 | |
| 57 | /* Clean previous status and enable the watchdog timer */ |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 58 | control_status_reg = ioread32(xdev->base + XWT_TWCSR0_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 59 | control_status_reg |= (XWT_CSR0_WRS_MASK | XWT_CSR0_WDS_MASK); |
| 60 | |
| 61 | iowrite32((control_status_reg | XWT_CSR0_EWDT1_MASK), |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 62 | xdev->base + XWT_TWCSR0_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 63 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 64 | iowrite32(XWT_CSRX_EWDT2_MASK, xdev->base + XWT_TWCSR1_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 65 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 66 | spin_unlock(&xdev->spinlock); |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 67 | |
| 68 | return 0; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 69 | } |
| 70 | |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 71 | static int xilinx_wdt_stop(struct watchdog_device *wdd) |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 72 | { |
Michal Simek | 5cf4e69 | 2014-02-12 14:34:33 +0100 | [diff] [blame] | 73 | u32 control_status_reg; |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 74 | struct xwdt_device *xdev = watchdog_get_drvdata(wdd); |
Michal Simek | 5cf4e69 | 2014-02-12 14:34:33 +0100 | [diff] [blame] | 75 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 76 | spin_lock(&xdev->spinlock); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 77 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 78 | control_status_reg = ioread32(xdev->base + XWT_TWCSR0_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 79 | |
| 80 | iowrite32((control_status_reg & ~XWT_CSR0_EWDT1_MASK), |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 81 | xdev->base + XWT_TWCSR0_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 82 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 83 | iowrite32(0, xdev->base + XWT_TWCSR1_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 84 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 85 | spin_unlock(&xdev->spinlock); |
Joe Perches | 27c766a | 2012-02-15 15:06:19 -0800 | [diff] [blame] | 86 | pr_info("Stopped!\n"); |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 87 | |
| 88 | return 0; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 89 | } |
| 90 | |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 91 | static int xilinx_wdt_keepalive(struct watchdog_device *wdd) |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 92 | { |
Michal Simek | 5cf4e69 | 2014-02-12 14:34:33 +0100 | [diff] [blame] | 93 | u32 control_status_reg; |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 94 | struct xwdt_device *xdev = watchdog_get_drvdata(wdd); |
Michal Simek | 5cf4e69 | 2014-02-12 14:34:33 +0100 | [diff] [blame] | 95 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 96 | spin_lock(&xdev->spinlock); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 97 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 98 | control_status_reg = ioread32(xdev->base + XWT_TWCSR0_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 99 | control_status_reg |= (XWT_CSR0_WRS_MASK | XWT_CSR0_WDS_MASK); |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 100 | iowrite32(control_status_reg, xdev->base + XWT_TWCSR0_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 101 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 102 | spin_unlock(&xdev->spinlock); |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 103 | |
| 104 | return 0; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 105 | } |
| 106 | |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 107 | static const struct watchdog_info xilinx_wdt_ident = { |
| 108 | .options = WDIOF_MAGICCLOSE | |
| 109 | WDIOF_KEEPALIVEPING, |
| 110 | .firmware_version = 1, |
| 111 | .identity = WATCHDOG_NAME, |
| 112 | }; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 113 | |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 114 | static const struct watchdog_ops xilinx_wdt_ops = { |
| 115 | .owner = THIS_MODULE, |
| 116 | .start = xilinx_wdt_start, |
| 117 | .stop = xilinx_wdt_stop, |
| 118 | .ping = xilinx_wdt_keepalive, |
| 119 | }; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 120 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 121 | static u32 xwdt_selftest(struct xwdt_device *xdev) |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 122 | { |
| 123 | int i; |
| 124 | u32 timer_value1; |
| 125 | u32 timer_value2; |
| 126 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 127 | spin_lock(&xdev->spinlock); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 128 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 129 | timer_value1 = ioread32(xdev->base + XWT_TBR_OFFSET); |
| 130 | timer_value2 = ioread32(xdev->base + XWT_TBR_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 131 | |
| 132 | for (i = 0; |
| 133 | ((i <= XWT_MAX_SELFTEST_LOOP_COUNT) && |
| 134 | (timer_value2 == timer_value1)); i++) { |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 135 | timer_value2 = ioread32(xdev->base + XWT_TBR_OFFSET); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 136 | } |
| 137 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 138 | spin_unlock(&xdev->spinlock); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 139 | |
| 140 | if (timer_value2 != timer_value1) |
| 141 | return ~XWT_TIMER_FAILED; |
| 142 | else |
| 143 | return XWT_TIMER_FAILED; |
| 144 | } |
| 145 | |
Bill Pemberton | 2d991a1 | 2012-11-19 13:21:41 -0500 | [diff] [blame] | 146 | static int xwdt_probe(struct platform_device *pdev) |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 147 | { |
| 148 | int rc; |
Michal Simek | 8d6a140 | 2014-02-12 14:41:25 +0100 | [diff] [blame] | 149 | u32 pfreq = 0, enable_once = 0; |
Michal Simek | f06cdfd | 2014-02-12 14:34:34 +0100 | [diff] [blame] | 150 | struct resource *res; |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 151 | struct xwdt_device *xdev; |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 152 | struct watchdog_device *xilinx_wdt_wdd; |
| 153 | |
| 154 | xdev = devm_kzalloc(&pdev->dev, sizeof(*xdev), GFP_KERNEL); |
| 155 | if (!xdev) |
| 156 | return -ENOMEM; |
| 157 | |
| 158 | xilinx_wdt_wdd = &xdev->xilinx_wdt_wdd; |
| 159 | xilinx_wdt_wdd->info = &xilinx_wdt_ident; |
| 160 | xilinx_wdt_wdd->ops = &xilinx_wdt_ops; |
| 161 | xilinx_wdt_wdd->parent = &pdev->dev; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 162 | |
Michal Simek | f06cdfd | 2014-02-12 14:34:34 +0100 | [diff] [blame] | 163 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 164 | xdev->base = devm_ioremap_resource(&pdev->dev, res); |
| 165 | if (IS_ERR(xdev->base)) |
| 166 | return PTR_ERR(xdev->base); |
Michal Simek | f06cdfd | 2014-02-12 14:34:34 +0100 | [diff] [blame] | 167 | |
Michal Simek | 2e79a36 | 2014-02-12 14:41:21 +0100 | [diff] [blame] | 168 | rc = of_property_read_u32(pdev->dev.of_node, "clock-frequency", &pfreq); |
Michal Simek | 8d6a140 | 2014-02-12 14:41:25 +0100 | [diff] [blame] | 169 | if (rc) |
Michal Simek | 4c7fbbc | 2014-02-12 14:41:20 +0100 | [diff] [blame] | 170 | dev_warn(&pdev->dev, |
| 171 | "The watchdog clock frequency cannot be obtained\n"); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 172 | |
Michal Simek | 2e79a36 | 2014-02-12 14:41:21 +0100 | [diff] [blame] | 173 | rc = of_property_read_u32(pdev->dev.of_node, "xlnx,wdt-interval", |
| 174 | &xdev->wdt_interval); |
Michal Simek | 8d6a140 | 2014-02-12 14:41:25 +0100 | [diff] [blame] | 175 | if (rc) |
Michal Simek | 4c7fbbc | 2014-02-12 14:41:20 +0100 | [diff] [blame] | 176 | dev_warn(&pdev->dev, |
| 177 | "Parameter \"xlnx,wdt-interval\" not found\n"); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 178 | |
Michal Simek | 2e79a36 | 2014-02-12 14:41:21 +0100 | [diff] [blame] | 179 | rc = of_property_read_u32(pdev->dev.of_node, "xlnx,wdt-enable-once", |
| 180 | &enable_once); |
| 181 | if (rc) |
Michal Simek | 4c7fbbc | 2014-02-12 14:41:20 +0100 | [diff] [blame] | 182 | dev_warn(&pdev->dev, |
| 183 | "Parameter \"xlnx,wdt-enable-once\" not found\n"); |
Michal Simek | 2e79a36 | 2014-02-12 14:41:21 +0100 | [diff] [blame] | 184 | |
| 185 | watchdog_set_nowayout(xilinx_wdt_wdd, enable_once); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 186 | |
Michal Simek | 75b3c5a | 2014-02-12 14:41:22 +0100 | [diff] [blame] | 187 | /* |
| 188 | * Twice of the 2^wdt_interval / freq because the first wdt overflow is |
| 189 | * ignored (interrupt), reset is only generated at second wdt overflow |
| 190 | */ |
Michal Simek | 8d6a140 | 2014-02-12 14:41:25 +0100 | [diff] [blame] | 191 | if (pfreq && xdev->wdt_interval) |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 192 | xilinx_wdt_wdd->timeout = 2 * ((1 << xdev->wdt_interval) / |
Michal Simek | 2e79a36 | 2014-02-12 14:41:21 +0100 | [diff] [blame] | 193 | pfreq); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 194 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 195 | spin_lock_init(&xdev->spinlock); |
| 196 | watchdog_set_drvdata(xilinx_wdt_wdd, xdev); |
| 197 | |
| 198 | rc = xwdt_selftest(xdev); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 199 | if (rc == XWT_TIMER_FAILED) { |
Michal Simek | 4c7fbbc | 2014-02-12 14:41:20 +0100 | [diff] [blame] | 200 | dev_err(&pdev->dev, "SelfTest routine error\n"); |
Michal Simek | f06cdfd | 2014-02-12 14:34:34 +0100 | [diff] [blame] | 201 | return rc; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 202 | } |
| 203 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 204 | rc = watchdog_register_device(xilinx_wdt_wdd); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 205 | if (rc) { |
Michal Simek | 4c7fbbc | 2014-02-12 14:41:20 +0100 | [diff] [blame] | 206 | dev_err(&pdev->dev, "Cannot register watchdog (err=%d)\n", rc); |
Michal Simek | f06cdfd | 2014-02-12 14:34:34 +0100 | [diff] [blame] | 207 | return rc; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 208 | } |
| 209 | |
Michal Simek | d14fd96 | 2014-02-12 14:34:32 +0100 | [diff] [blame] | 210 | dev_info(&pdev->dev, "Xilinx Watchdog Timer at %p with timeout %ds\n", |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 211 | xdev->base, xilinx_wdt_wdd->timeout); |
| 212 | |
| 213 | platform_set_drvdata(pdev, xdev); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 214 | |
| 215 | return 0; |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 216 | } |
| 217 | |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 218 | static int xwdt_remove(struct platform_device *pdev) |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 219 | { |
Michal Simek | 9066317 | 2014-02-12 14:41:19 +0100 | [diff] [blame] | 220 | struct xwdt_device *xdev = platform_get_drvdata(pdev); |
| 221 | |
| 222 | watchdog_unregister_device(&xdev->xilinx_wdt_wdd); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 223 | |
| 224 | return 0; |
| 225 | } |
| 226 | |
| 227 | /* Match table for of_platform binding */ |
Jingoo Han | 9ebf185 | 2014-05-07 17:42:22 +0900 | [diff] [blame] | 228 | static const struct of_device_id xwdt_of_match[] = { |
Michal Simek | 8fce9b3 | 2013-05-31 07:56:34 +0200 | [diff] [blame] | 229 | { .compatible = "xlnx,xps-timebase-wdt-1.00.a", }, |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 230 | { .compatible = "xlnx,xps-timebase-wdt-1.01.a", }, |
| 231 | {}, |
| 232 | }; |
| 233 | MODULE_DEVICE_TABLE(of, xwdt_of_match); |
| 234 | |
| 235 | static struct platform_driver xwdt_driver = { |
| 236 | .probe = xwdt_probe, |
Bill Pemberton | 8226871 | 2012-11-19 13:21:12 -0500 | [diff] [blame] | 237 | .remove = xwdt_remove, |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 238 | .driver = { |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 239 | .name = WATCHDOG_NAME, |
| 240 | .of_match_table = xwdt_of_match, |
| 241 | }, |
| 242 | }; |
| 243 | |
Axel Lin | b8ec611 | 2011-11-29 13:56:27 +0800 | [diff] [blame] | 244 | module_platform_driver(xwdt_driver); |
Alejandro Cabrera | e9659e6 | 2011-06-02 22:13:11 +0100 | [diff] [blame] | 245 | |
| 246 | MODULE_AUTHOR("Alejandro Cabrera <aldaya@gmail.com>"); |
| 247 | MODULE_DESCRIPTION("Xilinx Watchdog driver"); |
Michal Simek | 9419c07 | 2013-05-31 07:56:33 +0200 | [diff] [blame] | 248 | MODULE_LICENSE("GPL v2"); |