From owner-svn-src-all@freebsd.org Sat Nov 19 13:11:05 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E0BAC4A5DF; Sat, 19 Nov 2016 13:11:05 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEB4B877; Sat, 19 Nov 2016 13:11:04 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAJDB3ck065598; Sat, 19 Nov 2016 13:11:03 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAJDB3h9065597; Sat, 19 Nov 2016 13:11:03 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201611191311.uAJDB3h9065597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sat, 19 Nov 2016 13:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308828 - head/sys/arm/ti/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Nov 2016 13:11:05 -0000 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;