From owner-svn-src-all@freebsd.org Tue Oct 1 20:22:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DEC5C13FA29; Tue, 1 Oct 2019 20:22:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46jW0t5PJTz4MdG; Tue, 1 Oct 2019 20:22:54 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D18920B75; Tue, 1 Oct 2019 20:22:54 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x91KMsxx040374; Tue, 1 Oct 2019 20:22:54 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x91KMsmB040373; Tue, 1 Oct 2019 20:22:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201910012022.x91KMsmB040373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 1 Oct 2019 20:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352941 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 352941 X-SVN-Commit-Repository: base 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.29 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: Tue, 01 Oct 2019 20:22:54 -0000 Author: manu Date: Tue Oct 1 20:22:54 2019 New Revision: 352941 URL: https://svnweb.freebsd.org/changeset/base/352941 Log: arm: allwinner: a10_ehci: Look for the phy based on the id phy-names was never in the bindings schema even if it was present in some DTS. Get the optional phy based on its ID. PR: 240978 Modified: head/sys/arm/allwinner/a10_ehci.c Modified: head/sys/arm/allwinner/a10_ehci.c ============================================================================== --- head/sys/arm/allwinner/a10_ehci.c Tue Oct 1 20:21:49 2019 (r352940) +++ head/sys/arm/allwinner/a10_ehci.c Tue Oct 1 20:22:54 2019 (r352941) @@ -144,6 +144,7 @@ a10_ehci_attach(device_t self) struct aw_ehci_softc *aw_sc = device_get_softc(self); ehci_softc_t *sc = &aw_sc->sc; const struct aw_ehci_conf *conf; + phandle_t node; bus_space_handle_t bsh; int err, rid, off; struct clk_list *clkp; @@ -154,6 +155,8 @@ a10_ehci_attach(device_t self) conf = USB_CONF(self); + node = ofw_bus_get_node(self); + /* initialise some bus fields */ sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; @@ -241,7 +244,7 @@ a10_ehci_attach(device_t self) } /* Enable USB PHY */ - if (phy_get_by_ofw_name(self, 0, "usb", &aw_sc->phy) == 0) { + if (phy_get_by_ofw_idx(self, node, 0, &aw_sc->phy) == 0) { err = phy_usb_set_mode(aw_sc->phy, PHY_USB_MODE_HOST); if (err != 0) { device_printf(self, "Could not set phy to host mode\n");