at91sam9_wdt.c (9a64e8e0ace51b309fdcff4b4754b3649250382a) | at91sam9_wdt.c (be49bbae13ba9128ac69dd4b98027f6412155abe) |
---|---|
1/* 2 * Watchdog driver for Atmel AT91SAM9x processors. 3 * 4 * Copyright (C) 2008 Renaud CERRATO r.cerrato@til-technologies.fr 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 18 unchanged lines hidden (view full) --- 27#include <linux/moduleparam.h> 28#include <linux/platform_device.h> 29#include <linux/types.h> 30#include <linux/watchdog.h> 31#include <linux/jiffies.h> 32#include <linux/timer.h> 33#include <linux/bitops.h> 34#include <linux/uaccess.h> | 1/* 2 * Watchdog driver for Atmel AT91SAM9x processors. 3 * 4 * Copyright (C) 2008 Renaud CERRATO r.cerrato@til-technologies.fr 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version --- 18 unchanged lines hidden (view full) --- 27#include <linux/moduleparam.h> 28#include <linux/platform_device.h> 29#include <linux/types.h> 30#include <linux/watchdog.h> 31#include <linux/jiffies.h> 32#include <linux/timer.h> 33#include <linux/bitops.h> 34#include <linux/uaccess.h> |
35#include <linux/of.h> |
|
35 36#include "at91sam9_wdt.h" 37 38#define DRV_NAME "AT91SAM9 Watchdog" 39 40#define wdt_read(field) \ 41 __raw_readl(at91wdt_private.base + field) 42#define wdt_write(field, val) \ --- 254 unchanged lines hidden (view full) --- 297 298 res = misc_deregister(&at91wdt_miscdev); 299 if (!res) 300 at91wdt_miscdev.parent = NULL; 301 302 return res; 303} 304 | 36 37#include "at91sam9_wdt.h" 38 39#define DRV_NAME "AT91SAM9 Watchdog" 40 41#define wdt_read(field) \ 42 __raw_readl(at91wdt_private.base + field) 43#define wdt_write(field, val) \ --- 254 unchanged lines hidden (view full) --- 298 299 res = misc_deregister(&at91wdt_miscdev); 300 if (!res) 301 at91wdt_miscdev.parent = NULL; 302 303 return res; 304} 305 |
306#if defined(CONFIG_OF) 307static const struct of_device_id at91_wdt_dt_ids[] __initconst = { 308 { .compatible = "atmel,at91sam9260-wdt" }, 309 { /* sentinel */ } 310}; 311 312MODULE_DEVICE_TABLE(of, at91_wdt_dt_ids); 313#endif 314 |
|
305static struct platform_driver at91wdt_driver = { 306 .remove = __exit_p(at91wdt_remove), 307 .driver = { 308 .name = "at91_wdt", 309 .owner = THIS_MODULE, | 315static struct platform_driver at91wdt_driver = { 316 .remove = __exit_p(at91wdt_remove), 317 .driver = { 318 .name = "at91_wdt", 319 .owner = THIS_MODULE, |
320 .of_match_table = of_match_ptr(at91_wdt_dt_ids), |
|
310 }, 311}; 312 313static int __init at91sam_wdt_init(void) 314{ 315 return platform_driver_probe(&at91wdt_driver, at91wdt_probe); 316} 317 --- 12 unchanged lines hidden --- | 321 }, 322}; 323 324static int __init at91sam_wdt_init(void) 325{ 326 return platform_driver_probe(&at91wdt_driver, at91wdt_probe); 327} 328 --- 12 unchanged lines hidden --- |