Am 29.01.2012 um 16:31 schrieb Marius Strobl: > How about adding the MDIO provider via multi-pass probing? That idea > of that model was to attach things like drivers for interrupt controllers > before any other driver that requires that resource. This seems like a > perfect match here and requires neither a specific hack to the nexus > (the platform generally needs to be multi-pass aware though and the > thing enabled in subr_bus.c) nor a hack to miibus(4).
Please recall the devinfo graph that I posted earlier. The PHY arge0 needs to talk to is attached to the MDIO master on the switch controller, which in turn is attached to GE1's MDIO master. This would require early attachment of the switch, in turn requiring early attachment of arge_mdio, in turn requiring early attachment of mips/mips/nexus. > We really need > to find a proper way of dealing with the constraints of the embedded- > world rather than to sprinkle hacks all over the place. Why is the above is less of a hack than making the ordering in nexus configurable through a hint? Stefan -- Stefan Bethke <s...@lassitu.de> Fon +49 151 14070811 diff --git a/sys/mips/mips/nexus.c b/sys/mips/mips/nexus.c index b51357d..c4c207a 100644 --- a/sys/mips/mips/nexus.c +++ b/sys/mips/mips/nexus.c @@ -240,8 +240,11 @@ nexus_hinted_child(device_t bus, const char *dname, int dunit) int result; int irq; int mem_hints_count; + int order; - child = BUS_ADD_CHILD(bus, 0, dname, dunit); + order = 1000; /* there should be a define for the default order */ + resource_int_value(dname, dunit, "order", &order); + child = BUS_ADD_CHILD(bus, order, dname, dunit); if (child == NULL) return; _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"