diff options
Diffstat (limited to 'drivers/watchdog/octeon-wdt-main.c')
-rw-r--r-- | drivers/watchdog/octeon-wdt-main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/watchdog/octeon-wdt-main.c b/drivers/watchdog/octeon-wdt-main.c index 2a410170eca6..945ee8300306 100644 --- a/drivers/watchdog/octeon-wdt-main.c +++ b/drivers/watchdog/octeon-wdt-main.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include <linux/cpu.h> | 64 | #include <linux/cpu.h> |
65 | #include <linux/smp.h> | 65 | #include <linux/smp.h> |
66 | #include <linux/fs.h> | 66 | #include <linux/fs.h> |
67 | #include <linux/irq.h> | ||
67 | 68 | ||
68 | #include <asm/mipsregs.h> | 69 | #include <asm/mipsregs.h> |
69 | #include <asm/uasm.h> | 70 | #include <asm/uasm.h> |
@@ -477,7 +478,7 @@ static void octeon_wdt_calc_parameters(int t) | |||
477 | 478 | ||
478 | countdown_reset = periods > 2 ? periods - 2 : 0; | 479 | countdown_reset = periods > 2 ? periods - 2 : 0; |
479 | heartbeat = t; | 480 | heartbeat = t; |
480 | timeout_cnt = ((octeon_get_clock_rate() >> 8) * timeout_sec) >> 8; | 481 | timeout_cnt = ((octeon_get_io_clock_rate() >> 8) * timeout_sec) >> 8; |
481 | } | 482 | } |
482 | 483 | ||
483 | static int octeon_wdt_set_heartbeat(int t) | 484 | static int octeon_wdt_set_heartbeat(int t) |
@@ -676,7 +677,7 @@ static int __init octeon_wdt_init(void) | |||
676 | max_timeout_sec = 6; | 677 | max_timeout_sec = 6; |
677 | do { | 678 | do { |
678 | max_timeout_sec--; | 679 | max_timeout_sec--; |
679 | timeout_cnt = ((octeon_get_clock_rate() >> 8) * max_timeout_sec) >> 8; | 680 | timeout_cnt = ((octeon_get_io_clock_rate() >> 8) * max_timeout_sec) >> 8; |
680 | } while (timeout_cnt > 65535); | 681 | } while (timeout_cnt > 65535); |
681 | 682 | ||
682 | BUG_ON(timeout_cnt == 0); | 683 | BUG_ON(timeout_cnt == 0); |