diff options
| -rw-r--r-- | Documentation/watchdog/src/watchdog-simple.c | 3 | ||||
| -rw-r--r-- | Documentation/watchdog/src/watchdog-test.c | 8 | ||||
| -rw-r--r-- | Documentation/watchdog/watchdog-api.txt | 5 | ||||
| -rw-r--r-- | drivers/watchdog/Kconfig | 11 | ||||
| -rw-r--r-- | drivers/watchdog/hpwdt.c | 2 | ||||
| -rw-r--r-- | drivers/watchdog/iTCO_wdt.c | 99 | ||||
| -rw-r--r-- | drivers/watchdog/pika_wdt.c | 2 |
7 files changed, 109 insertions, 21 deletions
diff --git a/Documentation/watchdog/src/watchdog-simple.c b/Documentation/watchdog/src/watchdog-simple.c index 4cf72f3fa8e9..ba45803a2216 100644 --- a/Documentation/watchdog/src/watchdog-simple.c +++ b/Documentation/watchdog/src/watchdog-simple.c | |||
| @@ -17,9 +17,6 @@ int main(void) | |||
| 17 | ret = -1; | 17 | ret = -1; |
| 18 | break; | 18 | break; |
| 19 | } | 19 | } |
| 20 | ret = fsync(fd); | ||
| 21 | if (ret) | ||
| 22 | break; | ||
| 23 | sleep(10); | 20 | sleep(10); |
| 24 | } | 21 | } |
| 25 | close(fd); | 22 | close(fd); |
diff --git a/Documentation/watchdog/src/watchdog-test.c b/Documentation/watchdog/src/watchdog-test.c index a750532ffcf8..63fdc34ceb98 100644 --- a/Documentation/watchdog/src/watchdog-test.c +++ b/Documentation/watchdog/src/watchdog-test.c | |||
| @@ -31,6 +31,8 @@ static void keep_alive(void) | |||
| 31 | */ | 31 | */ |
| 32 | int main(int argc, char *argv[]) | 32 | int main(int argc, char *argv[]) |
| 33 | { | 33 | { |
| 34 | int flags; | ||
| 35 | |||
| 34 | fd = open("/dev/watchdog", O_WRONLY); | 36 | fd = open("/dev/watchdog", O_WRONLY); |
| 35 | 37 | ||
| 36 | if (fd == -1) { | 38 | if (fd == -1) { |
| @@ -41,12 +43,14 @@ int main(int argc, char *argv[]) | |||
| 41 | 43 | ||
| 42 | if (argc > 1) { | 44 | if (argc > 1) { |
| 43 | if (!strncasecmp(argv[1], "-d", 2)) { | 45 | if (!strncasecmp(argv[1], "-d", 2)) { |
| 44 | ioctl(fd, WDIOC_SETOPTIONS, WDIOS_DISABLECARD); | 46 | flags = WDIOS_DISABLECARD; |
| 47 | ioctl(fd, WDIOC_SETOPTIONS, &flags); | ||
| 45 | fprintf(stderr, "Watchdog card disabled.\n"); | 48 | fprintf(stderr, "Watchdog card disabled.\n"); |
| 46 | fflush(stderr); | 49 | fflush(stderr); |
| 47 | exit(0); | 50 | exit(0); |
| 48 | } else if (!strncasecmp(argv[1], "-e", 2)) { | 51 | } else if (!strncasecmp(argv[1], "-e", 2)) { |
| 49 | ioctl(fd, WDIOC_SETOPTIONS, WDIOS_ENABLECARD); | 52 | flags = WDIOS_ENABLECARD; |
| 53 | ioctl(fd, WDIOC_SETOPTIONS, &flags); | ||
| 50 | fprintf(stderr, "Watchdog card enabled.\n"); | 54 | fprintf(stderr, "Watchdog card enabled.\n"); |
| 51 | fflush(stderr); | 55 | fflush(stderr); |
| 52 | exit(0); | 56 | exit(0); |
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt index 4cc4ba9d7150..eb7132ed8bbc 100644 --- a/Documentation/watchdog/watchdog-api.txt +++ b/Documentation/watchdog/watchdog-api.txt | |||
| @@ -222,11 +222,10 @@ returned value is the temperature in degrees fahrenheit. | |||
| 222 | ioctl(fd, WDIOC_GETTEMP, &temperature); | 222 | ioctl(fd, WDIOC_GETTEMP, &temperature); |
| 223 | 223 | ||
| 224 | Finally the SETOPTIONS ioctl can be used to control some aspects of | 224 | Finally the SETOPTIONS ioctl can be used to control some aspects of |
| 225 | the cards operation; right now the pcwd driver is the only one | 225 | the cards operation. |
| 226 | supporting this ioctl. | ||
| 227 | 226 | ||
| 228 | int options = 0; | 227 | int options = 0; |
| 229 | ioctl(fd, WDIOC_SETOPTIONS, options); | 228 | ioctl(fd, WDIOC_SETOPTIONS, &options); |
| 230 | 229 | ||
| 231 | The following options are available: | 230 | The following options are available: |
| 232 | 231 | ||
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index bdcdbd53da89..0e8468ffd100 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
| @@ -55,11 +55,6 @@ config SOFT_WATCHDOG | |||
| 55 | To compile this driver as a module, choose M here: the | 55 | To compile this driver as a module, choose M here: the |
| 56 | module will be called softdog. | 56 | module will be called softdog. |
| 57 | 57 | ||
| 58 | config MAX63XX_WATCHDOG | ||
| 59 | tristate "Max63xx watchdog" | ||
| 60 | help | ||
| 61 | Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. | ||
| 62 | |||
| 63 | config WM831X_WATCHDOG | 58 | config WM831X_WATCHDOG |
| 64 | tristate "WM831x watchdog" | 59 | tristate "WM831x watchdog" |
| 65 | depends on MFD_WM831X | 60 | depends on MFD_WM831X |
| @@ -305,6 +300,12 @@ config TS72XX_WATCHDOG | |||
| 305 | To compile this driver as a module, choose M here: the | 300 | To compile this driver as a module, choose M here: the |
| 306 | module will be called ts72xx_wdt. | 301 | module will be called ts72xx_wdt. |
| 307 | 302 | ||
| 303 | config MAX63XX_WATCHDOG | ||
| 304 | tristate "Max63xx watchdog" | ||
| 305 | depends on ARM | ||
| 306 | help | ||
| 307 | Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. | ||
| 308 | |||
| 308 | # AVR32 Architecture | 309 | # AVR32 Architecture |
| 309 | 310 | ||
| 310 | config AT32AP700X_WDT | 311 | config AT32AP700X_WDT |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 72f5a3707b48..809e7167a624 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
| @@ -442,7 +442,7 @@ static void hpwdt_ping(void) | |||
| 442 | static int hpwdt_change_timer(int new_margin) | 442 | static int hpwdt_change_timer(int new_margin) |
| 443 | { | 443 | { |
| 444 | /* Arbitrary, can't find the card's limits */ | 444 | /* Arbitrary, can't find the card's limits */ |
| 445 | if (new_margin < 30 || new_margin > 600) { | 445 | if (new_margin < 5 || new_margin > 600) { |
| 446 | printk(KERN_WARNING | 446 | printk(KERN_WARNING |
| 447 | "hpwdt: New value passed in is invalid: %d seconds.\n", | 447 | "hpwdt: New value passed in is invalid: %d seconds.\n", |
| 448 | new_margin); | 448 | new_margin); |
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index 44bc6aa46edf..8da886035374 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c | |||
| @@ -115,8 +115,37 @@ enum iTCO_chipsets { | |||
| 115 | TCO_3420, /* 3420 */ | 115 | TCO_3420, /* 3420 */ |
| 116 | TCO_3450, /* 3450 */ | 116 | TCO_3450, /* 3450 */ |
| 117 | TCO_EP80579, /* EP80579 */ | 117 | TCO_EP80579, /* EP80579 */ |
| 118 | TCO_CPTD, /* CPT Desktop */ | 118 | TCO_CPT1, /* Cougar Point */ |
| 119 | TCO_CPTM, /* CPT Mobile */ | 119 | TCO_CPT2, /* Cougar Point Desktop */ |
| 120 | TCO_CPT3, /* Cougar Point Mobile */ | ||
| 121 | TCO_CPT4, /* Cougar Point */ | ||
| 122 | TCO_CPT5, /* Cougar Point */ | ||
| 123 | TCO_CPT6, /* Cougar Point */ | ||
| 124 | TCO_CPT7, /* Cougar Point */ | ||
| 125 | TCO_CPT8, /* Cougar Point */ | ||
| 126 | TCO_CPT9, /* Cougar Point */ | ||
| 127 | TCO_CPT10, /* Cougar Point */ | ||
| 128 | TCO_CPT11, /* Cougar Point */ | ||
| 129 | TCO_CPT12, /* Cougar Point */ | ||
| 130 | TCO_CPT13, /* Cougar Point */ | ||
| 131 | TCO_CPT14, /* Cougar Point */ | ||
| 132 | TCO_CPT15, /* Cougar Point */ | ||
| 133 | TCO_CPT16, /* Cougar Point */ | ||
| 134 | TCO_CPT17, /* Cougar Point */ | ||
| 135 | TCO_CPT18, /* Cougar Point */ | ||
| 136 | TCO_CPT19, /* Cougar Point */ | ||
| 137 | TCO_CPT20, /* Cougar Point */ | ||
| 138 | TCO_CPT21, /* Cougar Point */ | ||
| 139 | TCO_CPT22, /* Cougar Point */ | ||
| 140 | TCO_CPT23, /* Cougar Point */ | ||
| 141 | TCO_CPT24, /* Cougar Point */ | ||
| 142 | TCO_CPT25, /* Cougar Point */ | ||
| 143 | TCO_CPT26, /* Cougar Point */ | ||
| 144 | TCO_CPT27, /* Cougar Point */ | ||
| 145 | TCO_CPT28, /* Cougar Point */ | ||
| 146 | TCO_CPT29, /* Cougar Point */ | ||
| 147 | TCO_CPT30, /* Cougar Point */ | ||
| 148 | TCO_CPT31, /* Cougar Point */ | ||
| 120 | }; | 149 | }; |
| 121 | 150 | ||
| 122 | static struct { | 151 | static struct { |
| @@ -173,8 +202,37 @@ static struct { | |||
| 173 | {"3420", 2}, | 202 | {"3420", 2}, |
| 174 | {"3450", 2}, | 203 | {"3450", 2}, |
| 175 | {"EP80579", 2}, | 204 | {"EP80579", 2}, |
| 176 | {"CPT Desktop", 2}, | 205 | {"Cougar Point", 2}, |
| 177 | {"CPT Mobile", 2}, | 206 | {"Cougar Point", 2}, |
| 207 | {"Cougar Point", 2}, | ||
| 208 | {"Cougar Point", 2}, | ||
| 209 | {"Cougar Point", 2}, | ||
| 210 | {"Cougar Point", 2}, | ||
| 211 | {"Cougar Point", 2}, | ||
| 212 | {"Cougar Point", 2}, | ||
| 213 | {"Cougar Point", 2}, | ||
| 214 | {"Cougar Point", 2}, | ||
| 215 | {"Cougar Point", 2}, | ||
| 216 | {"Cougar Point", 2}, | ||
| 217 | {"Cougar Point", 2}, | ||
| 218 | {"Cougar Point", 2}, | ||
| 219 | {"Cougar Point", 2}, | ||
| 220 | {"Cougar Point", 2}, | ||
| 221 | {"Cougar Point", 2}, | ||
| 222 | {"Cougar Point", 2}, | ||
| 223 | {"Cougar Point", 2}, | ||
| 224 | {"Cougar Point", 2}, | ||
| 225 | {"Cougar Point", 2}, | ||
| 226 | {"Cougar Point", 2}, | ||
| 227 | {"Cougar Point", 2}, | ||
| 228 | {"Cougar Point", 2}, | ||
| 229 | {"Cougar Point", 2}, | ||
| 230 | {"Cougar Point", 2}, | ||
| 231 | {"Cougar Point", 2}, | ||
| 232 | {"Cougar Point", 2}, | ||
| 233 | {"Cougar Point", 2}, | ||
| 234 | {"Cougar Point", 2}, | ||
| 235 | {"Cougar Point", 2}, | ||
| 178 | {NULL, 0} | 236 | {NULL, 0} |
| 179 | }; | 237 | }; |
| 180 | 238 | ||
| @@ -259,8 +317,37 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = { | |||
| 259 | { ITCO_PCI_DEVICE(0x3b14, TCO_3420)}, | 317 | { ITCO_PCI_DEVICE(0x3b14, TCO_3420)}, |
| 260 | { ITCO_PCI_DEVICE(0x3b16, TCO_3450)}, | 318 | { ITCO_PCI_DEVICE(0x3b16, TCO_3450)}, |
| 261 | { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)}, | 319 | { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)}, |
| 262 | { ITCO_PCI_DEVICE(0x1c42, TCO_CPTD)}, | 320 | { ITCO_PCI_DEVICE(0x1c41, TCO_CPT1)}, |
| 263 | { ITCO_PCI_DEVICE(0x1c43, TCO_CPTM)}, | 321 | { ITCO_PCI_DEVICE(0x1c42, TCO_CPT2)}, |
| 322 | { ITCO_PCI_DEVICE(0x1c43, TCO_CPT3)}, | ||
| 323 | { ITCO_PCI_DEVICE(0x1c44, TCO_CPT4)}, | ||
| 324 | { ITCO_PCI_DEVICE(0x1c45, TCO_CPT5)}, | ||
| 325 | { ITCO_PCI_DEVICE(0x1c46, TCO_CPT6)}, | ||
| 326 | { ITCO_PCI_DEVICE(0x1c47, TCO_CPT7)}, | ||
| 327 | { ITCO_PCI_DEVICE(0x1c48, TCO_CPT8)}, | ||
| 328 | { ITCO_PCI_DEVICE(0x1c49, TCO_CPT9)}, | ||
| 329 | { ITCO_PCI_DEVICE(0x1c4a, TCO_CPT10)}, | ||
| 330 | { ITCO_PCI_DEVICE(0x1c4b, TCO_CPT11)}, | ||
| 331 | { ITCO_PCI_DEVICE(0x1c4c, TCO_CPT12)}, | ||
| 332 | { ITCO_PCI_DEVICE(0x1c4d, TCO_CPT13)}, | ||
| 333 | { ITCO_PCI_DEVICE(0x1c4e, TCO_CPT14)}, | ||
| 334 | { ITCO_PCI_DEVICE(0x1c4f, TCO_CPT15)}, | ||
| 335 | { ITCO_PCI_DEVICE(0x1c50, TCO_CPT16)}, | ||
| 336 | { ITCO_PCI_DEVICE(0x1c51, TCO_CPT17)}, | ||
| 337 | { ITCO_PCI_DEVICE(0x1c52, TCO_CPT18)}, | ||
| 338 | { ITCO_PCI_DEVICE(0x1c53, TCO_CPT19)}, | ||
| 339 | { ITCO_PCI_DEVICE(0x1c54, TCO_CPT20)}, | ||
| 340 | { ITCO_PCI_DEVICE(0x1c55, TCO_CPT21)}, | ||
| 341 | { ITCO_PCI_DEVICE(0x1c56, TCO_CPT22)}, | ||
| 342 | { ITCO_PCI_DEVICE(0x1c57, TCO_CPT23)}, | ||
| 343 | { ITCO_PCI_DEVICE(0x1c58, TCO_CPT24)}, | ||
| 344 | { ITCO_PCI_DEVICE(0x1c59, TCO_CPT25)}, | ||
| 345 | { ITCO_PCI_DEVICE(0x1c5a, TCO_CPT26)}, | ||
| 346 | { ITCO_PCI_DEVICE(0x1c5b, TCO_CPT27)}, | ||
| 347 | { ITCO_PCI_DEVICE(0x1c5c, TCO_CPT28)}, | ||
| 348 | { ITCO_PCI_DEVICE(0x1c5d, TCO_CPT29)}, | ||
| 349 | { ITCO_PCI_DEVICE(0x1c5e, TCO_CPT30)}, | ||
| 350 | { ITCO_PCI_DEVICE(0x1c5f, TCO_CPT31)}, | ||
| 264 | { 0, }, /* End of list */ | 351 | { 0, }, /* End of list */ |
| 265 | }; | 352 | }; |
| 266 | MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); | 353 | MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); |
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c index 435ec2aed4fe..2d22e996e996 100644 --- a/drivers/watchdog/pika_wdt.c +++ b/drivers/watchdog/pika_wdt.c | |||
| @@ -52,7 +52,7 @@ static struct { | |||
| 52 | struct timer_list timer; /* The timer that pings the watchdog */ | 52 | struct timer_list timer; /* The timer that pings the watchdog */ |
| 53 | } pikawdt_private; | 53 | } pikawdt_private; |
| 54 | 54 | ||
| 55 | static const struct watchdog_info ident = { | 55 | static struct watchdog_info ident = { |
| 56 | .identity = DRV_NAME, | 56 | .identity = DRV_NAME, |
| 57 | .options = WDIOF_CARDRESET | | 57 | .options = WDIOF_CARDRESET | |
| 58 | WDIOF_SETTIMEOUT | | 58 | WDIOF_SETTIMEOUT | |
