diff options
Diffstat (limited to 'drivers/watchdog/bcm47xx_wdt.c')
-rw-r--r-- | drivers/watchdog/bcm47xx_wdt.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c index bd44417c84d4..5c5f4b14fd05 100644 --- a/drivers/watchdog/bcm47xx_wdt.c +++ b/drivers/watchdog/bcm47xx_wdt.c | |||
@@ -54,12 +54,35 @@ static atomic_t ticks; | |||
54 | static inline void bcm47xx_wdt_hw_start(void) | 54 | static inline void bcm47xx_wdt_hw_start(void) |
55 | { | 55 | { |
56 | /* this is 2,5s on 100Mhz clock and 2s on 133 Mhz */ | 56 | /* this is 2,5s on 100Mhz clock and 2s on 133 Mhz */ |
57 | ssb_watchdog_timer_set(&ssb_bcm47xx, 0xfffffff); | 57 | switch (bcm47xx_bus_type) { |
58 | #ifdef CONFIG_BCM47XX_SSB | ||
59 | case BCM47XX_BUS_TYPE_SSB: | ||
60 | ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 0xfffffff); | ||
61 | break; | ||
62 | #endif | ||
63 | #ifdef CONFIG_BCM47XX_BCMA | ||
64 | case BCM47XX_BUS_TYPE_BCMA: | ||
65 | bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, | ||
66 | 0xfffffff); | ||
67 | break; | ||
68 | #endif | ||
69 | } | ||
58 | } | 70 | } |
59 | 71 | ||
60 | static inline int bcm47xx_wdt_hw_stop(void) | 72 | static inline int bcm47xx_wdt_hw_stop(void) |
61 | { | 73 | { |
62 | return ssb_watchdog_timer_set(&ssb_bcm47xx, 0); | 74 | switch (bcm47xx_bus_type) { |
75 | #ifdef CONFIG_BCM47XX_SSB | ||
76 | case BCM47XX_BUS_TYPE_SSB: | ||
77 | return ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 0); | ||
78 | #endif | ||
79 | #ifdef CONFIG_BCM47XX_BCMA | ||
80 | case BCM47XX_BUS_TYPE_BCMA: | ||
81 | bcma_chipco_watchdog_timer_set(&bcm47xx_bus.bcma.bus.drv_cc, 0); | ||
82 | return 0; | ||
83 | #endif | ||
84 | } | ||
85 | return -EINVAL; | ||
63 | } | 86 | } |
64 | 87 | ||
65 | static void bcm47xx_timer_tick(unsigned long unused) | 88 | static void bcm47xx_timer_tick(unsigned long unused) |