]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ssb/main.c
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
[karo-tx-linux.git] / drivers / ssb / main.c
index 87f0ddf4f3f3aab5b09b2b0362eb39437f3aeb69..c82c5c95fe85022180971af93139b8fc33416c50 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/module.h>
+#include <linux/platform_device.h>
 #include <linux/ssb/ssb.h>
 #include <linux/ssb/ssb_regs.h>
 #include <linux/ssb/ssb_driver_gige.h>
@@ -433,6 +434,11 @@ static void ssb_devices_unregister(struct ssb_bus *bus)
                if (sdev->dev)
                        device_unregister(sdev->dev);
        }
+
+#ifdef CONFIG_SSB_EMBEDDED
+       if (bus->bustype == SSB_BUSTYPE_SSB)
+               platform_device_unregister(bus->watchdog);
+#endif
 }
 
 void ssb_bus_unregister(struct ssb_bus *bus)
@@ -561,6 +567,8 @@ static int __devinit ssb_attach_queued_buses(void)
                if (err)
                        goto error;
                ssb_pcicore_init(&bus->pcicore);
+               if (bus->bustype == SSB_BUSTYPE_SSB)
+                       ssb_watchdog_register(bus);
                ssb_bus_may_powerdown(bus);
 
                err = ssb_devices_register(bus);
@@ -1125,8 +1133,7 @@ static u32 ssb_tmslow_reject_bitmask(struct ssb_device *dev)
        case SSB_IDLOW_SSBREV_27:     /* same here */
                return SSB_TMSLOW_REJECT;       /* this is a guess */
        default:
-               printk(KERN_INFO "ssb: Backplane Revision 0x%.8X\n", rev);
-               WARN_ON(1);
+               WARN(1, KERN_INFO "ssb: Backplane Revision 0x%.8X\n", rev);
        }
        return (SSB_TMSLOW_REJECT | SSB_TMSLOW_REJECT_23);
 }