summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/bcm47xx_wdt.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2011-07-23 01:20:12 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-08-08 14:29:30 -0400
commit08ccf57283f89adbc2ff897ad82d6ad4560db7cd (patch)
tree11d715ac33eab75e57a8e62b0b7d822e316a9145 /drivers/watchdog/bcm47xx_wdt.c
parent908debc8da0d5a91418f71c6a462f62bd2ac69ef (diff)
downloadlinux-08ccf57283f89adbc2ff897ad82d6ad4560db7cd.tar.bz2
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.c12
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;
static inline void bcm47xx_wdt_hw_start(void)
{
/* this is 2,5s on 100Mhz clock and 2s on 133 Mhz */
- ssb_watchdog_timer_set(&ssb_bcm47xx, 0xfffffff);
+ switch (bcm47xx_bus_type) {
+ case BCM47XX_BUS_TYPE_SSB:
+ ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 0xfffffff);
+ break;
+ }
}
static inline int bcm47xx_wdt_hw_stop(void)
{
- return ssb_watchdog_timer_set(&ssb_bcm47xx, 0);
+ switch (bcm47xx_bus_type) {
+ case BCM47XX_BUS_TYPE_SSB:
+ return ssb_watchdog_timer_set(&bcm47xx_bus.ssb, 0);
+ }
+ return -EINVAL;
}
static void bcm47xx_timer_tick(unsigned long unused)