Author: cognet Date: Sat Nov 19 13:11:03 2016 New Revision: 308828 URL: https://svnweb.freebsd.org/changeset/base/308828
Log: Move the pandaboard initialization from the probe to the attach method. Use ofw_bus_node_is_compatible instead of fdt_is_compatible, as the later is deprecated. Suggested by: andrew Modified: head/sys/arm/ti/usb/omap_ehci.c Modified: head/sys/arm/ti/usb/omap_ehci.c ============================================================================== --- head/sys/arm/ti/usb/omap_ehci.c Sat Nov 19 08:54:21 2016 (r308827) +++ head/sys/arm/ti/usb/omap_ehci.c Sat Nov 19 13:11:03 2016 (r308828) @@ -261,24 +261,12 @@ omap_ehci_init(struct omap_ehci_softc *i static int omap_ehci_probe(device_t dev) { - phandle_t root; - if (!ofw_bus_status_okay(dev)) return (ENXIO); if (!ofw_bus_is_compatible(dev, "ti,ehci-omap")) return (ENXIO); -#ifdef SOC_OMAP4 - /* - * If we're running a Pandaboard, run Pandaboard-specific - * init code. - */ - root = OF_finddevice("/"); - if (fdt_is_compatible(root, "ti,omap4-panda")) - pandaboard_usb_hub_init(); -#endif - device_set_desc(dev, OMAP_EHCI_HC_DEVSTR); return (BUS_PROBE_DEFAULT); @@ -303,9 +291,22 @@ omap_ehci_attach(device_t dev) { struct omap_ehci_softc *isc = device_get_softc(dev); ehci_softc_t *sc = &isc->base; +#ifdef SOC_OMAP4 + phandle_t root; +#endif int err; int rid; +#ifdef SOC_OMAP4 + /* + * If we're running a Pandaboard, run Pandaboard-specific + * init code. + */ + root = OF_finddevice("/"); + if (ofw_bus_node_is_compatible(root, "ti,omap4-panda")) + pandaboard_usb_hub_init(); +#endif + /* initialise some bus fields */ sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"