diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-07-22 19:20:12 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-08 14:29:30 -0400 |
commit | 08ccf57283f89adbc2ff897ad82d6ad4560db7cd (patch) | |
tree | 11d715ac33eab75e57a8e62b0b7d822e316a9145 /drivers/watchdog/bcm47xx_wdt.c | |
parent | 908debc8da0d5a91418f71c6a462f62bd2ac69ef (diff) |
bcm47xx: prepare to support different buses
Prepare bcm47xx to support different System buses. Before adding
support for bcma it should be possible to build bcm47xx without the
need of ssb. With this patch bcm47xx does not directly contain a
ssb_bus, but a union contain all the supported system buses. As a SoC
just uses one system bus a union is a good choice.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/watchdog/bcm47xx_wdt.c')
-rw-r--r-- | drivers/watchdog/bcm47xx_wdt.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c index bd44417c84d4..c43406c48613 100644 --- a/drivers/watchdog/bcm47xx_wdt.c +++ b/drivers/watchdog/bcm47xx_wdt.c | |||
@@ -54,12 +54,20 @@ 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 | case BCM47XX_BUS_TYPE_SSB: | ||
59 | ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 0xfffffff); | ||
60 | break; | ||
61 | } | ||
58 | } | 62 | } |
59 | 63 | ||
60 | static inline int bcm47xx_wdt_hw_stop(void) | 64 | static inline int bcm47xx_wdt_hw_stop(void) |
61 | { | 65 | { |
62 | return ssb_watchdog_timer_set(&ssb_bcm47xx, 0); | 66 | switch (bcm47xx_bus_type) { |
67 | case BCM47XX_BUS_TYPE_SSB: | ||
68 | return ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 0); | ||
69 | } | ||
70 | return -EINVAL; | ||
63 | } | 71 | } |
64 | 72 | ||
65 | static void bcm47xx_timer_tick(unsigned long unused) | 73 | static void bcm47xx_timer_tick(unsigned long unused) |