pcwd_pci.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. /*
  2. * Berkshire PCI-PC Watchdog Card Driver
  3. *
  4. * (c) Copyright 2003 Wim Van Sebroeck <wim@iguana.be>.
  5. *
  6. * Based on source code of the following authors:
  7. * Ken Hollis <kenji@bitgate.com>,
  8. * Lindsay Harris <lindsay@bluegum.com>,
  9. * Alan Cox <alan@redhat.com>,
  10. * Matt Domsch <Matt_Domsch@dell.com>,
  11. * Rob Radez <rob@osinvestor.com>
  12. *
  13. * This program is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU General Public License
  15. * as published by the Free Software Foundation; either version
  16. * 2 of the License, or (at your option) any later version.
  17. *
  18. * Neither Wim Van Sebroeck nor Iguana vzw. admit liability nor
  19. * provide warranty for any of this software. This material is
  20. * provided "AS-IS" and at no charge.
  21. */
  22. /*
  23. * A bells and whistles driver is available from http://www.pcwd.de/
  24. * More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/
  25. */
  26. /*
  27. * Includes, defines, variables, module parameters, ...
  28. */
  29. #include <linux/config.h>
  30. #include <linux/module.h>
  31. #include <linux/moduleparam.h>
  32. #include <linux/types.h>
  33. #include <linux/delay.h>
  34. #include <linux/miscdevice.h>
  35. #include <linux/watchdog.h>
  36. #include <linux/notifier.h>
  37. #include <linux/reboot.h>
  38. #include <linux/init.h>
  39. #include <linux/fs.h>
  40. #include <linux/pci.h>
  41. #include <linux/ioport.h>
  42. #include <linux/spinlock.h>
  43. #include <asm/uaccess.h>
  44. #include <asm/io.h>
  45. /* Module and version information */
  46. #define WATCHDOG_VERSION "1.01"
  47. #define WATCHDOG_DATE "15 Mar 2005"
  48. #define WATCHDOG_DRIVER_NAME "PCI-PC Watchdog"
  49. #define WATCHDOG_NAME "pcwd_pci"
  50. #define PFX WATCHDOG_NAME ": "
  51. #define DRIVER_VERSION WATCHDOG_DRIVER_NAME " driver, v" WATCHDOG_VERSION " (" WATCHDOG_DATE ")\n"
  52. /* Stuff for the PCI ID's */
  53. #ifndef PCI_VENDOR_ID_QUICKLOGIC
  54. #define PCI_VENDOR_ID_QUICKLOGIC 0x11e3
  55. #endif
  56. #ifndef PCI_DEVICE_ID_WATCHDOG_PCIPCWD
  57. #define PCI_DEVICE_ID_WATCHDOG_PCIPCWD 0x5030
  58. #endif
  59. /*
  60. * These are the defines that describe the control status bits for the
  61. * PCI-PC Watchdog card.
  62. */
  63. #define WD_PCI_WTRP 0x01 /* Watchdog Trip status */
  64. #define WD_PCI_HRBT 0x02 /* Watchdog Heartbeat */
  65. #define WD_PCI_TTRP 0x04 /* Temperature Trip status */
  66. /* according to documentation max. time to process a command for the pci
  67. * watchdog card is 100 ms, so we give it 150 ms to do it's job */
  68. #define PCI_COMMAND_TIMEOUT 150
  69. /* Watchdog's internal commands */
  70. #define CMD_GET_STATUS 0x04
  71. #define CMD_GET_FIRMWARE_VERSION 0x08
  72. #define CMD_READ_WATCHDOG_TIMEOUT 0x18
  73. #define CMD_WRITE_WATCHDOG_TIMEOUT 0x19
  74. /* We can only use 1 card due to the /dev/watchdog restriction */
  75. static int cards_found;
  76. /* internal variables */
  77. static int temp_panic;
  78. static unsigned long is_active;
  79. static char expect_release;
  80. static struct {
  81. int supports_temp; /* Wether or not the card has a temperature device */
  82. int boot_status; /* The card's boot status */
  83. unsigned long io_addr; /* The cards I/O address */
  84. spinlock_t io_lock;
  85. struct pci_dev *pdev;
  86. } pcipcwd_private;
  87. /* module parameters */
  88. #define WATCHDOG_HEARTBEAT 2 /* 2 sec default heartbeat */
  89. static int heartbeat = WATCHDOG_HEARTBEAT;
  90. module_param(heartbeat, int, 0);
  91. MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. (0<heartbeat<65536, default=" __MODULE_STRING(WATCHDOG_HEARTBEAT) ")");
  92. #ifdef CONFIG_WATCHDOG_NOWAYOUT
  93. static int nowayout = 1;
  94. #else
  95. static int nowayout = 0;
  96. #endif
  97. module_param(nowayout, int, 0);
  98. MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
  99. /*
  100. * Internal functions
  101. */
  102. static int send_command(int cmd, int *msb, int *lsb)
  103. {
  104. int got_response, count;
  105. spin_lock(&pcipcwd_private.io_lock);
  106. /* If a command requires data it should be written first.
  107. * Data for commands with 8 bits of data should be written to port 4.
  108. * Commands with 16 bits of data, should be written as LSB to port 4
  109. * and MSB to port 5.
  110. * After the required data has been written then write the command to
  111. * port 6. */
  112. outb_p(*lsb, pcipcwd_private.io_addr + 4);
  113. outb_p(*msb, pcipcwd_private.io_addr + 5);
  114. outb_p(cmd, pcipcwd_private.io_addr + 6);
  115. /* wait till the pci card processed the command, signaled by
  116. * the WRSP bit in port 2 and give it a max. timeout of
  117. * PCI_COMMAND_TIMEOUT to process */
  118. got_response = inb_p(pcipcwd_private.io_addr + 2) & 0x40;
  119. for (count = 0; (count < PCI_COMMAND_TIMEOUT) && (!got_response); count++) {
  120. mdelay(1);
  121. got_response = inb_p(pcipcwd_private.io_addr + 2) & 0x40;
  122. }
  123. if (got_response) {
  124. /* read back response */
  125. *lsb = inb_p(pcipcwd_private.io_addr + 4);
  126. *msb = inb_p(pcipcwd_private.io_addr + 5);
  127. /* clear WRSP bit */
  128. inb_p(pcipcwd_private.io_addr + 6);
  129. }
  130. spin_unlock(&pcipcwd_private.io_lock);
  131. return got_response;
  132. }
  133. static int pcipcwd_start(void)
  134. {
  135. int stat_reg;
  136. spin_lock(&pcipcwd_private.io_lock);
  137. outb_p(0x00, pcipcwd_private.io_addr + 3);
  138. udelay(1000);
  139. stat_reg = inb_p(pcipcwd_private.io_addr + 2);
  140. spin_unlock(&pcipcwd_private.io_lock);
  141. if (stat_reg & 0x10) {
  142. printk(KERN_ERR PFX "Card timer not enabled\n");
  143. return -1;
  144. }
  145. return 0;
  146. }
  147. static int pcipcwd_stop(void)
  148. {
  149. int stat_reg;
  150. spin_lock(&pcipcwd_private.io_lock);
  151. outb_p(0xA5, pcipcwd_private.io_addr + 3);
  152. udelay(1000);
  153. outb_p(0xA5, pcipcwd_private.io_addr + 3);
  154. udelay(1000);
  155. stat_reg = inb_p(pcipcwd_private.io_addr + 2);
  156. spin_unlock(&pcipcwd_private.io_lock);
  157. if (!(stat_reg & 0x10)) {
  158. printk(KERN_ERR PFX "Card did not acknowledge disable attempt\n");
  159. return -1;
  160. }
  161. return 0;
  162. }
  163. static int pcipcwd_keepalive(void)
  164. {
  165. /* Re-trigger watchdog by writing to port 0 */
  166. outb_p(0x42, pcipcwd_private.io_addr);
  167. return 0;
  168. }
  169. static int pcipcwd_set_heartbeat(int t)
  170. {
  171. int t_msb = t / 256;
  172. int t_lsb = t % 256;
  173. if ((t < 0x0001) || (t > 0xFFFF))
  174. return -EINVAL;
  175. /* Write new heartbeat to watchdog */
  176. send_command(CMD_WRITE_WATCHDOG_TIMEOUT, &t_msb, &t_lsb);
  177. heartbeat = t;
  178. return 0;
  179. }
  180. static int pcipcwd_get_status(int *status)
  181. {
  182. int new_status;
  183. *status=0;
  184. new_status = inb_p(pcipcwd_private.io_addr + 1);
  185. if (new_status & WD_PCI_WTRP)
  186. *status |= WDIOF_CARDRESET;
  187. if (new_status & WD_PCI_TTRP) {
  188. *status |= WDIOF_OVERHEAT;
  189. if (temp_panic)
  190. panic(PFX "Temperature overheat trip!\n");
  191. }
  192. return 0;
  193. }
  194. static int pcipcwd_clear_status(void)
  195. {
  196. outb_p(0x01, pcipcwd_private.io_addr + 1);
  197. return 0;
  198. }
  199. static int pcipcwd_get_temperature(int *temperature)
  200. {
  201. *temperature = 0;
  202. if (!pcipcwd_private.supports_temp)
  203. return -ENODEV;
  204. /*
  205. * Convert celsius to fahrenheit, since this was
  206. * the decided 'standard' for this return value.
  207. */
  208. *temperature = ((inb_p(pcipcwd_private.io_addr)) * 9 / 5) + 32;
  209. return 0;
  210. }
  211. /*
  212. * /dev/watchdog handling
  213. */
  214. static ssize_t pcipcwd_write(struct file *file, const char __user *data,
  215. size_t len, loff_t *ppos)
  216. {
  217. /* See if we got the magic character 'V' and reload the timer */
  218. if (len) {
  219. if (!nowayout) {
  220. size_t i;
  221. /* note: just in case someone wrote the magic character
  222. * five months ago... */
  223. expect_release = 0;
  224. /* scan to see whether or not we got the magic character */
  225. for (i = 0; i != len; i++) {
  226. char c;
  227. if(get_user(c, data+i))
  228. return -EFAULT;
  229. if (c == 'V')
  230. expect_release = 42;
  231. }
  232. }
  233. /* someone wrote to us, we should reload the timer */
  234. pcipcwd_keepalive();
  235. }
  236. return len;
  237. }
  238. static int pcipcwd_ioctl(struct inode *inode, struct file *file,
  239. unsigned int cmd, unsigned long arg)
  240. {
  241. void __user *argp = (void __user *)arg;
  242. int __user *p = argp;
  243. static struct watchdog_info ident = {
  244. .options = WDIOF_OVERHEAT |
  245. WDIOF_CARDRESET |
  246. WDIOF_KEEPALIVEPING |
  247. WDIOF_SETTIMEOUT |
  248. WDIOF_MAGICCLOSE,
  249. .firmware_version = 1,
  250. .identity = WATCHDOG_DRIVER_NAME,
  251. };
  252. switch (cmd) {
  253. case WDIOC_GETSUPPORT:
  254. return copy_to_user(argp, &ident,
  255. sizeof (ident)) ? -EFAULT : 0;
  256. case WDIOC_GETSTATUS:
  257. {
  258. int status;
  259. pcipcwd_get_status(&status);
  260. return put_user(status, p);
  261. }
  262. case WDIOC_GETBOOTSTATUS:
  263. return put_user(pcipcwd_private.boot_status, p);
  264. case WDIOC_GETTEMP:
  265. {
  266. int temperature;
  267. if (pcipcwd_get_temperature(&temperature))
  268. return -EFAULT;
  269. return put_user(temperature, p);
  270. }
  271. case WDIOC_KEEPALIVE:
  272. pcipcwd_keepalive();
  273. return 0;
  274. case WDIOC_SETOPTIONS:
  275. {
  276. int new_options, retval = -EINVAL;
  277. if (get_user (new_options, p))
  278. return -EFAULT;
  279. if (new_options & WDIOS_DISABLECARD) {
  280. pcipcwd_stop();
  281. retval = 0;
  282. }
  283. if (new_options & WDIOS_ENABLECARD) {
  284. pcipcwd_start();
  285. retval = 0;
  286. }
  287. if (new_options & WDIOS_TEMPPANIC) {
  288. temp_panic = 1;
  289. retval = 0;
  290. }
  291. return retval;
  292. }
  293. case WDIOC_SETTIMEOUT:
  294. {
  295. int new_heartbeat;
  296. if (get_user(new_heartbeat, p))
  297. return -EFAULT;
  298. if (pcipcwd_set_heartbeat(new_heartbeat))
  299. return -EINVAL;
  300. pcipcwd_keepalive();
  301. /* Fall */
  302. }
  303. case WDIOC_GETTIMEOUT:
  304. return put_user(heartbeat, p);
  305. default:
  306. return -ENOIOCTLCMD;
  307. }
  308. }
  309. static int pcipcwd_open(struct inode *inode, struct file *file)
  310. {
  311. /* /dev/watchdog can only be opened once */
  312. if (test_and_set_bit(0, &is_active))
  313. return -EBUSY;
  314. /* Activate */
  315. pcipcwd_start();
  316. pcipcwd_keepalive();
  317. return nonseekable_open(inode, file);
  318. }
  319. static int pcipcwd_release(struct inode *inode, struct file *file)
  320. {
  321. /*
  322. * Shut off the timer.
  323. */
  324. if (expect_release == 42) {
  325. pcipcwd_stop();
  326. } else {
  327. printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n");
  328. pcipcwd_keepalive();
  329. }
  330. expect_release = 0;
  331. clear_bit(0, &is_active);
  332. return 0;
  333. }
  334. /*
  335. * /dev/temperature handling
  336. */
  337. static ssize_t pcipcwd_temp_read(struct file *file, char __user *data,
  338. size_t len, loff_t *ppos)
  339. {
  340. int temperature;
  341. if (pcipcwd_get_temperature(&temperature))
  342. return -EFAULT;
  343. if (copy_to_user (data, &temperature, 1))
  344. return -EFAULT;
  345. return 1;
  346. }
  347. static int pcipcwd_temp_open(struct inode *inode, struct file *file)
  348. {
  349. if (!pcipcwd_private.supports_temp)
  350. return -ENODEV;
  351. return nonseekable_open(inode, file);
  352. }
  353. static int pcipcwd_temp_release(struct inode *inode, struct file *file)
  354. {
  355. return 0;
  356. }
  357. /*
  358. * Notify system
  359. */
  360. static int pcipcwd_notify_sys(struct notifier_block *this, unsigned long code, void *unused)
  361. {
  362. if (code==SYS_DOWN || code==SYS_HALT) {
  363. /* Turn the WDT off */
  364. pcipcwd_stop();
  365. }
  366. return NOTIFY_DONE;
  367. }
  368. /*
  369. * Kernel Interfaces
  370. */
  371. static struct file_operations pcipcwd_fops = {
  372. .owner = THIS_MODULE,
  373. .llseek = no_llseek,
  374. .write = pcipcwd_write,
  375. .ioctl = pcipcwd_ioctl,
  376. .open = pcipcwd_open,
  377. .release = pcipcwd_release,
  378. };
  379. static struct miscdevice pcipcwd_miscdev = {
  380. .minor = WATCHDOG_MINOR,
  381. .name = "watchdog",
  382. .fops = &pcipcwd_fops,
  383. };
  384. static struct file_operations pcipcwd_temp_fops = {
  385. .owner = THIS_MODULE,
  386. .llseek = no_llseek,
  387. .read = pcipcwd_temp_read,
  388. .open = pcipcwd_temp_open,
  389. .release = pcipcwd_temp_release,
  390. };
  391. static struct miscdevice pcipcwd_temp_miscdev = {
  392. .minor = TEMP_MINOR,
  393. .name = "temperature",
  394. .fops = &pcipcwd_temp_fops,
  395. };
  396. static struct notifier_block pcipcwd_notifier = {
  397. .notifier_call = pcipcwd_notify_sys,
  398. };
  399. /*
  400. * Init & exit routines
  401. */
  402. static inline void check_temperature_support(void)
  403. {
  404. if (inb_p(pcipcwd_private.io_addr) != 0xF0)
  405. pcipcwd_private.supports_temp = 1;
  406. }
  407. static int __devinit pcipcwd_card_init(struct pci_dev *pdev,
  408. const struct pci_device_id *ent)
  409. {
  410. int ret = -EIO;
  411. int got_fw_rev, fw_rev_major, fw_rev_minor;
  412. char fw_ver_str[20];
  413. char option_switches;
  414. cards_found++;
  415. if (cards_found == 1)
  416. printk(KERN_INFO PFX DRIVER_VERSION);
  417. if (cards_found > 1) {
  418. printk(KERN_ERR PFX "This driver only supports 1 device\n");
  419. return -ENODEV;
  420. }
  421. if (pci_enable_device(pdev)) {
  422. printk(KERN_ERR PFX "Not possible to enable PCI Device\n");
  423. return -ENODEV;
  424. }
  425. if (pci_resource_start(pdev, 0) == 0x0000) {
  426. printk(KERN_ERR PFX "No I/O-Address for card detected\n");
  427. ret = -ENODEV;
  428. goto err_out_disable_device;
  429. }
  430. pcipcwd_private.pdev = pdev;
  431. pcipcwd_private.io_addr = pci_resource_start(pdev, 0);
  432. if (pci_request_regions(pdev, WATCHDOG_NAME)) {
  433. printk(KERN_ERR PFX "I/O address 0x%04x already in use\n",
  434. (int) pcipcwd_private.io_addr);
  435. ret = -EIO;
  436. goto err_out_disable_device;
  437. }
  438. /* get the boot_status */
  439. pcipcwd_get_status(&pcipcwd_private.boot_status);
  440. /* clear the "card caused reboot" flag */
  441. pcipcwd_clear_status();
  442. /* disable card */
  443. pcipcwd_stop();
  444. /* Check whether or not the card supports the temperature device */
  445. check_temperature_support();
  446. /* Get the Firmware Version */
  447. got_fw_rev = send_command(CMD_GET_FIRMWARE_VERSION, &fw_rev_major, &fw_rev_minor);
  448. if (got_fw_rev) {
  449. sprintf(fw_ver_str, "%u.%02u", fw_rev_major, fw_rev_minor);
  450. } else {
  451. sprintf(fw_ver_str, "<card no answer>");
  452. }
  453. /* Get switch settings */
  454. option_switches = inb_p(pcipcwd_private.io_addr + 3);
  455. printk(KERN_INFO PFX "Found card at port 0x%04x (Firmware: %s) %s temp option\n",
  456. (int) pcipcwd_private.io_addr, fw_ver_str,
  457. (pcipcwd_private.supports_temp ? "with" : "without"));
  458. printk(KERN_INFO PFX "Option switches (0x%02x): Temperature Reset Enable=%s, Power On Delay=%s\n",
  459. option_switches,
  460. ((option_switches & 0x10) ? "ON" : "OFF"),
  461. ((option_switches & 0x08) ? "ON" : "OFF"));
  462. if (pcipcwd_private.boot_status & WDIOF_CARDRESET)
  463. printk(KERN_INFO PFX "Previous reset was caused by the Watchdog card\n");
  464. if (pcipcwd_private.boot_status & WDIOF_OVERHEAT)
  465. printk(KERN_INFO PFX "Card sensed a CPU Overheat\n");
  466. if (pcipcwd_private.boot_status == 0)
  467. printk(KERN_INFO PFX "No previous trip detected - Cold boot or reset\n");
  468. /* Check that the heartbeat value is within it's range ; if not reset to the default */
  469. if (pcipcwd_set_heartbeat(heartbeat)) {
  470. pcipcwd_set_heartbeat(WATCHDOG_HEARTBEAT);
  471. printk(KERN_INFO PFX "heartbeat value must be 0<heartbeat<65536, using %d\n",
  472. WATCHDOG_HEARTBEAT);
  473. }
  474. ret = register_reboot_notifier(&pcipcwd_notifier);
  475. if (ret != 0) {
  476. printk(KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",
  477. ret);
  478. goto err_out_release_region;
  479. }
  480. if (pcipcwd_private.supports_temp) {
  481. ret = misc_register(&pcipcwd_temp_miscdev);
  482. if (ret != 0) {
  483. printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
  484. TEMP_MINOR, ret);
  485. goto err_out_unregister_reboot;
  486. }
  487. }
  488. ret = misc_register(&pcipcwd_miscdev);
  489. if (ret != 0) {
  490. printk(KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
  491. WATCHDOG_MINOR, ret);
  492. goto err_out_misc_deregister;
  493. }
  494. printk(KERN_INFO PFX "initialized. heartbeat=%d sec (nowayout=%d)\n",
  495. heartbeat, nowayout);
  496. return 0;
  497. err_out_misc_deregister:
  498. if (pcipcwd_private.supports_temp)
  499. misc_deregister(&pcipcwd_temp_miscdev);
  500. err_out_unregister_reboot:
  501. unregister_reboot_notifier(&pcipcwd_notifier);
  502. err_out_release_region:
  503. pci_release_regions(pdev);
  504. err_out_disable_device:
  505. pci_disable_device(pdev);
  506. return ret;
  507. }
  508. static void __devexit pcipcwd_card_exit(struct pci_dev *pdev)
  509. {
  510. /* Stop the timer before we leave */
  511. if (!nowayout)
  512. pcipcwd_stop();
  513. /* Deregister */
  514. misc_deregister(&pcipcwd_miscdev);
  515. if (pcipcwd_private.supports_temp)
  516. misc_deregister(&pcipcwd_temp_miscdev);
  517. unregister_reboot_notifier(&pcipcwd_notifier);
  518. pci_release_regions(pdev);
  519. pci_disable_device(pdev);
  520. cards_found--;
  521. }
  522. static struct pci_device_id pcipcwd_pci_tbl[] = {
  523. { PCI_VENDOR_ID_QUICKLOGIC, PCI_DEVICE_ID_WATCHDOG_PCIPCWD,
  524. PCI_ANY_ID, PCI_ANY_ID, },
  525. { 0 }, /* End of list */
  526. };
  527. MODULE_DEVICE_TABLE(pci, pcipcwd_pci_tbl);
  528. static struct pci_driver pcipcwd_driver = {
  529. .name = WATCHDOG_NAME,
  530. .id_table = pcipcwd_pci_tbl,
  531. .probe = pcipcwd_card_init,
  532. .remove = __devexit_p(pcipcwd_card_exit),
  533. };
  534. static int __init pcipcwd_init_module(void)
  535. {
  536. spin_lock_init (&pcipcwd_private.io_lock);
  537. return pci_register_driver(&pcipcwd_driver);
  538. }
  539. static void __exit pcipcwd_cleanup_module(void)
  540. {
  541. pci_unregister_driver(&pcipcwd_driver);
  542. }
  543. module_init(pcipcwd_init_module);
  544. module_exit(pcipcwd_cleanup_module);
  545. MODULE_AUTHOR("Wim Van Sebroeck <wim@iguana.be>");
  546. MODULE_DESCRIPTION("Berkshire PCI-PC Watchdog driver");
  547. MODULE_LICENSE("GPL");
  548. MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
  549. MODULE_ALIAS_MISCDEV(TEMP_MINOR);