diff options
| -rw-r--r-- | Documentation/kernel-parameters.txt | 15 | ||||
| -rw-r--r-- | Documentation/watchdog/00-INDEX | 5 | ||||
| -rw-r--r-- | Documentation/watchdog/watchdog-parameters.txt | 390 | ||||
| -rw-r--r-- | Documentation/watchdog/wdt.txt | 15 | ||||
| -rw-r--r-- | drivers/watchdog/Kconfig | 26 | ||||
| -rw-r--r-- | drivers/watchdog/Makefile | 1 | ||||
| -rw-r--r-- | drivers/watchdog/bfin_wdt.c | 19 | ||||
| -rw-r--r-- | drivers/watchdog/booke_wdt.c | 6 | ||||
| -rw-r--r-- | drivers/watchdog/eurotechwdt.c | 1 | ||||
| -rw-r--r-- | drivers/watchdog/iTCO_vendor_support.c | 11 | ||||
| -rw-r--r-- | drivers/watchdog/iTCO_wdt.c | 29 | ||||
| -rw-r--r-- | drivers/watchdog/imx2_wdt.c | 358 | ||||
| -rw-r--r-- | drivers/watchdog/mpc8xxx_wdt.c | 2 | ||||
| -rw-r--r-- | drivers/watchdog/pc87413_wdt.c | 9 | ||||
| -rw-r--r-- | drivers/watchdog/pnx833x_wdt.c | 11 | ||||
| -rw-r--r-- | drivers/watchdog/s3c2410_wdt.c | 9 | ||||
| -rw-r--r-- | drivers/watchdog/shwdt.c | 2 | ||||
| -rw-r--r-- | drivers/watchdog/twl4030_wdt.c | 2 | ||||
| -rw-r--r-- | drivers/watchdog/wdt.c | 2 | ||||
| -rw-r--r-- | drivers/watchdog/wdt977.c | 2 |
20 files changed, 839 insertions, 76 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index f5fce483930c..b56ea860da21 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -290,9 +290,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 290 | advansys= [HW,SCSI] | 290 | advansys= [HW,SCSI] |
| 291 | See header of drivers/scsi/advansys.c. | 291 | See header of drivers/scsi/advansys.c. |
| 292 | 292 | ||
| 293 | advwdt= [HW,WDT] Advantech WDT | ||
| 294 | Format: <iostart>,<iostop> | ||
| 295 | |||
| 296 | aedsp16= [HW,OSS] Audio Excel DSP 16 | 293 | aedsp16= [HW,OSS] Audio Excel DSP 16 |
| 297 | Format: <io>,<irq>,<dma>,<mss_io>,<mpu_io>,<mpu_irq> | 294 | Format: <io>,<irq>,<dma>,<mss_io>,<mpu_io>,<mpu_irq> |
| 298 | See also header of sound/oss/aedsp16.c. | 295 | See also header of sound/oss/aedsp16.c. |
| @@ -765,9 +762,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 765 | This option is obsoleted by the "netdev=" option, which | 762 | This option is obsoleted by the "netdev=" option, which |
| 766 | has equivalent usage. See its documentation for details. | 763 | has equivalent usage. See its documentation for details. |
| 767 | 764 | ||
| 768 | eurwdt= [HW,WDT] Eurotech CPU-1220/1410 onboard watchdog. | ||
| 769 | Format: <io>[,<irq>] | ||
| 770 | |||
| 771 | failslab= | 765 | failslab= |
| 772 | fail_page_alloc= | 766 | fail_page_alloc= |
| 773 | fail_make_request=[KNL] | 767 | fail_make_request=[KNL] |
| @@ -2267,9 +2261,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 2267 | 2261 | ||
| 2268 | sched_debug [KNL] Enables verbose scheduler debug messages. | 2262 | sched_debug [KNL] Enables verbose scheduler debug messages. |
| 2269 | 2263 | ||
| 2270 | sc1200wdt= [HW,WDT] SC1200 WDT (watchdog) driver | ||
| 2271 | Format: <io>[,<timeout>[,<isapnp>]] | ||
| 2272 | |||
| 2273 | scsi_debug_*= [SCSI] | 2264 | scsi_debug_*= [SCSI] |
| 2274 | See drivers/scsi/scsi_debug.c. | 2265 | See drivers/scsi/scsi_debug.c. |
| 2275 | 2266 | ||
| @@ -2858,8 +2849,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 2858 | wd7000= [HW,SCSI] | 2849 | wd7000= [HW,SCSI] |
| 2859 | See header of drivers/scsi/wd7000.c. | 2850 | See header of drivers/scsi/wd7000.c. |
| 2860 | 2851 | ||
| 2861 | wdt= [WDT] Watchdog | 2852 | watchdog timers [HW,WDT] For information on watchdog timers, |
| 2862 | See Documentation/watchdog/wdt.txt. | 2853 | see Documentation/watchdog/watchdog-parameters.txt |
| 2854 | or other driver-specific files in the | ||
| 2855 | Documentation/watchdog/ directory. | ||
| 2863 | 2856 | ||
| 2864 | x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of | 2857 | x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of |
| 2865 | default x2apic cluster mode on platforms | 2858 | default x2apic cluster mode on platforms |
diff --git a/Documentation/watchdog/00-INDEX b/Documentation/watchdog/00-INDEX index c3ea47e507fe..ee994513a9b1 100644 --- a/Documentation/watchdog/00-INDEX +++ b/Documentation/watchdog/00-INDEX | |||
| @@ -1,10 +1,15 @@ | |||
| 1 | 00-INDEX | 1 | 00-INDEX |
| 2 | - this file. | 2 | - this file. |
| 3 | hpwdt.txt | ||
| 4 | - information on the HP iLO2 NMI watchdog | ||
| 3 | pcwd-watchdog.txt | 5 | pcwd-watchdog.txt |
| 4 | - documentation for Berkshire Products PC Watchdog ISA cards. | 6 | - documentation for Berkshire Products PC Watchdog ISA cards. |
| 5 | src/ | 7 | src/ |
| 6 | - directory holding watchdog related example programs. | 8 | - directory holding watchdog related example programs. |
| 7 | watchdog-api.txt | 9 | watchdog-api.txt |
| 8 | - description of the Linux Watchdog driver API. | 10 | - description of the Linux Watchdog driver API. |
| 11 | watchdog-parameters.txt | ||
| 12 | - information on driver parameters (for drivers other than | ||
| 13 | the ones that have driver-specific files here) | ||
| 9 | wdt.txt | 14 | wdt.txt |
| 10 | - description of the Watchdog Timer Interfaces for Linux. | 15 | - description of the Watchdog Timer Interfaces for Linux. |
diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt new file mode 100644 index 000000000000..41c95cc1dc1f --- /dev/null +++ b/Documentation/watchdog/watchdog-parameters.txt | |||
| @@ -0,0 +1,390 @@ | |||
| 1 | This file provides information on the module parameters of many of | ||
| 2 | the Linux watchdog drivers. Watchdog driver parameter specs should | ||
| 3 | be listed here unless the driver has its own driver-specific information | ||
| 4 | file. | ||
| 5 | |||
| 6 | |||
| 7 | See Documentation/kernel-parameters.txt for information on | ||
| 8 | providing kernel parameters for builtin drivers versus loadable | ||
| 9 | modules. | ||
| 10 | |||
| 11 | |||
| 12 | ------------------------------------------------- | ||
| 13 | acquirewdt: | ||
| 14 | wdt_stop: Acquire WDT 'stop' io port (default 0x43) | ||
| 15 | wdt_start: Acquire WDT 'start' io port (default 0x443) | ||
| 16 | nowayout: Watchdog cannot be stopped once started | ||
| 17 | (default=kernel config parameter) | ||
| 18 | ------------------------------------------------- | ||
| 19 | advantechwdt: | ||
| 20 | wdt_stop: Advantech WDT 'stop' io port (default 0x443) | ||
| 21 | wdt_start: Advantech WDT 'start' io port (default 0x443) | ||
| 22 | timeout: Watchdog timeout in seconds. 1<= timeout <=63, default=60. | ||
| 23 | nowayout: Watchdog cannot be stopped once started | ||
| 24 | (default=kernel config parameter) | ||
| 25 | ------------------------------------------------- | ||
| 26 | alim1535_wdt: | ||
| 27 | timeout: Watchdog timeout in seconds. (0 < timeout < 18000, default=60 | ||
| 28 | nowayout: Watchdog cannot be stopped once started | ||
| 29 | (default=kernel config parameter) | ||
| 30 | ------------------------------------------------- | ||
| 31 | alim7101_wdt: | ||
| 32 | timeout: Watchdog timeout in seconds. (1<=timeout<=3600, default=30 | ||
| 33 | use_gpio: Use the gpio watchdog (required by old cobalt boards). | ||
| 34 | default=0/off/no | ||
| 35 | nowayout: Watchdog cannot be stopped once started | ||
| 36 | (default=kernel config parameter) | ||
| 37 | ------------------------------------------------- | ||
| 38 | ar7_wdt: | ||
| 39 | margin: Watchdog margin in seconds (default=60) | ||
| 40 | nowayout: Disable watchdog shutdown on close | ||
| 41 | (default=kernel config parameter) | ||
| 42 | ------------------------------------------------- | ||
| 43 | at32ap700x_wdt: | ||
| 44 | timeout: Timeout value. Limited to be 1 or 2 seconds. (default=2) | ||
| 45 | nowayout: Watchdog cannot be stopped once started | ||
| 46 | (default=kernel config parameter) | ||
| 47 | ------------------------------------------------- | ||
| 48 | at91rm9200_wdt: | ||
| 49 | wdt_time: Watchdog time in seconds. (default=5) | ||
| 50 | nowayout: Watchdog cannot be stopped once started | ||
| 51 | (default=kernel config parameter) | ||
| 52 | ------------------------------------------------- | ||
| 53 | at91sam9_wdt: | ||
| 54 | heartbeat: Watchdog heartbeats in seconds. (default = 15) | ||
| 55 | nowayout: Watchdog cannot be stopped once started | ||
| 56 | (default=kernel config parameter) | ||
| 57 | ------------------------------------------------- | ||
| 58 | bcm47xx_wdt: | ||
| 59 | wdt_time: Watchdog time in seconds. (default=30) | ||
| 60 | nowayout: Watchdog cannot be stopped once started | ||
| 61 | (default=kernel config parameter) | ||
| 62 | ------------------------------------------------- | ||
| 63 | bfin_wdt: | ||
| 64 | timeout: Watchdog timeout in seconds. (1<=timeout<=((2^32)/SCLK), default=20) | ||
| 65 | nowayout: Watchdog cannot be stopped once started | ||
| 66 | (default=kernel config parameter) | ||
| 67 | ------------------------------------------------- | ||
| 68 | coh901327_wdt: | ||
| 69 | margin: Watchdog margin in seconds (default 60s) | ||
| 70 | ------------------------------------------------- | ||
| 71 | cpu5wdt: | ||
| 72 | port: base address of watchdog card, default is 0x91 | ||
| 73 | verbose: be verbose, default is 0 (no) | ||
| 74 | ticks: count down ticks, default is 10000 | ||
| 75 | ------------------------------------------------- | ||
| 76 | cpwd: | ||
| 77 | wd0_timeout: Default watchdog0 timeout in 1/10secs | ||
| 78 | wd1_timeout: Default watchdog1 timeout in 1/10secs | ||
| 79 | wd2_timeout: Default watchdog2 timeout in 1/10secs | ||
| 80 | ------------------------------------------------- | ||
| 81 | davinci_wdt: | ||
| 82 | heartbeat: Watchdog heartbeat period in seconds from 1 to 600, default 60 | ||
| 83 | ------------------------------------------------- | ||
| 84 | ep93xx_wdt: | ||
| 85 | nowayout: Watchdog cannot be stopped once started | ||
| 86 | timeout: Watchdog timeout in seconds. (1<=timeout<=3600, default=TBD) | ||
| 87 | ------------------------------------------------- | ||
| 88 | eurotechwdt: | ||
| 89 | nowayout: Watchdog cannot be stopped once started | ||
| 90 | (default=kernel config parameter) | ||
| 91 | io: Eurotech WDT io port (default=0x3f0) | ||
| 92 | irq: Eurotech WDT irq (default=10) | ||
| 93 | ev: Eurotech WDT event type (default is `int') | ||
| 94 | ------------------------------------------------- | ||
| 95 | gef_wdt: | ||
| 96 | nowayout: Watchdog cannot be stopped once started | ||
| 97 | (default=kernel config parameter) | ||
| 98 | ------------------------------------------------- | ||
| 99 | geodewdt: | ||
| 100 | timeout: Watchdog timeout in seconds. 1<= timeout <=131, default=60. | ||
| 101 | nowayout: Watchdog cannot be stopped once started | ||
| 102 | (default=kernel config parameter) | ||
| 103 | ------------------------------------------------- | ||
| 104 | i6300esb: | ||
| 105 | heartbeat: Watchdog heartbeat in seconds. (1<heartbeat<2046, default=30) | ||
| 106 | nowayout: Watchdog cannot be stopped once started | ||
| 107 | (default=kernel config parameter) | ||
| 108 | ------------------------------------------------- | ||
| 109 | iTCO_wdt: | ||
| 110 | heartbeat: Watchdog heartbeat in seconds. | ||
| 111 | (2<heartbeat<39 (TCO v1) or 613 (TCO v2), default=30) | ||
| 112 | nowayout: Watchdog cannot be stopped once started | ||
| 113 | (default=kernel config parameter) | ||
| 114 | ------------------------------------------------- | ||
| 115 | iTCO_vendor_support: | ||
| 116 | vendorsupport: iTCO vendor specific support mode, default=0 (none), | ||
| 117 | 1=SuperMicro Pent3, 2=SuperMicro Pent4+, 911=Broken SMI BIOS | ||
| 118 | ------------------------------------------------- | ||
| 119 | ib700wdt: | ||
| 120 | timeout: Watchdog timeout in seconds. 0<= timeout <=30, default=30. | ||
| 121 | nowayout: Watchdog cannot be stopped once started | ||
| 122 | (default=kernel config parameter) | ||
| 123 | ------------------------------------------------- | ||
| 124 | ibmasr: | ||
| 125 | nowayout: Watchdog cannot be stopped once started | ||
| 126 | (default=kernel config parameter) | ||
| 127 | ------------------------------------------------- | ||
| 128 | indydog: | ||
| 129 | nowayout: Watchdog cannot be stopped once started | ||
| 130 | (default=kernel config parameter) | ||
| 131 | ------------------------------------------------- | ||
| 132 | iop_wdt: | ||
| 133 | nowayout: Watchdog cannot be stopped once started | ||
| 134 | (default=kernel config parameter) | ||
| 135 | ------------------------------------------------- | ||
| 136 | it8712f_wdt: | ||
| 137 | margin: Watchdog margin in seconds (default 60) | ||
| 138 | nowayout: Disable watchdog shutdown on close | ||
| 139 | (default=kernel config parameter) | ||
| 140 | ------------------------------------------------- | ||
| 141 | it87_wdt: | ||
| 142 | nogameport: Forbid the activation of game port, default=0 | ||
| 143 | exclusive: Watchdog exclusive device open, default=1 | ||
| 144 | timeout: Watchdog timeout in seconds, default=60 | ||
| 145 | testmode: Watchdog test mode (1 = no reboot), default=0 | ||
| 146 | nowayout: Watchdog cannot be stopped once started | ||
| 147 | (default=kernel config parameter) | ||
| 148 | ------------------------------------------------- | ||
| 149 | ixp2000_wdt: | ||
| 150 | heartbeat: Watchdog heartbeat in seconds (default 60s) | ||
| 151 | nowayout: Watchdog cannot be stopped once started | ||
| 152 | (default=kernel config parameter) | ||
| 153 | ------------------------------------------------- | ||
| 154 | ixp4xx_wdt: | ||
| 155 | heartbeat: Watchdog heartbeat in seconds (default 60s) | ||
| 156 | nowayout: Watchdog cannot be stopped once started | ||
| 157 | (default=kernel config parameter) | ||
| 158 | ------------------------------------------------- | ||
| 159 | ks8695_wdt: | ||
| 160 | wdt_time: Watchdog time in seconds. (default=5) | ||
| 161 | nowayout: Watchdog cannot be stopped once started | ||
| 162 | (default=kernel config parameter) | ||
| 163 | ------------------------------------------------- | ||
| 164 | machzwd: | ||
| 165 | nowayout: Watchdog cannot be stopped once started | ||
| 166 | (default=kernel config parameter) | ||
| 167 | action: after watchdog resets, generate: | ||
| 168 | 0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI | ||
| 169 | ------------------------------------------------- | ||
| 170 | max63xx_wdt: | ||
| 171 | heartbeat: Watchdog heartbeat period in seconds from 1 to 60, default 60 | ||
| 172 | nowayout: Watchdog cannot be stopped once started | ||
| 173 | (default=kernel config parameter) | ||
| 174 | nodelay: Force selection of a timeout setting without initial delay | ||
| 175 | (max6373/74 only, default=0) | ||
| 176 | ------------------------------------------------- | ||
| 177 | mixcomwd: | ||
| 178 | nowayout: Watchdog cannot be stopped once started | ||
| 179 | (default=kernel config parameter) | ||
| 180 | ------------------------------------------------- | ||
| 181 | mpc8xxx_wdt: | ||
| 182 | timeout: Watchdog timeout in ticks. (0<timeout<65536, default=65535) | ||
| 183 | reset: Watchdog Interrupt/Reset Mode. 0 = interrupt, 1 = reset | ||
| 184 | nowayout: Watchdog cannot be stopped once started | ||
| 185 | (default=kernel config parameter) | ||
| 186 | ------------------------------------------------- | ||
| 187 | mpcore_wdt: | ||
| 188 | mpcore_margin: MPcore timer margin in seconds. | ||
| 189 | (0 < mpcore_margin < 65536, default=60) | ||
| 190 | nowayout: Watchdog cannot be stopped once started | ||
| 191 | (default=kernel config parameter) | ||
| 192 | mpcore_noboot: MPcore watchdog action, set to 1 to ignore reboots, | ||
| 193 | 0 to reboot (default=0 | ||
| 194 | ------------------------------------------------- | ||
| 195 | mv64x60_wdt: | ||
| 196 | nowayout: Watchdog cannot be stopped once started | ||
| 197 | (default=kernel config parameter) | ||
| 198 | ------------------------------------------------- | ||
| 199 | nuc900_wdt: | ||
| 200 | heartbeat: Watchdog heartbeats in seconds. | ||
| 201 | (default = 15) | ||
| 202 | nowayout: Watchdog cannot be stopped once started | ||
| 203 | (default=kernel config parameter) | ||
| 204 | ------------------------------------------------- | ||
| 205 | omap_wdt: | ||
| 206 | timer_margin: initial watchdog timeout (in seconds) | ||
| 207 | ------------------------------------------------- | ||
| 208 | orion_wdt: | ||
| 209 | heartbeat: Initial watchdog heartbeat in seconds | ||
| 210 | nowayout: Watchdog cannot be stopped once started | ||
| 211 | (default=kernel config parameter) | ||
| 212 | ------------------------------------------------- | ||
| 213 | pc87413_wdt: | ||
| 214 | io: pc87413 WDT I/O port (default: io). | ||
| 215 | timeout: Watchdog timeout in minutes (default=timeout). | ||
| 216 | nowayout: Watchdog cannot be stopped once started | ||
| 217 | (default=kernel config parameter) | ||
| 218 | ------------------------------------------------- | ||
| 219 | pika_wdt: | ||
| 220 | heartbeat: Watchdog heartbeats in seconds. (default = 15) | ||
| 221 | nowayout: Watchdog cannot be stopped once started | ||
| 222 | (default=kernel config parameter) | ||
| 223 | ------------------------------------------------- | ||
| 224 | pnx4008_wdt: | ||
| 225 | heartbeat: Watchdog heartbeat period in seconds from 1 to 60, default 19 | ||
| 226 | nowayout: Set to 1 to keep watchdog running after device release | ||
| 227 | ------------------------------------------------- | ||
| 228 | pnx833x_wdt: | ||
| 229 | timeout: Watchdog timeout in Mhz. (68Mhz clock), default=2040000000 (30 seconds) | ||
| 230 | nowayout: Watchdog cannot be stopped once started | ||
| 231 | (default=kernel config parameter) | ||
| 232 | start_enabled: Watchdog is started on module insertion (default=1) | ||
| 233 | ------------------------------------------------- | ||
| 234 | rc32434_wdt: | ||
| 235 | timeout: Watchdog timeout value, in seconds (default=20) | ||
| 236 | nowayout: Watchdog cannot be stopped once started | ||
| 237 | (default=kernel config parameter) | ||
| 238 | ------------------------------------------------- | ||
| 239 | riowd: | ||
| 240 | riowd_timeout: Watchdog timeout in minutes (default=1) | ||
| 241 | ------------------------------------------------- | ||
| 242 | s3c2410_wdt: | ||
| 243 | tmr_margin: Watchdog tmr_margin in seconds. (default=15) | ||
| 244 | tmr_atboot: Watchdog is started at boot time if set to 1, default=0 | ||
| 245 | nowayout: Watchdog cannot be stopped once started | ||
| 246 | (default=kernel config parameter) | ||
| 247 | soft_noboot: Watchdog action, set to 1 to ignore reboots, 0 to reboot | ||
| 248 | debug: Watchdog debug, set to >1 for debug, (default 0) | ||
| 249 | ------------------------------------------------- | ||
| 250 | sa1100_wdt: | ||
| 251 | margin: Watchdog margin in seconds (default 60s) | ||
| 252 | ------------------------------------------------- | ||
| 253 | sb_wdog: | ||
| 254 | timeout: Watchdog timeout in microseconds (max/default 8388607 or 8.3ish secs) | ||
| 255 | ------------------------------------------------- | ||
| 256 | sbc60xxwdt: | ||
| 257 | wdt_stop: SBC60xx WDT 'stop' io port (default 0x45) | ||
| 258 | wdt_start: SBC60xx WDT 'start' io port (default 0x443) | ||
| 259 | timeout: Watchdog timeout in seconds. (1<=timeout<=3600, default=30) | ||
| 260 | nowayout: Watchdog cannot be stopped once started | ||
| 261 | (default=kernel config parameter) | ||
| 262 | ------------------------------------------------- | ||
| 263 | sbc7240_wdt: | ||
| 264 | timeout: Watchdog timeout in seconds. (1<=timeout<=255, default=30) | ||
| 265 | nowayout: Disable watchdog when closing device file | ||
| 266 | ------------------------------------------------- | ||
| 267 | sbc8360: | ||
| 268 | timeout: Index into timeout table (0-63) (default=27 (60s)) | ||
| 269 | nowayout: Watchdog cannot be stopped once started | ||
| 270 | (default=kernel config parameter) | ||
| 271 | ------------------------------------------------- | ||
| 272 | sbc_epx_c3: | ||
| 273 | nowayout: Watchdog cannot be stopped once started | ||
| 274 | (default=kernel config parameter) | ||
| 275 | ------------------------------------------------- | ||
| 276 | sbc_fitpc2_wdt: | ||
| 277 | margin: Watchdog margin in seconds (default 60s) | ||
| 278 | nowayout: Watchdog cannot be stopped once started | ||
| 279 | ------------------------------------------------- | ||
| 280 | sc1200wdt: | ||
| 281 | isapnp: When set to 0 driver ISA PnP support will be disabled (default=1) | ||
| 282 | io: io port | ||
| 283 | timeout: range is 0-255 minutes, default is 1 | ||
| 284 | nowayout: Watchdog cannot be stopped once started | ||
| 285 | (default=kernel config parameter) | ||
| 286 | ------------------------------------------------- | ||
| 287 | sc520_wdt: | ||
| 288 | timeout: Watchdog timeout in seconds. (1 <= timeout <= 3600, default=30) | ||
| 289 | nowayout: Watchdog cannot be stopped once started | ||
| 290 | (default=kernel config parameter) | ||
| 291 | ------------------------------------------------- | ||
| 292 | sch311x_wdt: | ||
| 293 | force_id: Override the detected device ID | ||
| 294 | therm_trip: Should a ThermTrip trigger the reset generator | ||
| 295 | timeout: Watchdog timeout in seconds. 1<= timeout <=15300, default=60 | ||
| 296 | nowayout: Watchdog cannot be stopped once started | ||
| 297 | (default=kernel config parameter) | ||
| 298 | ------------------------------------------------- | ||
| 299 | scx200_wdt: | ||
| 300 | margin: Watchdog margin in seconds | ||
| 301 | nowayout: Disable watchdog shutdown on close | ||
| 302 | ------------------------------------------------- | ||
| 303 | shwdt: | ||
| 304 | clock_division_ratio: Clock division ratio. Valid ranges are from 0x5 (1.31ms) | ||
| 305 | to 0x7 (5.25ms). (default=7) | ||
| 306 | heartbeat: Watchdog heartbeat in seconds. (1 <= heartbeat <= 3600, default=30 | ||
| 307 | nowayout: Watchdog cannot be stopped once started | ||
| 308 | (default=kernel config parameter) | ||
| 309 | ------------------------------------------------- | ||
| 310 | smsc37b787_wdt: | ||
| 311 | timeout: range is 1-255 units, default is 60 | ||
| 312 | nowayout: Watchdog cannot be stopped once started | ||
| 313 | (default=kernel config parameter) | ||
| 314 | ------------------------------------------------- | ||
| 315 | softdog: | ||
| 316 | soft_margin: Watchdog soft_margin in seconds. | ||
| 317 | (0 < soft_margin < 65536, default=60) | ||
| 318 | nowayout: Watchdog cannot be stopped once started | ||
| 319 | (default=kernel config parameter) | ||
| 320 | soft_noboot: Softdog action, set to 1 to ignore reboots, 0 to reboot | ||
| 321 | (default=0) | ||
| 322 | ------------------------------------------------- | ||
| 323 | stmp3xxx_wdt: | ||
| 324 | heartbeat: Watchdog heartbeat period in seconds from 1 to 4194304, default 19 | ||
| 325 | ------------------------------------------------- | ||
| 326 | ts72xx_wdt: | ||
| 327 | timeout: Watchdog timeout in seconds. (1 <= timeout <= 8, default=8) | ||
| 328 | nowayout: Disable watchdog shutdown on close | ||
| 329 | ------------------------------------------------- | ||
| 330 | twl4030_wdt: | ||
| 331 | nowayout: Watchdog cannot be stopped once started | ||
| 332 | (default=kernel config parameter) | ||
| 333 | ------------------------------------------------- | ||
| 334 | txx9wdt: | ||
| 335 | timeout: Watchdog timeout in seconds. (0<timeout<N, default=60) | ||
| 336 | nowayout: Watchdog cannot be stopped once started | ||
| 337 | (default=kernel config parameter) | ||
| 338 | ------------------------------------------------- | ||
| 339 | w83627hf_wdt: | ||
| 340 | wdt_io: w83627hf/thf WDT io port (default 0x2E) | ||
| 341 | timeout: Watchdog timeout in seconds. 1 <= timeout <= 255, default=60. | ||
| 342 | nowayout: Watchdog cannot be stopped once started | ||
| 343 | (default=kernel config parameter) | ||
| 344 | ------------------------------------------------- | ||
| 345 | w83697hf_wdt: | ||
| 346 | wdt_io: w83697hf/hg WDT io port (default 0x2e, 0 = autodetect) | ||
| 347 | timeout: Watchdog timeout in seconds. 1<= timeout <=255 (default=60) | ||
| 348 | nowayout: Watchdog cannot be stopped once started | ||
| 349 | (default=kernel config parameter) | ||
| 350 | early_disable: Watchdog gets disabled at boot time (default=1) | ||
| 351 | ------------------------------------------------- | ||
| 352 | w83697ug_wdt: | ||
| 353 | wdt_io: w83697ug/uf WDT io port (default 0x2e) | ||
| 354 | timeout: Watchdog timeout in seconds. 1<= timeout <=255 (default=60) | ||
| 355 | nowayout: Watchdog cannot be stopped once started | ||
| 356 | (default=kernel config parameter) | ||
| 357 | ------------------------------------------------- | ||
| 358 | w83877f_wdt: | ||
| 359 | timeout: Watchdog timeout in seconds. (1<=timeout<=3600, default=30) | ||
| 360 | nowayout: Watchdog cannot be stopped once started | ||
| 361 | (default=kernel config parameter) | ||
| 362 | ------------------------------------------------- | ||
| 363 | w83977f_wdt: | ||
| 364 | timeout: Watchdog timeout in seconds (15..7635), default=45) | ||
| 365 | testmode: Watchdog testmode (1 = no reboot), default=0 | ||
| 366 | nowayout: Watchdog cannot be stopped once started | ||
| 367 | (default=kernel config parameter) | ||
| 368 | ------------------------------------------------- | ||
| 369 | wafer5823wdt: | ||
| 370 | timeout: Watchdog timeout in seconds. 1 <= timeout <= 255, default=60. | ||
| 371 | nowayout: Watchdog cannot be stopped once started | ||
| 372 | (default=kernel config parameter) | ||
| 373 | ------------------------------------------------- | ||
| 374 | wdt285: | ||
| 375 | soft_margin: Watchdog timeout in seconds (default=60) | ||
| 376 | ------------------------------------------------- | ||
| 377 | wdt977: | ||
| 378 | timeout: Watchdog timeout in seconds (60..15300, default=60) | ||
| 379 | testmode: Watchdog testmode (1 = no reboot), default=0 | ||
| 380 | nowayout: Watchdog cannot be stopped once started | ||
| 381 | (default=kernel config parameter) | ||
| 382 | ------------------------------------------------- | ||
| 383 | wm831x_wdt: | ||
| 384 | nowayout: Watchdog cannot be stopped once started | ||
| 385 | (default=kernel config parameter) | ||
| 386 | ------------------------------------------------- | ||
| 387 | wm8350_wdt: | ||
| 388 | nowayout: Watchdog cannot be stopped once started | ||
| 389 | (default=kernel config parameter) | ||
| 390 | ------------------------------------------------- | ||
diff --git a/Documentation/watchdog/wdt.txt b/Documentation/watchdog/wdt.txt index 03fd756d976d..061c2e35384f 100644 --- a/Documentation/watchdog/wdt.txt +++ b/Documentation/watchdog/wdt.txt | |||
| @@ -14,14 +14,22 @@ reboot will depend on the state of the machines and interrupts. The hardware | |||
| 14 | boards physically pull the machine down off their own onboard timers and | 14 | boards physically pull the machine down off their own onboard timers and |
| 15 | will reboot from almost anything. | 15 | will reboot from almost anything. |
| 16 | 16 | ||
| 17 | A second temperature monitoring interface is available on the WDT501P cards | 17 | A second temperature monitoring interface is available on the WDT501P cards. |
| 18 | This provides /dev/temperature. This is the machine internal temperature in | 18 | This provides /dev/temperature. This is the machine internal temperature in |
| 19 | degrees Fahrenheit. Each read returns a single byte giving the temperature. | 19 | degrees Fahrenheit. Each read returns a single byte giving the temperature. |
| 20 | 20 | ||
| 21 | The third interface logs kernel messages on additional alert events. | 21 | The third interface logs kernel messages on additional alert events. |
| 22 | 22 | ||
| 23 | The wdt card cannot be safely probed for. Instead you need to pass | 23 | The ICS ISA-bus wdt card cannot be safely probed for. Instead you need to |
| 24 | wdt=ioaddr,irq as a boot parameter - eg "wdt=0x240,11". | 24 | pass IO address and IRQ boot parameters. E.g.: |
| 25 | wdt.io=0x240 wdt.irq=11 | ||
| 26 | |||
| 27 | Other "wdt" driver parameters are: | ||
| 28 | heartbeat Watchdog heartbeat in seconds (default 60) | ||
| 29 | nowayout Watchdog cannot be stopped once started (kernel | ||
| 30 | build parameter) | ||
| 31 | tachometer WDT501-P Fan Tachometer support (0=disable, default=0) | ||
| 32 | type WDT501-P Card type (500 or 501, default=500) | ||
| 25 | 33 | ||
| 26 | Features | 34 | Features |
| 27 | -------- | 35 | -------- |
| @@ -40,4 +48,3 @@ Minor numbers are however allocated for it. | |||
| 40 | 48 | ||
| 41 | 49 | ||
| 42 | Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c | 50 | Example Watchdog Driver: see Documentation/watchdog/src/watchdog-simple.c |
| 43 | |||
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index b87ba23442d2..afcfacc9bbe2 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
| @@ -145,13 +145,19 @@ config KS8695_WATCHDOG | |||
| 145 | Watchdog timer embedded into KS8695 processor. This will reboot your | 145 | Watchdog timer embedded into KS8695 processor. This will reboot your |
| 146 | system when the timeout is reached. | 146 | system when the timeout is reached. |
| 147 | 147 | ||
| 148 | config HAVE_S3C2410_WATCHDOG | ||
| 149 | bool | ||
| 150 | help | ||
| 151 | This will include watchdog timer support for Samsung SoCs. If | ||
| 152 | you want to include watchdog support for any machine, kindly | ||
| 153 | select this in the respective mach-XXXX/Kconfig file. | ||
| 154 | |||
| 148 | config S3C2410_WATCHDOG | 155 | config S3C2410_WATCHDOG |
| 149 | tristate "S3C2410 Watchdog" | 156 | tristate "S3C2410 Watchdog" |
| 150 | depends on ARCH_S3C2410 | 157 | depends on ARCH_S3C2410 || HAVE_S3C2410_WATCHDOG |
| 151 | help | 158 | help |
| 152 | Watchdog timer block in the Samsung S3C2410 chips. This will | 159 | Watchdog timer block in the Samsung SoCs. This will reboot |
| 153 | reboot the system when the timer expires with the watchdog | 160 | the system when the timer expires with the watchdog enabled. |
| 154 | enabled. | ||
| 155 | 161 | ||
| 156 | The driver is limited by the speed of the system's PCLK | 162 | The driver is limited by the speed of the system's PCLK |
| 157 | signal, so with reasonably fast systems (PCLK around 50-66MHz) | 163 | signal, so with reasonably fast systems (PCLK around 50-66MHz) |
| @@ -306,6 +312,18 @@ config MAX63XX_WATCHDOG | |||
| 306 | help | 312 | help |
| 307 | Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. | 313 | Support for memory mapped max63{69,70,71,72,73,74} watchdog timer. |
| 308 | 314 | ||
| 315 | config IMX2_WDT | ||
| 316 | tristate "IMX2+ Watchdog" | ||
| 317 | depends on ARCH_MX2 || ARCH_MX25 || ARCH_MX3 || ARCH_MX5 | ||
| 318 | help | ||
| 319 | This is the driver for the hardware watchdog | ||
| 320 | on the Freescale IMX2 and later processors. | ||
| 321 | If you have one of these processors and wish to have | ||
| 322 | watchdog support enabled, say Y, otherwise say N. | ||
| 323 | |||
| 324 | To compile this driver as a module, choose M here: the | ||
| 325 | module will be called imx2_wdt. | ||
| 326 | |||
| 309 | # AVR32 Architecture | 327 | # AVR32 Architecture |
| 310 | 328 | ||
| 311 | config AT32AP700X_WDT | 329 | config AT32AP700X_WDT |
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 5e3cb95bb0e9..72f3e2073f8e 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile | |||
| @@ -47,6 +47,7 @@ obj-$(CONFIG_STMP3XXX_WATCHDOG) += stmp3xxx_wdt.o | |||
| 47 | obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o | 47 | obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o |
| 48 | obj-$(CONFIG_ADX_WATCHDOG) += adx_wdt.o | 48 | obj-$(CONFIG_ADX_WATCHDOG) += adx_wdt.o |
| 49 | obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o | 49 | obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o |
| 50 | obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o | ||
| 50 | 51 | ||
| 51 | # AVR32 Architecture | 52 | # AVR32 Architecture |
| 52 | obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o | 53 | obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o |
diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c index 9c7ccd1e9088..9042a95fc98c 100644 --- a/drivers/watchdog/bfin_wdt.c +++ b/drivers/watchdog/bfin_wdt.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/interrupt.h> | 23 | #include <linux/interrupt.h> |
| 24 | #include <linux/uaccess.h> | 24 | #include <linux/uaccess.h> |
| 25 | #include <asm/blackfin.h> | 25 | #include <asm/blackfin.h> |
| 26 | #include <asm/bfin_watchdog.h> | ||
| 26 | 27 | ||
| 27 | #define stamp(fmt, args...) \ | 28 | #define stamp(fmt, args...) \ |
| 28 | pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) | 29 | pr_debug("%s:%i: " fmt "\n", __func__, __LINE__, ## args) |
| @@ -49,24 +50,6 @@ | |||
| 49 | # define bfin_write_WDOG_STAT(x) bfin_write_WDOGA_STAT(x) | 50 | # define bfin_write_WDOG_STAT(x) bfin_write_WDOGA_STAT(x) |
| 50 | #endif | 51 | #endif |
| 51 | 52 | ||
| 52 | /* Bit in SWRST that indicates boot caused by watchdog */ | ||
| 53 | #define SWRST_RESET_WDOG 0x4000 | ||
| 54 | |||
| 55 | /* Bit in WDOG_CTL that indicates watchdog has expired (WDR0) */ | ||
| 56 | #define WDOG_EXPIRED 0x8000 | ||
| 57 | |||
| 58 | /* Masks for WDEV field in WDOG_CTL register */ | ||
| 59 | #define ICTL_RESET 0x0 | ||
| 60 | #define ICTL_NMI 0x2 | ||
| 61 | #define ICTL_GPI 0x4 | ||
| 62 | #define ICTL_NONE 0x6 | ||
| 63 | #define ICTL_MASK 0x6 | ||
| 64 | |||
| 65 | /* Masks for WDEN field in WDOG_CTL register */ | ||
| 66 | #define WDEN_MASK 0x0FF0 | ||
| 67 | #define WDEN_ENABLE 0x0000 | ||
| 68 | #define WDEN_DISABLE 0x0AD0 | ||
| 69 | |||
| 70 | /* some defaults */ | 53 | /* some defaults */ |
| 71 | #define WATCHDOG_TIMEOUT 20 | 54 | #define WATCHDOG_TIMEOUT 20 |
| 72 | 55 | ||
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 801ead191499..3d49671cdf5a 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
| @@ -137,12 +137,12 @@ static long booke_wdt_ioctl(struct file *file, | |||
| 137 | if (copy_to_user((void *)arg, &ident, sizeof(ident))) | 137 | if (copy_to_user((void *)arg, &ident, sizeof(ident))) |
| 138 | return -EFAULT; | 138 | return -EFAULT; |
| 139 | case WDIOC_GETSTATUS: | 139 | case WDIOC_GETSTATUS: |
| 140 | return put_user(ident.options, p); | 140 | return put_user(0, p); |
| 141 | case WDIOC_GETBOOTSTATUS: | 141 | case WDIOC_GETBOOTSTATUS: |
| 142 | /* XXX: something is clearing TSR */ | 142 | /* XXX: something is clearing TSR */ |
| 143 | tmp = mfspr(SPRN_TSR) & TSR_WRS(3); | 143 | tmp = mfspr(SPRN_TSR) & TSR_WRS(3); |
| 144 | /* returns 1 if last reset was caused by the WDT */ | 144 | /* returns CARDRESET if last reset was caused by the WDT */ |
| 145 | return (tmp ? 1 : 0); | 145 | return (tmp ? WDIOF_CARDRESET : 0); |
| 146 | case WDIOC_SETOPTIONS: | 146 | case WDIOC_SETOPTIONS: |
| 147 | if (get_user(tmp, p)) | 147 | if (get_user(tmp, p)) |
| 148 | return -EINVAL; | 148 | return -EINVAL; |
diff --git a/drivers/watchdog/eurotechwdt.c b/drivers/watchdog/eurotechwdt.c index d1c4e55b1db0..3f3dc093ad68 100644 --- a/drivers/watchdog/eurotechwdt.c +++ b/drivers/watchdog/eurotechwdt.c | |||
| @@ -68,7 +68,6 @@ static spinlock_t eurwdt_lock; | |||
| 68 | 68 | ||
| 69 | /* | 69 | /* |
| 70 | * You must set these - there is no sane way to probe for this board. | 70 | * You must set these - there is no sane way to probe for this board. |
| 71 | * You can use eurwdt=x,y to set these now. | ||
| 72 | */ | 71 | */ |
| 73 | 72 | ||
| 74 | static int io = 0x3f0; | 73 | static int io = 0x3f0; |
diff --git a/drivers/watchdog/iTCO_vendor_support.c b/drivers/watchdog/iTCO_vendor_support.c index 5133bca5ccbe..481d1ad43464 100644 --- a/drivers/watchdog/iTCO_vendor_support.c +++ b/drivers/watchdog/iTCO_vendor_support.c | |||
| @@ -101,13 +101,6 @@ static void supermicro_old_pre_stop(unsigned long acpibase) | |||
| 101 | outl(val32, SMI_EN); /* Needed to deactivate watchdog */ | 101 | outl(val32, SMI_EN); /* Needed to deactivate watchdog */ |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static void supermicro_old_pre_keepalive(unsigned long acpibase) | ||
| 105 | { | ||
| 106 | /* Reload TCO Timer (done in iTCO_wdt_keepalive) + */ | ||
| 107 | /* Clear "Expire Flag" (Bit 3 of TC01_STS register) */ | ||
| 108 | outb(0x08, TCO1_STS); | ||
| 109 | } | ||
| 110 | |||
| 111 | /* | 104 | /* |
| 112 | * Vendor Support: 2 | 105 | * Vendor Support: 2 |
| 113 | * Board: Super Micro Computer Inc. P4SBx, P4DPx | 106 | * Board: Super Micro Computer Inc. P4SBx, P4DPx |
| @@ -337,9 +330,7 @@ EXPORT_SYMBOL(iTCO_vendor_pre_stop); | |||
| 337 | 330 | ||
| 338 | void iTCO_vendor_pre_keepalive(unsigned long acpibase, unsigned int heartbeat) | 331 | void iTCO_vendor_pre_keepalive(unsigned long acpibase, unsigned int heartbeat) |
| 339 | { | 332 | { |
| 340 | if (vendorsupport == SUPERMICRO_OLD_BOARD) | 333 | if (vendorsupport == SUPERMICRO_NEW_BOARD) |
| 341 | supermicro_old_pre_keepalive(acpibase); | ||
| 342 | else if (vendorsupport == SUPERMICRO_NEW_BOARD) | ||
| 343 | supermicro_new_pre_set_heartbeat(heartbeat); | 334 | supermicro_new_pre_set_heartbeat(heartbeat); |
| 344 | } | 335 | } |
| 345 | EXPORT_SYMBOL(iTCO_vendor_pre_keepalive); | 336 | EXPORT_SYMBOL(iTCO_vendor_pre_keepalive); |
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c index 8da886035374..69de8713b8e4 100644 --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c | |||
| @@ -40,7 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | /* Module and version information */ | 41 | /* Module and version information */ |
| 42 | #define DRV_NAME "iTCO_wdt" | 42 | #define DRV_NAME "iTCO_wdt" |
| 43 | #define DRV_VERSION "1.05" | 43 | #define DRV_VERSION "1.06" |
| 44 | #define PFX DRV_NAME ": " | 44 | #define PFX DRV_NAME ": " |
| 45 | 45 | ||
| 46 | /* Includes */ | 46 | /* Includes */ |
| @@ -391,8 +391,8 @@ static struct platform_device *iTCO_wdt_platform_device; | |||
| 391 | #define WATCHDOG_HEARTBEAT 30 /* 30 sec default heartbeat */ | 391 | #define WATCHDOG_HEARTBEAT 30 /* 30 sec default heartbeat */ |
| 392 | static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */ | 392 | static int heartbeat = WATCHDOG_HEARTBEAT; /* in seconds */ |
| 393 | module_param(heartbeat, int, 0); | 393 | module_param(heartbeat, int, 0); |
| 394 | MODULE_PARM_DESC(heartbeat, "Watchdog heartbeat in seconds. " | 394 | MODULE_PARM_DESC(heartbeat, "Watchdog timeout in seconds. " |
| 395 | "(2<heartbeat<39 (TCO v1) or 613 (TCO v2), default=" | 395 | "5..76 (TCO v1) or 3..614 (TCO v2), default=" |
| 396 | __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); | 396 | __MODULE_STRING(WATCHDOG_HEARTBEAT) ")"); |
| 397 | 397 | ||
| 398 | static int nowayout = WATCHDOG_NOWAYOUT; | 398 | static int nowayout = WATCHDOG_NOWAYOUT; |
| @@ -523,8 +523,13 @@ static int iTCO_wdt_keepalive(void) | |||
| 523 | /* Reload the timer by writing to the TCO Timer Counter register */ | 523 | /* Reload the timer by writing to the TCO Timer Counter register */ |
| 524 | if (iTCO_wdt_private.iTCO_version == 2) | 524 | if (iTCO_wdt_private.iTCO_version == 2) |
| 525 | outw(0x01, TCO_RLD); | 525 | outw(0x01, TCO_RLD); |
| 526 | else if (iTCO_wdt_private.iTCO_version == 1) | 526 | else if (iTCO_wdt_private.iTCO_version == 1) { |
| 527 | /* Reset the timeout status bit so that the timer | ||
| 528 | * needs to count down twice again before rebooting */ | ||
| 529 | outw(0x0008, TCO1_STS); /* write 1 to clear bit */ | ||
| 530 | |||
| 527 | outb(0x01, TCO_RLD); | 531 | outb(0x01, TCO_RLD); |
| 532 | } | ||
| 528 | 533 | ||
| 529 | spin_unlock(&iTCO_wdt_private.io_lock); | 534 | spin_unlock(&iTCO_wdt_private.io_lock); |
| 530 | return 0; | 535 | return 0; |
| @@ -537,6 +542,11 @@ static int iTCO_wdt_set_heartbeat(int t) | |||
| 537 | unsigned int tmrval; | 542 | unsigned int tmrval; |
| 538 | 543 | ||
| 539 | tmrval = seconds_to_ticks(t); | 544 | tmrval = seconds_to_ticks(t); |
| 545 | |||
| 546 | /* For TCO v1 the timer counts down twice before rebooting */ | ||
| 547 | if (iTCO_wdt_private.iTCO_version == 1) | ||
| 548 | tmrval /= 2; | ||
| 549 | |||
| 540 | /* from the specs: */ | 550 | /* from the specs: */ |
| 541 | /* "Values of 0h-3h are ignored and should not be attempted" */ | 551 | /* "Values of 0h-3h are ignored and should not be attempted" */ |
| 542 | if (tmrval < 0x04) | 552 | if (tmrval < 0x04) |
| @@ -593,6 +603,8 @@ static int iTCO_wdt_get_timeleft(int *time_left) | |||
| 593 | spin_lock(&iTCO_wdt_private.io_lock); | 603 | spin_lock(&iTCO_wdt_private.io_lock); |
| 594 | val8 = inb(TCO_RLD); | 604 | val8 = inb(TCO_RLD); |
| 595 | val8 &= 0x3f; | 605 | val8 &= 0x3f; |
| 606 | if (!(inw(TCO1_STS) & 0x0008)) | ||
| 607 | val8 += (inb(TCOv1_TMR) & 0x3f); | ||
| 596 | spin_unlock(&iTCO_wdt_private.io_lock); | 608 | spin_unlock(&iTCO_wdt_private.io_lock); |
| 597 | 609 | ||
| 598 | *time_left = (val8 * 6) / 10; | 610 | *time_left = (val8 * 6) / 10; |
| @@ -832,9 +844,9 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, | |||
| 832 | TCOBASE); | 844 | TCOBASE); |
| 833 | 845 | ||
| 834 | /* Clear out the (probably old) status */ | 846 | /* Clear out the (probably old) status */ |
| 835 | outb(8, TCO1_STS); /* Clear the Time Out Status bit */ | 847 | outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */ |
| 836 | outb(2, TCO2_STS); /* Clear SECOND_TO_STS bit */ | 848 | outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */ |
| 837 | outb(4, TCO2_STS); /* Clear BOOT_STS bit */ | 849 | outw(0x0004, TCO2_STS); /* Clear BOOT_STS bit */ |
| 838 | 850 | ||
| 839 | /* Make sure the watchdog is not running */ | 851 | /* Make sure the watchdog is not running */ |
| 840 | iTCO_wdt_stop(); | 852 | iTCO_wdt_stop(); |
| @@ -844,8 +856,7 @@ static int __devinit iTCO_wdt_init(struct pci_dev *pdev, | |||
| 844 | if (iTCO_wdt_set_heartbeat(heartbeat)) { | 856 | if (iTCO_wdt_set_heartbeat(heartbeat)) { |
| 845 | iTCO_wdt_set_heartbeat(WATCHDOG_HEARTBEAT); | 857 | iTCO_wdt_set_heartbeat(WATCHDOG_HEARTBEAT); |
| 846 | printk(KERN_INFO PFX | 858 | printk(KERN_INFO PFX |
| 847 | "heartbeat value must be 2 < heartbeat < 39 (TCO v1) " | 859 | "timeout value out of range, using %d\n", heartbeat); |
| 848 | "or 613 (TCO v2), using %d\n", heartbeat); | ||
| 849 | } | 860 | } |
| 850 | 861 | ||
| 851 | ret = misc_register(&iTCO_wdt_miscdev); | 862 | ret = misc_register(&iTCO_wdt_miscdev); |
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c new file mode 100644 index 000000000000..ea25885781bb --- /dev/null +++ b/drivers/watchdog/imx2_wdt.c | |||
| @@ -0,0 +1,358 @@ | |||
| 1 | /* | ||
| 2 | * Watchdog driver for IMX2 and later processors | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Wolfram Sang, Pengutronix e.K. <w.sang@pengutronix.de> | ||
| 5 | * | ||
| 6 | * some parts adapted by similar drivers from Darius Augulis and Vladimir | ||
| 7 | * Zapolskiy, additional improvements by Wim Van Sebroeck. | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify it | ||
| 10 | * under the terms of the GNU General Public License version 2 as published by | ||
| 11 | * the Free Software Foundation. | ||
| 12 | * | ||
| 13 | * NOTE: MX1 has a slightly different Watchdog than MX2 and later: | ||
| 14 | * | ||
| 15 | * MX1: MX2+: | ||
| 16 | * ---- ----- | ||
| 17 | * Registers: 32-bit 16-bit | ||
| 18 | * Stopable timer: Yes No | ||
| 19 | * Need to enable clk: No Yes | ||
| 20 | * Halt on suspend: Manual Can be automatic | ||
| 21 | */ | ||
| 22 | |||
| 23 | #include <linux/init.h> | ||
| 24 | #include <linux/kernel.h> | ||
| 25 | #include <linux/miscdevice.h> | ||
| 26 | #include <linux/module.h> | ||
| 27 | #include <linux/moduleparam.h> | ||
| 28 | #include <linux/platform_device.h> | ||
| 29 | #include <linux/watchdog.h> | ||
| 30 | #include <linux/clk.h> | ||
| 31 | #include <linux/fs.h> | ||
| 32 | #include <linux/io.h> | ||
| 33 | #include <linux/uaccess.h> | ||
| 34 | #include <linux/timer.h> | ||
| 35 | #include <linux/jiffies.h> | ||
| 36 | #include <mach/hardware.h> | ||
| 37 | |||
| 38 | #define DRIVER_NAME "imx2-wdt" | ||
| 39 | |||
| 40 | #define IMX2_WDT_WCR 0x00 /* Control Register */ | ||
| 41 | #define IMX2_WDT_WCR_WT (0xFF << 8) /* -> Watchdog Timeout Field */ | ||
| 42 | #define IMX2_WDT_WCR_WRE (1 << 3) /* -> WDOG Reset Enable */ | ||
| 43 | #define IMX2_WDT_WCR_WDE (1 << 2) /* -> Watchdog Enable */ | ||
| 44 | |||
| 45 | #define IMX2_WDT_WSR 0x02 /* Service Register */ | ||
| 46 | #define IMX2_WDT_SEQ1 0x5555 /* -> service sequence 1 */ | ||
| 47 | #define IMX2_WDT_SEQ2 0xAAAA /* -> service sequence 2 */ | ||
| 48 | |||
| 49 | #define IMX2_WDT_MAX_TIME 128 | ||
| 50 | #define IMX2_WDT_DEFAULT_TIME 60 /* in seconds */ | ||
| 51 | |||
| 52 | #define WDOG_SEC_TO_COUNT(s) ((s * 2 - 1) << 8) | ||
| 53 | |||
| 54 | #define IMX2_WDT_STATUS_OPEN 0 | ||
| 55 | #define IMX2_WDT_STATUS_STARTED 1 | ||
| 56 | #define IMX2_WDT_EXPECT_CLOSE 2 | ||
| 57 | |||
| 58 | static struct { | ||
| 59 | struct clk *clk; | ||
| 60 | void __iomem *base; | ||
| 61 | unsigned timeout; | ||
| 62 | unsigned long status; | ||
| 63 | struct timer_list timer; /* Pings the watchdog when closed */ | ||
| 64 | } imx2_wdt; | ||
| 65 | |||
| 66 | static struct miscdevice imx2_wdt_miscdev; | ||
| 67 | |||
| 68 | static int nowayout = WATCHDOG_NOWAYOUT; | ||
| 69 | module_param(nowayout, int, 0); | ||
| 70 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" | ||
| 71 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | ||
| 72 | |||
| 73 | |||
| 74 | static unsigned timeout = IMX2_WDT_DEFAULT_TIME; | ||
| 75 | module_param(timeout, uint, 0); | ||
| 76 | MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default=" | ||
| 77 | __MODULE_STRING(IMX2_WDT_DEFAULT_TIME) ")"); | ||
| 78 | |||
| 79 | static const struct watchdog_info imx2_wdt_info = { | ||
| 80 | .identity = "imx2+ watchdog", | ||
| 81 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE, | ||
| 82 | }; | ||
| 83 | |||
| 84 | static inline void imx2_wdt_setup(void) | ||
| 85 | { | ||
| 86 | u16 val = __raw_readw(imx2_wdt.base + IMX2_WDT_WCR); | ||
| 87 | |||
| 88 | /* Strip the old watchdog Time-Out value */ | ||
| 89 | val &= ~IMX2_WDT_WCR_WT; | ||
| 90 | /* Generate reset if WDOG times out */ | ||
| 91 | val &= ~IMX2_WDT_WCR_WRE; | ||
| 92 | /* Keep Watchdog Disabled */ | ||
| 93 | val &= ~IMX2_WDT_WCR_WDE; | ||
| 94 | /* Set the watchdog's Time-Out value */ | ||
| 95 | val |= WDOG_SEC_TO_COUNT(imx2_wdt.timeout); | ||
| 96 | |||
| 97 | __raw_writew(val, imx2_wdt.base + IMX2_WDT_WCR); | ||
| 98 | |||
| 99 | /* enable the watchdog */ | ||
| 100 | val |= IMX2_WDT_WCR_WDE; | ||
| 101 | __raw_writew(val, imx2_wdt.base + IMX2_WDT_WCR); | ||
| 102 | } | ||
| 103 | |||
| 104 | static inline void imx2_wdt_ping(void) | ||
| 105 | { | ||
| 106 | __raw_writew(IMX2_WDT_SEQ1, imx2_wdt.base + IMX2_WDT_WSR); | ||
| 107 | __raw_writew(IMX2_WDT_SEQ2, imx2_wdt.base + IMX2_WDT_WSR); | ||
| 108 | } | ||
| 109 | |||
| 110 | static void imx2_wdt_timer_ping(unsigned long arg) | ||
| 111 | { | ||
| 112 | /* ping it every imx2_wdt.timeout / 2 seconds to prevent reboot */ | ||
| 113 | imx2_wdt_ping(); | ||
| 114 | mod_timer(&imx2_wdt.timer, jiffies + imx2_wdt.timeout * HZ / 2); | ||
| 115 | } | ||
| 116 | |||
| 117 | static void imx2_wdt_start(void) | ||
| 118 | { | ||
| 119 | if (!test_and_set_bit(IMX2_WDT_STATUS_STARTED, &imx2_wdt.status)) { | ||
| 120 | /* at our first start we enable clock and do initialisations */ | ||
| 121 | clk_enable(imx2_wdt.clk); | ||
| 122 | |||
| 123 | imx2_wdt_setup(); | ||
| 124 | } else /* delete the timer that pings the watchdog after close */ | ||
| 125 | del_timer_sync(&imx2_wdt.timer); | ||
| 126 | |||
| 127 | /* Watchdog is enabled - time to reload the timeout value */ | ||
| 128 | imx2_wdt_ping(); | ||
| 129 | } | ||
| 130 | |||
| 131 | static void imx2_wdt_stop(void) | ||
| 132 | { | ||
| 133 | /* we don't need a clk_disable, it cannot be disabled once started. | ||
| 134 | * We use a timer to ping the watchdog while /dev/watchdog is closed */ | ||
| 135 | imx2_wdt_timer_ping(0); | ||
| 136 | } | ||
| 137 | |||
| 138 | static void imx2_wdt_set_timeout(int new_timeout) | ||
| 139 | { | ||
| 140 | u16 val = __raw_readw(imx2_wdt.base + IMX2_WDT_WCR); | ||
| 141 | |||
| 142 | /* set the new timeout value in the WSR */ | ||
| 143 | val &= ~IMX2_WDT_WCR_WT; | ||
| 144 | val |= WDOG_SEC_TO_COUNT(new_timeout); | ||
| 145 | __raw_writew(val, imx2_wdt.base + IMX2_WDT_WCR); | ||
| 146 | } | ||
| 147 | |||
| 148 | static int imx2_wdt_open(struct inode *inode, struct file *file) | ||
| 149 | { | ||
| 150 | if (test_and_set_bit(IMX2_WDT_STATUS_OPEN, &imx2_wdt.status)) | ||
| 151 | return -EBUSY; | ||
| 152 | |||
| 153 | imx2_wdt_start(); | ||
| 154 | return nonseekable_open(inode, file); | ||
| 155 | } | ||
| 156 | |||
| 157 | static int imx2_wdt_close(struct inode *inode, struct file *file) | ||
| 158 | { | ||
| 159 | if (test_bit(IMX2_WDT_EXPECT_CLOSE, &imx2_wdt.status) && !nowayout) | ||
| 160 | imx2_wdt_stop(); | ||
| 161 | else { | ||
| 162 | dev_crit(imx2_wdt_miscdev.parent, | ||
| 163 | "Unexpected close: Expect reboot!\n"); | ||
| 164 | imx2_wdt_ping(); | ||
| 165 | } | ||
| 166 | |||
| 167 | clear_bit(IMX2_WDT_EXPECT_CLOSE, &imx2_wdt.status); | ||
| 168 | clear_bit(IMX2_WDT_STATUS_OPEN, &imx2_wdt.status); | ||
| 169 | return 0; | ||
| 170 | } | ||
| 171 | |||
| 172 | static long imx2_wdt_ioctl(struct file *file, unsigned int cmd, | ||
| 173 | unsigned long arg) | ||
| 174 | { | ||
| 175 | void __user *argp = (void __user *)arg; | ||
| 176 | int __user *p = argp; | ||
| 177 | int new_value; | ||
| 178 | |||
| 179 | switch (cmd) { | ||
| 180 | case WDIOC_GETSUPPORT: | ||
| 181 | return copy_to_user(argp, &imx2_wdt_info, | ||
| 182 | sizeof(struct watchdog_info)) ? -EFAULT : 0; | ||
| 183 | |||
| 184 | case WDIOC_GETSTATUS: | ||
| 185 | case WDIOC_GETBOOTSTATUS: | ||
| 186 | return put_user(0, p); | ||
| 187 | |||
| 188 | case WDIOC_KEEPALIVE: | ||
| 189 | imx2_wdt_ping(); | ||
| 190 | return 0; | ||
| 191 | |||
| 192 | case WDIOC_SETTIMEOUT: | ||
| 193 | if (get_user(new_value, p)) | ||
| 194 | return -EFAULT; | ||
| 195 | if ((new_value < 1) || (new_value > IMX2_WDT_MAX_TIME)) | ||
| 196 | return -EINVAL; | ||
| 197 | imx2_wdt_set_timeout(new_value); | ||
| 198 | imx2_wdt.timeout = new_value; | ||
| 199 | imx2_wdt_ping(); | ||
| 200 | |||
| 201 | /* Fallthrough to return current value */ | ||
| 202 | case WDIOC_GETTIMEOUT: | ||
| 203 | return put_user(imx2_wdt.timeout, p); | ||
| 204 | |||
| 205 | default: | ||
| 206 | return -ENOTTY; | ||
| 207 | } | ||
| 208 | } | ||
| 209 | |||
| 210 | static ssize_t imx2_wdt_write(struct file *file, const char __user *data, | ||
| 211 | size_t len, loff_t *ppos) | ||
| 212 | { | ||
| 213 | size_t i; | ||
| 214 | char c; | ||
| 215 | |||
| 216 | if (len == 0) /* Can we see this even ? */ | ||
| 217 | return 0; | ||
| 218 | |||
| 219 | clear_bit(IMX2_WDT_EXPECT_CLOSE, &imx2_wdt.status); | ||
| 220 | /* scan to see whether or not we got the magic character */ | ||
| 221 | for (i = 0; i != len; i++) { | ||
| 222 | if (get_user(c, data + i)) | ||
| 223 | return -EFAULT; | ||
| 224 | if (c == 'V') | ||
| 225 | set_bit(IMX2_WDT_EXPECT_CLOSE, &imx2_wdt.status); | ||
| 226 | } | ||
| 227 | |||
| 228 | imx2_wdt_ping(); | ||
| 229 | return len; | ||
| 230 | } | ||
| 231 | |||
| 232 | static const struct file_operations imx2_wdt_fops = { | ||
| 233 | .owner = THIS_MODULE, | ||
| 234 | .llseek = no_llseek, | ||
| 235 | .unlocked_ioctl = imx2_wdt_ioctl, | ||
| 236 | .open = imx2_wdt_open, | ||
| 237 | .release = imx2_wdt_close, | ||
| 238 | .write = imx2_wdt_write, | ||
| 239 | }; | ||
| 240 | |||
| 241 | static struct miscdevice imx2_wdt_miscdev = { | ||
| 242 | .minor = WATCHDOG_MINOR, | ||
| 243 | .name = "watchdog", | ||
| 244 | .fops = &imx2_wdt_fops, | ||
| 245 | }; | ||
| 246 | |||
| 247 | static int __init imx2_wdt_probe(struct platform_device *pdev) | ||
| 248 | { | ||
| 249 | int ret; | ||
| 250 | int res_size; | ||
| 251 | struct resource *res; | ||
| 252 | |||
| 253 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
| 254 | if (!res) { | ||
| 255 | dev_err(&pdev->dev, "can't get device resources\n"); | ||
| 256 | return -ENODEV; | ||
| 257 | } | ||
| 258 | |||
| 259 | res_size = resource_size(res); | ||
| 260 | if (!devm_request_mem_region(&pdev->dev, res->start, res_size, | ||
| 261 | res->name)) { | ||
| 262 | dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n", | ||
| 263 | res_size, res->start); | ||
| 264 | return -ENOMEM; | ||
| 265 | } | ||
| 266 | |||
| 267 | imx2_wdt.base = devm_ioremap_nocache(&pdev->dev, res->start, res_size); | ||
| 268 | if (!imx2_wdt.base) { | ||
| 269 | dev_err(&pdev->dev, "ioremap failed\n"); | ||
| 270 | return -ENOMEM; | ||
| 271 | } | ||
| 272 | |||
| 273 | imx2_wdt.clk = clk_get_sys("imx-wdt.0", NULL); | ||
| 274 | if (IS_ERR(imx2_wdt.clk)) { | ||
| 275 | dev_err(&pdev->dev, "can't get Watchdog clock\n"); | ||
| 276 | return PTR_ERR(imx2_wdt.clk); | ||
| 277 | } | ||
| 278 | |||
| 279 | imx2_wdt.timeout = clamp_t(unsigned, timeout, 1, IMX2_WDT_MAX_TIME); | ||
| 280 | if (imx2_wdt.timeout != timeout) | ||
| 281 | dev_warn(&pdev->dev, "Initial timeout out of range! " | ||
| 282 | "Clamped from %u to %u\n", timeout, imx2_wdt.timeout); | ||
| 283 | |||
| 284 | setup_timer(&imx2_wdt.timer, imx2_wdt_timer_ping, 0); | ||
| 285 | |||
| 286 | imx2_wdt_miscdev.parent = &pdev->dev; | ||
| 287 | ret = misc_register(&imx2_wdt_miscdev); | ||
| 288 | if (ret) | ||
| 289 | goto fail; | ||
| 290 | |||
| 291 | dev_info(&pdev->dev, | ||
| 292 | "IMX2+ Watchdog Timer enabled. timeout=%ds (nowayout=%d)\n", | ||
| 293 | imx2_wdt.timeout, nowayout); | ||
| 294 | return 0; | ||
| 295 | |||
| 296 | fail: | ||
| 297 | imx2_wdt_miscdev.parent = NULL; | ||
| 298 | clk_put(imx2_wdt.clk); | ||
| 299 | return ret; | ||
| 300 | } | ||
| 301 | |||
| 302 | static int __exit imx2_wdt_remove(struct platform_device *pdev) | ||
| 303 | { | ||
| 304 | misc_deregister(&imx2_wdt_miscdev); | ||
| 305 | |||
| 306 | if (test_bit(IMX2_WDT_STATUS_STARTED, &imx2_wdt.status)) { | ||
| 307 | del_timer_sync(&imx2_wdt.timer); | ||
| 308 | |||
| 309 | dev_crit(imx2_wdt_miscdev.parent, | ||
| 310 | "Device removed: Expect reboot!\n"); | ||
| 311 | } else | ||
| 312 | clk_put(imx2_wdt.clk); | ||
| 313 | |||
| 314 | imx2_wdt_miscdev.parent = NULL; | ||
| 315 | return 0; | ||
| 316 | } | ||
| 317 | |||
| 318 | static void imx2_wdt_shutdown(struct platform_device *pdev) | ||
| 319 | { | ||
| 320 | if (test_bit(IMX2_WDT_STATUS_STARTED, &imx2_wdt.status)) { | ||
| 321 | /* we are running, we need to delete the timer but will give | ||
| 322 | * max timeout before reboot will take place */ | ||
| 323 | del_timer_sync(&imx2_wdt.timer); | ||
| 324 | imx2_wdt_set_timeout(IMX2_WDT_MAX_TIME); | ||
| 325 | imx2_wdt_ping(); | ||
| 326 | |||
| 327 | dev_crit(imx2_wdt_miscdev.parent, | ||
| 328 | "Device shutdown: Expect reboot!\n"); | ||
| 329 | } | ||
| 330 | } | ||
| 331 | |||
| 332 | static struct platform_driver imx2_wdt_driver = { | ||
| 333 | .probe = imx2_wdt_probe, | ||
| 334 | .remove = __exit_p(imx2_wdt_remove), | ||
| 335 | .shutdown = imx2_wdt_shutdown, | ||
| 336 | .driver = { | ||
| 337 | .name = DRIVER_NAME, | ||
| 338 | .owner = THIS_MODULE, | ||
| 339 | }, | ||
| 340 | }; | ||
| 341 | |||
| 342 | static int __init imx2_wdt_init(void) | ||
| 343 | { | ||
| 344 | return platform_driver_probe(&imx2_wdt_driver, imx2_wdt_probe); | ||
| 345 | } | ||
| 346 | module_init(imx2_wdt_init); | ||
| 347 | |||
| 348 | static void __exit imx2_wdt_exit(void) | ||
| 349 | { | ||
| 350 | platform_driver_unregister(&imx2_wdt_driver); | ||
| 351 | } | ||
| 352 | module_exit(imx2_wdt_exit); | ||
| 353 | |||
| 354 | MODULE_AUTHOR("Wolfram Sang"); | ||
| 355 | MODULE_DESCRIPTION("Watchdog driver for IMX2 and later"); | ||
| 356 | MODULE_LICENSE("GPL v2"); | ||
| 357 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | ||
| 358 | MODULE_ALIAS("platform:" DRIVER_NAME); | ||
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index 7b55974191dd..6622335773bb 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
| @@ -53,7 +53,7 @@ static int mpc8xxx_wdt_init_late(void); | |||
| 53 | static u16 timeout = 0xffff; | 53 | static u16 timeout = 0xffff; |
| 54 | module_param(timeout, ushort, 0); | 54 | module_param(timeout, ushort, 0); |
| 55 | MODULE_PARM_DESC(timeout, | 55 | MODULE_PARM_DESC(timeout, |
| 56 | "Watchdog timeout in ticks. (0<timeout<65536, default=65535"); | 56 | "Watchdog timeout in ticks. (0<timeout<65536, default=65535)"); |
| 57 | 57 | ||
| 58 | static int reset = 1; | 58 | static int reset = 1; |
| 59 | module_param(reset, bool, 0); | 59 | module_param(reset, bool, 0); |
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c index d3aa2f1fe61d..3a56bc360924 100644 --- a/drivers/watchdog/pc87413_wdt.c +++ b/drivers/watchdog/pc87413_wdt.c | |||
| @@ -53,7 +53,9 @@ | |||
| 53 | #define WDTO 0x11 /* Watchdog timeout register */ | 53 | #define WDTO 0x11 /* Watchdog timeout register */ |
| 54 | #define WDCFG 0x12 /* Watchdog config register */ | 54 | #define WDCFG 0x12 /* Watchdog config register */ |
| 55 | 55 | ||
| 56 | static int io = 0x2E; /* Address used on Portwell Boards */ | 56 | #define IO_DEFAULT 0x2E /* Address used on Portwell Boards */ |
| 57 | |||
| 58 | static int io = IO_DEFAULT; | ||
| 57 | 59 | ||
| 58 | static int timeout = DEFAULT_TIMEOUT; /* timeout value */ | 60 | static int timeout = DEFAULT_TIMEOUT; /* timeout value */ |
| 59 | static unsigned long timer_enabled; /* is the timer enabled? */ | 61 | static unsigned long timer_enabled; /* is the timer enabled? */ |
| @@ -583,12 +585,13 @@ MODULE_LICENSE("GPL"); | |||
| 583 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | 585 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); |
| 584 | 586 | ||
| 585 | module_param(io, int, 0); | 587 | module_param(io, int, 0); |
| 586 | MODULE_PARM_DESC(io, MODNAME " I/O port (default: " __MODULE_STRING(io) ")."); | 588 | MODULE_PARM_DESC(io, MODNAME " I/O port (default: " |
| 589 | __MODULE_STRING(IO_DEFAULT) ")."); | ||
| 587 | 590 | ||
| 588 | module_param(timeout, int, 0); | 591 | module_param(timeout, int, 0); |
| 589 | MODULE_PARM_DESC(timeout, | 592 | MODULE_PARM_DESC(timeout, |
| 590 | "Watchdog timeout in minutes (default=" | 593 | "Watchdog timeout in minutes (default=" |
| 591 | __MODULE_STRING(timeout) ")."); | 594 | __MODULE_STRING(DEFAULT_TIMEOUT) ")."); |
| 592 | 595 | ||
| 593 | module_param(nowayout, int, 0); | 596 | module_param(nowayout, int, 0); |
| 594 | MODULE_PARM_DESC(nowayout, | 597 | MODULE_PARM_DESC(nowayout, |
diff --git a/drivers/watchdog/pnx833x_wdt.c b/drivers/watchdog/pnx833x_wdt.c index 09102f09e681..a7b5ad2a98bd 100644 --- a/drivers/watchdog/pnx833x_wdt.c +++ b/drivers/watchdog/pnx833x_wdt.c | |||
| @@ -33,6 +33,8 @@ | |||
| 33 | #define PFX "pnx833x: " | 33 | #define PFX "pnx833x: " |
| 34 | #define WATCHDOG_TIMEOUT 30 /* 30 sec Maximum timeout */ | 34 | #define WATCHDOG_TIMEOUT 30 /* 30 sec Maximum timeout */ |
| 35 | #define WATCHDOG_COUNT_FREQUENCY 68000000U /* Watchdog counts at 68MHZ. */ | 35 | #define WATCHDOG_COUNT_FREQUENCY 68000000U /* Watchdog counts at 68MHZ. */ |
| 36 | #define PNX_WATCHDOG_TIMEOUT (WATCHDOG_TIMEOUT * WATCHDOG_COUNT_FREQUENCY) | ||
| 37 | #define PNX_TIMEOUT_VALUE 2040000000U | ||
| 36 | 38 | ||
| 37 | /** CONFIG block */ | 39 | /** CONFIG block */ |
| 38 | #define PNX833X_CONFIG (0x07000U) | 40 | #define PNX833X_CONFIG (0x07000U) |
| @@ -47,20 +49,21 @@ | |||
| 47 | static int pnx833x_wdt_alive; | 49 | static int pnx833x_wdt_alive; |
| 48 | 50 | ||
| 49 | /* Set default timeout in MHZ.*/ | 51 | /* Set default timeout in MHZ.*/ |
| 50 | static int pnx833x_wdt_timeout = (WATCHDOG_TIMEOUT * WATCHDOG_COUNT_FREQUENCY); | 52 | static int pnx833x_wdt_timeout = PNX_WATCHDOG_TIMEOUT; |
| 51 | module_param(pnx833x_wdt_timeout, int, 0); | 53 | module_param(pnx833x_wdt_timeout, int, 0); |
| 52 | MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock), default=" | 54 | MODULE_PARM_DESC(timeout, "Watchdog timeout in Mhz. (68Mhz clock), default=" |
| 53 | __MODULE_STRING(pnx833x_wdt_timeout) "(30 seconds)."); | 55 | __MODULE_STRING(PNX_TIMEOUT_VALUE) "(30 seconds)."); |
| 54 | 56 | ||
| 55 | static int nowayout = WATCHDOG_NOWAYOUT; | 57 | static int nowayout = WATCHDOG_NOWAYOUT; |
| 56 | module_param(nowayout, int, 0); | 58 | module_param(nowayout, int, 0); |
| 57 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" | 59 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" |
| 58 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 60 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
| 59 | 61 | ||
| 60 | static int start_enabled = 1; | 62 | #define START_DEFAULT 1 |
| 63 | static int start_enabled = START_DEFAULT; | ||
| 61 | module_param(start_enabled, int, 0); | 64 | module_param(start_enabled, int, 0); |
| 62 | MODULE_PARM_DESC(start_enabled, "Watchdog is started on module insertion " | 65 | MODULE_PARM_DESC(start_enabled, "Watchdog is started on module insertion " |
| 63 | "(default=" __MODULE_STRING(start_enabled) ")"); | 66 | "(default=" __MODULE_STRING(START_DEFAULT) ")"); |
| 64 | 67 | ||
| 65 | static void pnx833x_wdt_start(void) | 68 | static void pnx833x_wdt_start(void) |
| 66 | { | 69 | { |
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index e4cebef55177..300932580ded 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
| @@ -63,7 +63,7 @@ module_param(nowayout, int, 0); | |||
| 63 | module_param(soft_noboot, int, 0); | 63 | module_param(soft_noboot, int, 0); |
| 64 | module_param(debug, int, 0); | 64 | module_param(debug, int, 0); |
| 65 | 65 | ||
| 66 | MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. default=" | 66 | MODULE_PARM_DESC(tmr_margin, "Watchdog tmr_margin in seconds. (default=" |
| 67 | __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")"); | 67 | __MODULE_STRING(CONFIG_S3C2410_WATCHDOG_DEFAULT_TIME) ")"); |
| 68 | MODULE_PARM_DESC(tmr_atboot, | 68 | MODULE_PARM_DESC(tmr_atboot, |
| 69 | "Watchdog is started at boot time if set to 1, default=" | 69 | "Watchdog is started at boot time if set to 1, default=" |
| @@ -71,8 +71,8 @@ MODULE_PARM_DESC(tmr_atboot, | |||
| 71 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" | 71 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" |
| 72 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 72 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
| 73 | MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, " | 73 | MODULE_PARM_DESC(soft_noboot, "Watchdog action, set to 1 to ignore reboots, " |
| 74 | "0 to reboot (default depends on ONLY_TESTING)"); | 74 | "0 to reboot (default 0)"); |
| 75 | MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug, (default 0)"); | 75 | MODULE_PARM_DESC(debug, "Watchdog debug, set to >1 for debug (default 0)"); |
| 76 | 76 | ||
| 77 | static unsigned long open_lock; | 77 | static unsigned long open_lock; |
| 78 | static struct device *wdt_dev; /* platform device attached to */ | 78 | static struct device *wdt_dev; /* platform device attached to */ |
| @@ -426,8 +426,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev) | |||
| 426 | wdt_mem = request_mem_region(res->start, size, pdev->name); | 426 | wdt_mem = request_mem_region(res->start, size, pdev->name); |
| 427 | if (wdt_mem == NULL) { | 427 | if (wdt_mem == NULL) { |
| 428 | dev_err(dev, "failed to get memory region\n"); | 428 | dev_err(dev, "failed to get memory region\n"); |
| 429 | ret = -ENOENT; | 429 | return -EBUSY; |
| 430 | goto err_req; | ||
| 431 | } | 430 | } |
| 432 | 431 | ||
| 433 | wdt_base = ioremap(res->start, size); | 432 | wdt_base = ioremap(res->start, size); |
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c index a03f84e5ee1f..6fc74065abee 100644 --- a/drivers/watchdog/shwdt.c +++ b/drivers/watchdog/shwdt.c | |||
| @@ -496,7 +496,7 @@ MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | |||
| 496 | module_param(clock_division_ratio, int, 0); | 496 | module_param(clock_division_ratio, int, 0); |
| 497 | MODULE_PARM_DESC(clock_division_ratio, | 497 | MODULE_PARM_DESC(clock_division_ratio, |
| 498 | "Clock division ratio. Valid ranges are from 0x5 (1.31ms) " | 498 | "Clock division ratio. Valid ranges are from 0x5 (1.31ms) " |
| 499 | "to 0x7 (5.25ms). (default=" __MODULE_STRING(clock_division_ratio) ")"); | 499 | "to 0x7 (5.25ms). (default=" __MODULE_STRING(WTCSR_CKS_4096) ")"); |
| 500 | 500 | ||
| 501 | module_param(heartbeat, int, 0); | 501 | module_param(heartbeat, int, 0); |
| 502 | MODULE_PARM_DESC(heartbeat, | 502 | MODULE_PARM_DESC(heartbeat, |
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c index dcabe77ad141..b5045ca7e61c 100644 --- a/drivers/watchdog/twl4030_wdt.c +++ b/drivers/watchdog/twl4030_wdt.c | |||
| @@ -190,6 +190,8 @@ static int __devinit twl4030_wdt_probe(struct platform_device *pdev) | |||
| 190 | 190 | ||
| 191 | twl4030_wdt_dev = pdev; | 191 | twl4030_wdt_dev = pdev; |
| 192 | 192 | ||
| 193 | twl4030_wdt_disable(wdt); | ||
| 194 | |||
| 193 | ret = misc_register(&wdt->miscdev); | 195 | ret = misc_register(&wdt->miscdev); |
| 194 | if (ret) { | 196 | if (ret) { |
| 195 | dev_err(wdt->miscdev.parent, | 197 | dev_err(wdt->miscdev.parent, |
diff --git a/drivers/watchdog/wdt.c b/drivers/watchdog/wdt.c index bfda2e99dd89..552a4381e78f 100644 --- a/drivers/watchdog/wdt.c +++ b/drivers/watchdog/wdt.c | |||
| @@ -91,7 +91,7 @@ MODULE_PARM_DESC(tachometer, | |||
| 91 | static int type = 500; | 91 | static int type = 500; |
| 92 | module_param(type, int, 0); | 92 | module_param(type, int, 0); |
| 93 | MODULE_PARM_DESC(type, | 93 | MODULE_PARM_DESC(type, |
| 94 | "WDT501-P Card type (500 or 501 , default=500)"); | 94 | "WDT501-P Card type (500 or 501, default=500)"); |
| 95 | 95 | ||
| 96 | /* | 96 | /* |
| 97 | * Programming support | 97 | * Programming support |
diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c index 90ef70eb47d7..5c2521fc836c 100644 --- a/drivers/watchdog/wdt977.c +++ b/drivers/watchdog/wdt977.c | |||
| @@ -63,7 +63,7 @@ static char expect_close; | |||
| 63 | static DEFINE_SPINLOCK(spinlock); | 63 | static DEFINE_SPINLOCK(spinlock); |
| 64 | 64 | ||
| 65 | module_param(timeout, int, 0); | 65 | module_param(timeout, int, 0); |
| 66 | MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (60..15300), default=" | 66 | MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (60..15300, default=" |
| 67 | __MODULE_STRING(DEFAULT_TIMEOUT) ")"); | 67 | __MODULE_STRING(DEFAULT_TIMEOUT) ")"); |
| 68 | module_param(testmode, int, 0); | 68 | module_param(testmode, int, 0); |
| 69 | MODULE_PARM_DESC(testmode, "Watchdog testmode (1 = no reboot), default=0"); | 69 | MODULE_PARM_DESC(testmode, "Watchdog testmode (1 = no reboot), default=0"); |
