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>
This commit is contained in:
Hauke Mehrtens
2012-12-05 18:46:02 +01:00
committed by John W. Linville
parent a22a3114a8
commit a4855f39d4
4 changed files with 35 additions and 0 deletions

View File

@@ -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)