summaryrefslogtreecommitdiff
path: root/drivers/bcma/main.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-12-05 18:46:02 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-12-06 14:58:57 -0500
commita4855f39d4eb3f550ca5f4aac79bd999da42dc54 (patch)
treec334a19f43462a6def7abfca4c372385ce2bbdea /drivers/bcma/main.c
parenta22a3114a820ca3eadee6af53d90736e5ca68fa1 (diff)
bcma: register watchdog driver
Register the watchdog driver to the system if this is a SoC. Using the watchdog on a non SoC device, like a PCIe card, will make the PCIe card die when the timeout expired, but starting it again is not supported by bcma. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/main.c')
-rw-r--r--drivers/bcma/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index a9718893000b..debd4f142f93 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -165,6 +165,12 @@ static int bcma_register_cores(struct bcma_bus *bus)
}
#endif
+ if (bus->hosttype == BCMA_HOSTTYPE_SOC) {
+ err = bcma_chipco_watchdog_register(&bus->drv_cc);
+ if (err)
+ bcma_err(bus, "Error registering watchdog driver\n");
+ }
+
return 0;
}
@@ -177,6 +183,8 @@ static void bcma_unregister_cores(struct bcma_bus *bus)
if (core->dev_registered)
device_unregister(&core->dev);
}
+ if (bus->hosttype == BCMA_HOSTTYPE_SOC)
+ platform_device_unregister(bus->drv_cc.watchdog);
}
int __devinit bcma_bus_register(struct bcma_bus *bus)