bcma: use standard bus scanning during early register
[firefly-linux-kernel-4.4.55.git] / drivers / bcma / main.c
index c166d444fef65aa35b0fe50ffff5f2b268f7f67b..c3c5e0a2d5bed2b21344d750e77693f3e4baac24 100644 (file)
@@ -489,35 +489,20 @@ void bcma_bus_unregister(struct bcma_bus *bus)
        kfree(cores[0]);
 }
 
-int __init bcma_bus_early_register(struct bcma_bus *bus,
-                                  struct bcma_device *core_cc,
-                                  struct bcma_device *core_mips)
+/*
+ * This is a special version of bus registration function designed for SoCs.
+ * It scans bus and performs basic initialization of main cores only.
+ * Please note it requires memory allocation, however it won't try to sleep.
+ */
+int __init bcma_bus_early_register(struct bcma_bus *bus)
 {
        int err;
        struct bcma_device *core;
-       struct bcma_device_id match;
-
-       match.manuf = BCMA_MANUF_BCM;
-       match.id = bcma_cc_core_id(bus);
-       match.class = BCMA_CL_SIM;
-       match.rev = BCMA_ANY_REV;
-
-       /* Scan for chip common core */
-       err = bcma_bus_scan_early(bus, &match, core_cc);
-       if (err) {
-               bcma_err(bus, "Failed to scan for common core: %d\n", err);
-               return -1;
-       }
-
-       match.manuf = BCMA_MANUF_MIPS;
-       match.id = BCMA_CORE_MIPS_74K;
-       match.class = BCMA_CL_SIM;
-       match.rev = BCMA_ANY_REV;
 
-       /* Scan for mips core */
-       err = bcma_bus_scan_early(bus, &match, core_mips);
+       /* Scan for devices (cores) */
+       err = bcma_bus_scan(bus);
        if (err) {
-               bcma_err(bus, "Failed to scan for mips core: %d\n", err);
+               bcma_err(bus, "Failed to scan bus: %d\n", err);
                return -1;
        }