1aae03dc9SOleksij Rempel /* 2aae03dc9SOleksij Rempel * Watchdog driver for Alphascale ASM9260. 3aae03dc9SOleksij Rempel * 4aae03dc9SOleksij Rempel * Copyright (c) 2014 Oleksij Rempel <linux@rempel-privat.de> 5aae03dc9SOleksij Rempel * 6aae03dc9SOleksij Rempel * Licensed under GPLv2 or later. 7aae03dc9SOleksij Rempel */ 8aae03dc9SOleksij Rempel 9aae03dc9SOleksij Rempel #include <linux/bitops.h> 10aae03dc9SOleksij Rempel #include <linux/clk.h> 11aae03dc9SOleksij Rempel #include <linux/delay.h> 12aae03dc9SOleksij Rempel #include <linux/interrupt.h> 13aae03dc9SOleksij Rempel #include <linux/io.h> 14aae03dc9SOleksij Rempel #include <linux/module.h> 15aae03dc9SOleksij Rempel #include <linux/of.h> 16aae03dc9SOleksij Rempel #include <linux/platform_device.h> 17aae03dc9SOleksij Rempel #include <linux/reset.h> 18aae03dc9SOleksij Rempel #include <linux/watchdog.h> 19aae03dc9SOleksij Rempel 20aae03dc9SOleksij Rempel #define CLOCK_FREQ 1000000 21aae03dc9SOleksij Rempel 22aae03dc9SOleksij Rempel /* Watchdog Mode register */ 23aae03dc9SOleksij Rempel #define HW_WDMOD 0x00 24aae03dc9SOleksij Rempel /* Wake interrupt. Set by HW, can't be cleared. */ 25aae03dc9SOleksij Rempel #define BM_MOD_WDINT BIT(3) 26aae03dc9SOleksij Rempel /* This bit set if timeout reached. Cleared by SW. */ 27aae03dc9SOleksij Rempel #define BM_MOD_WDTOF BIT(2) 28aae03dc9SOleksij Rempel /* HW Reset on timeout */ 29aae03dc9SOleksij Rempel #define BM_MOD_WDRESET BIT(1) 30aae03dc9SOleksij Rempel /* WD enable */ 31aae03dc9SOleksij Rempel #define BM_MOD_WDEN BIT(0) 32aae03dc9SOleksij Rempel 33aae03dc9SOleksij Rempel /* 34aae03dc9SOleksij Rempel * Watchdog Timer Constant register 35aae03dc9SOleksij Rempel * Minimal value is 0xff, the meaning of this value 36aae03dc9SOleksij Rempel * depends on used clock: T = WDCLK * (0xff + 1) * 4 37aae03dc9SOleksij Rempel */ 38aae03dc9SOleksij Rempel #define HW_WDTC 0x04 39aae03dc9SOleksij Rempel #define BM_WDTC_MAX(freq) (0x7fffffff / (freq)) 40aae03dc9SOleksij Rempel 41aae03dc9SOleksij Rempel /* Watchdog Feed register */ 42aae03dc9SOleksij Rempel #define HW_WDFEED 0x08 43aae03dc9SOleksij Rempel 44aae03dc9SOleksij Rempel /* Watchdog Timer Value register */ 45aae03dc9SOleksij Rempel #define HW_WDTV 0x0c 46aae03dc9SOleksij Rempel 47aae03dc9SOleksij Rempel #define ASM9260_WDT_DEFAULT_TIMEOUT 30 48aae03dc9SOleksij Rempel 49aae03dc9SOleksij Rempel enum asm9260_wdt_mode { 50aae03dc9SOleksij Rempel HW_RESET, 51aae03dc9SOleksij Rempel SW_RESET, 52aae03dc9SOleksij Rempel DEBUG, 53aae03dc9SOleksij Rempel }; 54aae03dc9SOleksij Rempel 55aae03dc9SOleksij Rempel struct asm9260_wdt_priv { 56aae03dc9SOleksij Rempel struct device *dev; 57aae03dc9SOleksij Rempel struct watchdog_device wdd; 58aae03dc9SOleksij Rempel struct clk *clk; 59aae03dc9SOleksij Rempel struct clk *clk_ahb; 60aae03dc9SOleksij Rempel struct reset_control *rst; 61aae03dc9SOleksij Rempel 62aae03dc9SOleksij Rempel void __iomem *iobase; 63aae03dc9SOleksij Rempel int irq; 64aae03dc9SOleksij Rempel unsigned long wdt_freq; 65aae03dc9SOleksij Rempel enum asm9260_wdt_mode mode; 66aae03dc9SOleksij Rempel }; 67aae03dc9SOleksij Rempel 68aae03dc9SOleksij Rempel static int asm9260_wdt_feed(struct watchdog_device *wdd) 69aae03dc9SOleksij Rempel { 70aae03dc9SOleksij Rempel struct asm9260_wdt_priv *priv = watchdog_get_drvdata(wdd); 71aae03dc9SOleksij Rempel 72aae03dc9SOleksij Rempel iowrite32(0xaa, priv->iobase + HW_WDFEED); 73aae03dc9SOleksij Rempel iowrite32(0x55, priv->iobase + HW_WDFEED); 74aae03dc9SOleksij Rempel 75aae03dc9SOleksij Rempel return 0; 76aae03dc9SOleksij Rempel } 77aae03dc9SOleksij Rempel 78aae03dc9SOleksij Rempel static unsigned int asm9260_wdt_gettimeleft(struct watchdog_device *wdd) 79aae03dc9SOleksij Rempel { 80aae03dc9SOleksij Rempel struct asm9260_wdt_priv *priv = watchdog_get_drvdata(wdd); 81aae03dc9SOleksij Rempel u32 counter; 82aae03dc9SOleksij Rempel 83aae03dc9SOleksij Rempel counter = ioread32(priv->iobase + HW_WDTV); 84aae03dc9SOleksij Rempel 85d94fa465SWolfram Sang return counter / priv->wdt_freq; 86aae03dc9SOleksij Rempel } 87aae03dc9SOleksij Rempel 88aae03dc9SOleksij Rempel static int asm9260_wdt_updatetimeout(struct watchdog_device *wdd) 89aae03dc9SOleksij Rempel { 90aae03dc9SOleksij Rempel struct asm9260_wdt_priv *priv = watchdog_get_drvdata(wdd); 91aae03dc9SOleksij Rempel u32 counter; 92aae03dc9SOleksij Rempel 93aae03dc9SOleksij Rempel counter = wdd->timeout * priv->wdt_freq; 94aae03dc9SOleksij Rempel 95aae03dc9SOleksij Rempel iowrite32(counter, priv->iobase + HW_WDTC); 96aae03dc9SOleksij Rempel 97aae03dc9SOleksij Rempel return 0; 98aae03dc9SOleksij Rempel } 99aae03dc9SOleksij Rempel 100aae03dc9SOleksij Rempel static int asm9260_wdt_enable(struct watchdog_device *wdd) 101aae03dc9SOleksij Rempel { 102aae03dc9SOleksij Rempel struct asm9260_wdt_priv *priv = watchdog_get_drvdata(wdd); 103aae03dc9SOleksij Rempel u32 mode = 0; 104aae03dc9SOleksij Rempel 105aae03dc9SOleksij Rempel if (priv->mode == HW_RESET) 106aae03dc9SOleksij Rempel mode = BM_MOD_WDRESET; 107aae03dc9SOleksij Rempel 108aae03dc9SOleksij Rempel iowrite32(BM_MOD_WDEN | mode, priv->iobase + HW_WDMOD); 109aae03dc9SOleksij Rempel 110aae03dc9SOleksij Rempel asm9260_wdt_updatetimeout(wdd); 111aae03dc9SOleksij Rempel 112aae03dc9SOleksij Rempel asm9260_wdt_feed(wdd); 113aae03dc9SOleksij Rempel 114aae03dc9SOleksij Rempel return 0; 115aae03dc9SOleksij Rempel } 116aae03dc9SOleksij Rempel 117aae03dc9SOleksij Rempel static int asm9260_wdt_disable(struct watchdog_device *wdd) 118aae03dc9SOleksij Rempel { 119aae03dc9SOleksij Rempel struct asm9260_wdt_priv *priv = watchdog_get_drvdata(wdd); 120aae03dc9SOleksij Rempel 121aae03dc9SOleksij Rempel /* The only way to disable WD is to reset it. */ 122aae03dc9SOleksij Rempel reset_control_assert(priv->rst); 123aae03dc9SOleksij Rempel reset_control_deassert(priv->rst); 124aae03dc9SOleksij Rempel 125aae03dc9SOleksij Rempel return 0; 126aae03dc9SOleksij Rempel } 127aae03dc9SOleksij Rempel 128aae03dc9SOleksij Rempel static int asm9260_wdt_settimeout(struct watchdog_device *wdd, unsigned int to) 129aae03dc9SOleksij Rempel { 130aae03dc9SOleksij Rempel wdd->timeout = to; 131aae03dc9SOleksij Rempel asm9260_wdt_updatetimeout(wdd); 132aae03dc9SOleksij Rempel 133aae03dc9SOleksij Rempel return 0; 134aae03dc9SOleksij Rempel } 135aae03dc9SOleksij Rempel 136aae03dc9SOleksij Rempel static void asm9260_wdt_sys_reset(struct asm9260_wdt_priv *priv) 137aae03dc9SOleksij Rempel { 138aae03dc9SOleksij Rempel /* init WD if it was not started */ 139aae03dc9SOleksij Rempel 140aae03dc9SOleksij Rempel iowrite32(BM_MOD_WDEN | BM_MOD_WDRESET, priv->iobase + HW_WDMOD); 141aae03dc9SOleksij Rempel 142aae03dc9SOleksij Rempel iowrite32(0xff, priv->iobase + HW_WDTC); 143aae03dc9SOleksij Rempel /* first pass correct sequence */ 144aae03dc9SOleksij Rempel asm9260_wdt_feed(&priv->wdd); 145aae03dc9SOleksij Rempel /* 146aae03dc9SOleksij Rempel * Then write wrong pattern to the feed to trigger reset 147aae03dc9SOleksij Rempel * ASAP. 148aae03dc9SOleksij Rempel */ 149aae03dc9SOleksij Rempel iowrite32(0xff, priv->iobase + HW_WDFEED); 150aae03dc9SOleksij Rempel 151aae03dc9SOleksij Rempel mdelay(1000); 152aae03dc9SOleksij Rempel } 153aae03dc9SOleksij Rempel 154aae03dc9SOleksij Rempel static irqreturn_t asm9260_wdt_irq(int irq, void *devid) 155aae03dc9SOleksij Rempel { 156aae03dc9SOleksij Rempel struct asm9260_wdt_priv *priv = devid; 157aae03dc9SOleksij Rempel u32 stat; 158aae03dc9SOleksij Rempel 159aae03dc9SOleksij Rempel stat = ioread32(priv->iobase + HW_WDMOD); 160aae03dc9SOleksij Rempel if (!(stat & BM_MOD_WDINT)) 161aae03dc9SOleksij Rempel return IRQ_NONE; 162aae03dc9SOleksij Rempel 163aae03dc9SOleksij Rempel if (priv->mode == DEBUG) { 164aae03dc9SOleksij Rempel dev_info(priv->dev, "Watchdog Timeout. Do nothing.\n"); 165aae03dc9SOleksij Rempel } else { 166aae03dc9SOleksij Rempel dev_info(priv->dev, "Watchdog Timeout. Doing SW Reset.\n"); 167aae03dc9SOleksij Rempel asm9260_wdt_sys_reset(priv); 168aae03dc9SOleksij Rempel } 169aae03dc9SOleksij Rempel 170aae03dc9SOleksij Rempel return IRQ_HANDLED; 171aae03dc9SOleksij Rempel } 172aae03dc9SOleksij Rempel 17355dbe8f3SGuenter Roeck static int asm9260_restart(struct watchdog_device *wdd, unsigned long action, 17455dbe8f3SGuenter Roeck void *data) 175aae03dc9SOleksij Rempel { 17655dbe8f3SGuenter Roeck struct asm9260_wdt_priv *priv = watchdog_get_drvdata(wdd); 177aae03dc9SOleksij Rempel 178aae03dc9SOleksij Rempel asm9260_wdt_sys_reset(priv); 179aae03dc9SOleksij Rempel 18055dbe8f3SGuenter Roeck return 0; 181aae03dc9SOleksij Rempel } 182aae03dc9SOleksij Rempel 183aae03dc9SOleksij Rempel static const struct watchdog_info asm9260_wdt_ident = { 184aae03dc9SOleksij Rempel .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING 185aae03dc9SOleksij Rempel | WDIOF_MAGICCLOSE, 186aae03dc9SOleksij Rempel .identity = "Alphascale asm9260 Watchdog", 187aae03dc9SOleksij Rempel }; 188aae03dc9SOleksij Rempel 189b893e344SBhumika Goyal static const struct watchdog_ops asm9260_wdt_ops = { 190aae03dc9SOleksij Rempel .owner = THIS_MODULE, 191aae03dc9SOleksij Rempel .start = asm9260_wdt_enable, 192aae03dc9SOleksij Rempel .stop = asm9260_wdt_disable, 193aae03dc9SOleksij Rempel .get_timeleft = asm9260_wdt_gettimeleft, 194aae03dc9SOleksij Rempel .ping = asm9260_wdt_feed, 195aae03dc9SOleksij Rempel .set_timeout = asm9260_wdt_settimeout, 19655dbe8f3SGuenter Roeck .restart = asm9260_restart, 197aae03dc9SOleksij Rempel }; 198aae03dc9SOleksij Rempel 199*f57df835SGuenter Roeck static void asm9260_clk_disable_unprepare(void *data) 200*f57df835SGuenter Roeck { 201*f57df835SGuenter Roeck clk_disable_unprepare(data); 202*f57df835SGuenter Roeck } 203*f57df835SGuenter Roeck 204ac36856fSArnd Bergmann static int asm9260_wdt_get_dt_clks(struct asm9260_wdt_priv *priv) 205aae03dc9SOleksij Rempel { 206aae03dc9SOleksij Rempel int err; 207aae03dc9SOleksij Rempel unsigned long clk; 208aae03dc9SOleksij Rempel 209aae03dc9SOleksij Rempel priv->clk = devm_clk_get(priv->dev, "mod"); 210aae03dc9SOleksij Rempel if (IS_ERR(priv->clk)) { 211aae03dc9SOleksij Rempel dev_err(priv->dev, "Failed to get \"mod\" clk\n"); 212aae03dc9SOleksij Rempel return PTR_ERR(priv->clk); 213aae03dc9SOleksij Rempel } 214aae03dc9SOleksij Rempel 215aae03dc9SOleksij Rempel /* configure AHB clock */ 216aae03dc9SOleksij Rempel priv->clk_ahb = devm_clk_get(priv->dev, "ahb"); 217aae03dc9SOleksij Rempel if (IS_ERR(priv->clk_ahb)) { 218aae03dc9SOleksij Rempel dev_err(priv->dev, "Failed to get \"ahb\" clk\n"); 219aae03dc9SOleksij Rempel return PTR_ERR(priv->clk_ahb); 220aae03dc9SOleksij Rempel } 221aae03dc9SOleksij Rempel 222aae03dc9SOleksij Rempel err = clk_prepare_enable(priv->clk_ahb); 223aae03dc9SOleksij Rempel if (err) { 224aae03dc9SOleksij Rempel dev_err(priv->dev, "Failed to enable ahb_clk!\n"); 225aae03dc9SOleksij Rempel return err; 226aae03dc9SOleksij Rempel } 227*f57df835SGuenter Roeck err = devm_add_action_or_reset(priv->dev, 228*f57df835SGuenter Roeck asm9260_clk_disable_unprepare, 229*f57df835SGuenter Roeck priv->clk_ahb); 230*f57df835SGuenter Roeck if (err) 231*f57df835SGuenter Roeck return err; 232aae03dc9SOleksij Rempel 233aae03dc9SOleksij Rempel err = clk_set_rate(priv->clk, CLOCK_FREQ); 234aae03dc9SOleksij Rempel if (err) { 235aae03dc9SOleksij Rempel dev_err(priv->dev, "Failed to set rate!\n"); 236aae03dc9SOleksij Rempel return err; 237aae03dc9SOleksij Rempel } 238aae03dc9SOleksij Rempel 239aae03dc9SOleksij Rempel err = clk_prepare_enable(priv->clk); 240aae03dc9SOleksij Rempel if (err) { 241aae03dc9SOleksij Rempel dev_err(priv->dev, "Failed to enable clk!\n"); 242aae03dc9SOleksij Rempel return err; 243aae03dc9SOleksij Rempel } 244*f57df835SGuenter Roeck err = devm_add_action_or_reset(priv->dev, 245*f57df835SGuenter Roeck asm9260_clk_disable_unprepare, 246*f57df835SGuenter Roeck priv->clk); 247*f57df835SGuenter Roeck if (err) 248*f57df835SGuenter Roeck return err; 249aae03dc9SOleksij Rempel 250aae03dc9SOleksij Rempel /* wdt has internal divider */ 251aae03dc9SOleksij Rempel clk = clk_get_rate(priv->clk); 252aae03dc9SOleksij Rempel if (!clk) { 253aae03dc9SOleksij Rempel dev_err(priv->dev, "Failed, clk is 0!\n"); 254aae03dc9SOleksij Rempel return -EINVAL; 255aae03dc9SOleksij Rempel } 256aae03dc9SOleksij Rempel 257aae03dc9SOleksij Rempel priv->wdt_freq = clk / 2; 258aae03dc9SOleksij Rempel 259aae03dc9SOleksij Rempel return 0; 260aae03dc9SOleksij Rempel } 261aae03dc9SOleksij Rempel 262ac36856fSArnd Bergmann static void asm9260_wdt_get_dt_mode(struct asm9260_wdt_priv *priv) 263aae03dc9SOleksij Rempel { 264aae03dc9SOleksij Rempel const char *tmp; 265aae03dc9SOleksij Rempel int ret; 266aae03dc9SOleksij Rempel 267aae03dc9SOleksij Rempel /* default mode */ 268aae03dc9SOleksij Rempel priv->mode = HW_RESET; 269aae03dc9SOleksij Rempel 270aae03dc9SOleksij Rempel ret = of_property_read_string(priv->dev->of_node, 271aae03dc9SOleksij Rempel "alphascale,mode", &tmp); 272aae03dc9SOleksij Rempel if (ret < 0) 273aae03dc9SOleksij Rempel return; 274aae03dc9SOleksij Rempel 275aae03dc9SOleksij Rempel if (!strcmp(tmp, "hw")) 276aae03dc9SOleksij Rempel priv->mode = HW_RESET; 277aae03dc9SOleksij Rempel else if (!strcmp(tmp, "sw")) 278aae03dc9SOleksij Rempel priv->mode = SW_RESET; 279aae03dc9SOleksij Rempel else if (!strcmp(tmp, "debug")) 280aae03dc9SOleksij Rempel priv->mode = DEBUG; 281aae03dc9SOleksij Rempel else 282aae03dc9SOleksij Rempel dev_warn(priv->dev, "unknown reset-type: %s. Using default \"hw\" mode.", 283aae03dc9SOleksij Rempel tmp); 284aae03dc9SOleksij Rempel } 285aae03dc9SOleksij Rempel 286ac36856fSArnd Bergmann static int asm9260_wdt_probe(struct platform_device *pdev) 287aae03dc9SOleksij Rempel { 288*f57df835SGuenter Roeck struct device *dev = &pdev->dev; 289aae03dc9SOleksij Rempel struct asm9260_wdt_priv *priv; 290aae03dc9SOleksij Rempel struct watchdog_device *wdd; 291aae03dc9SOleksij Rempel int ret; 292b1bbb0cbSColin Ian King static const char * const mode_name[] = { "hw", "sw", "debug", }; 293aae03dc9SOleksij Rempel 294*f57df835SGuenter Roeck priv = devm_kzalloc(dev, sizeof(struct asm9260_wdt_priv), GFP_KERNEL); 295aae03dc9SOleksij Rempel if (!priv) 296aae03dc9SOleksij Rempel return -ENOMEM; 297aae03dc9SOleksij Rempel 298*f57df835SGuenter Roeck priv->dev = dev; 299aae03dc9SOleksij Rempel 3000f0a6a28SGuenter Roeck priv->iobase = devm_platform_ioremap_resource(pdev, 0); 301aae03dc9SOleksij Rempel if (IS_ERR(priv->iobase)) 302aae03dc9SOleksij Rempel return PTR_ERR(priv->iobase); 303aae03dc9SOleksij Rempel 304*f57df835SGuenter Roeck priv->rst = devm_reset_control_get_exclusive(dev, "wdt_rst"); 305aae03dc9SOleksij Rempel if (IS_ERR(priv->rst)) 306aae03dc9SOleksij Rempel return PTR_ERR(priv->rst); 307aae03dc9SOleksij Rempel 3083c829f47SAlexey Khoroshilov ret = asm9260_wdt_get_dt_clks(priv); 3093c829f47SAlexey Khoroshilov if (ret) 3103c829f47SAlexey Khoroshilov return ret; 3113c829f47SAlexey Khoroshilov 312aae03dc9SOleksij Rempel wdd = &priv->wdd; 313aae03dc9SOleksij Rempel wdd->info = &asm9260_wdt_ident; 314aae03dc9SOleksij Rempel wdd->ops = &asm9260_wdt_ops; 315aae03dc9SOleksij Rempel wdd->min_timeout = 1; 316aae03dc9SOleksij Rempel wdd->max_timeout = BM_WDTC_MAX(priv->wdt_freq); 317*f57df835SGuenter Roeck wdd->parent = dev; 318aae03dc9SOleksij Rempel 319aae03dc9SOleksij Rempel watchdog_set_drvdata(wdd, priv); 320aae03dc9SOleksij Rempel 321aae03dc9SOleksij Rempel /* 322aae03dc9SOleksij Rempel * If 'timeout-sec' unspecified in devicetree, assume a 30 second 323aae03dc9SOleksij Rempel * default, unless the max timeout is less than 30 seconds, then use 324aae03dc9SOleksij Rempel * the max instead. 325aae03dc9SOleksij Rempel */ 326aae03dc9SOleksij Rempel wdd->timeout = ASM9260_WDT_DEFAULT_TIMEOUT; 327*f57df835SGuenter Roeck watchdog_init_timeout(wdd, 0, dev); 328aae03dc9SOleksij Rempel 329aae03dc9SOleksij Rempel asm9260_wdt_get_dt_mode(priv); 330aae03dc9SOleksij Rempel 331aae03dc9SOleksij Rempel if (priv->mode != HW_RESET) 332aae03dc9SOleksij Rempel priv->irq = platform_get_irq(pdev, 0); 333aae03dc9SOleksij Rempel 334aae03dc9SOleksij Rempel if (priv->irq > 0) { 335aae03dc9SOleksij Rempel /* 336aae03dc9SOleksij Rempel * Not all supported platforms specify an interrupt for the 337aae03dc9SOleksij Rempel * watchdog, so let's make it optional. 338aae03dc9SOleksij Rempel */ 339*f57df835SGuenter Roeck ret = devm_request_irq(dev, priv->irq, asm9260_wdt_irq, 0, 340*f57df835SGuenter Roeck pdev->name, priv); 341aae03dc9SOleksij Rempel if (ret < 0) 342*f57df835SGuenter Roeck dev_warn(dev, "failed to request IRQ\n"); 343aae03dc9SOleksij Rempel } 344aae03dc9SOleksij Rempel 34555dbe8f3SGuenter Roeck watchdog_set_restart_priority(wdd, 128); 34655dbe8f3SGuenter Roeck 347*f57df835SGuenter Roeck watchdog_stop_on_reboot(wdd); 348*f57df835SGuenter Roeck watchdog_stop_on_unregister(wdd); 349*f57df835SGuenter Roeck ret = devm_watchdog_register_device(dev, wdd); 350aae03dc9SOleksij Rempel if (ret) 351*f57df835SGuenter Roeck return ret; 352aae03dc9SOleksij Rempel 353aae03dc9SOleksij Rempel platform_set_drvdata(pdev, priv); 354aae03dc9SOleksij Rempel 355*f57df835SGuenter Roeck dev_info(dev, "Watchdog enabled (timeout: %d sec, mode: %s)\n", 356aae03dc9SOleksij Rempel wdd->timeout, mode_name[priv->mode]); 357aae03dc9SOleksij Rempel return 0; 358aae03dc9SOleksij Rempel } 359aae03dc9SOleksij Rempel 360aae03dc9SOleksij Rempel static const struct of_device_id asm9260_wdt_of_match[] = { 361aae03dc9SOleksij Rempel { .compatible = "alphascale,asm9260-wdt"}, 362aae03dc9SOleksij Rempel {}, 363aae03dc9SOleksij Rempel }; 364aae03dc9SOleksij Rempel MODULE_DEVICE_TABLE(of, asm9260_wdt_of_match); 365aae03dc9SOleksij Rempel 366aae03dc9SOleksij Rempel static struct platform_driver asm9260_wdt_driver = { 367aae03dc9SOleksij Rempel .driver = { 368aae03dc9SOleksij Rempel .name = "asm9260-wdt", 369aae03dc9SOleksij Rempel .of_match_table = asm9260_wdt_of_match, 370aae03dc9SOleksij Rempel }, 371aae03dc9SOleksij Rempel .probe = asm9260_wdt_probe, 372aae03dc9SOleksij Rempel }; 373aae03dc9SOleksij Rempel module_platform_driver(asm9260_wdt_driver); 374aae03dc9SOleksij Rempel 375aae03dc9SOleksij Rempel MODULE_DESCRIPTION("asm9260 WatchDog Timer Driver"); 376aae03dc9SOleksij Rempel MODULE_AUTHOR("Oleksij Rempel <linux@rempel-privat.de>"); 377aae03dc9SOleksij Rempel MODULE_LICENSE("GPL"); 378