From owner-svn-src-head@freebsd.org Tue Oct 1 20:21:50 2019 Return-Path: Delivered-To: svn-src-head@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 4FC3B13F947; Tue, 1 Oct 2019 20:21:50 +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 46jVzf0nVbz4MFn; Tue, 1 Oct 2019 20:21:50 +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 F3F7120B31; Tue, 1 Oct 2019 20:21:49 +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 x91KLnpQ040033; Tue, 1 Oct 2019 20:21:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x91KLn3h040032; Tue, 1 Oct 2019 20:21:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201910012021.x91KLn3h040032@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:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352940 - head/sys/dev/usb/controller X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/usb/controller X-SVN-Commit-Revision: 352940 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2019 20:21:50 -0000 Author: manu Date: Tue Oct 1 20:21:49 2019 New Revision: 352940 URL: https://svnweb.freebsd.org/changeset/base/352940 Log: generic_ohci: 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. Modified: head/sys/dev/usb/controller/generic_ohci.c Modified: head/sys/dev/usb/controller/generic_ohci.c ============================================================================== --- head/sys/dev/usb/controller/generic_ohci.c Tue Oct 1 20:09:25 2019 (r352939) +++ head/sys/dev/usb/controller/generic_ohci.c Tue Oct 1 20:21:49 2019 (r352940) @@ -107,6 +107,7 @@ generic_ohci_attach(device_t dev) int off; struct clk_list *clkp; clk_t clk; + phandle_t node; #endif sc->ohci_sc.sc_bus.parent = dev; @@ -114,6 +115,8 @@ generic_ohci_attach(device_t dev) sc->ohci_sc.sc_bus.devices_max = OHCI_MAX_DEVICES; sc->ohci_sc.sc_bus.dma_bits = 32; + node = ofw_bus_get_node(dev); + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->ohci_sc.sc_bus, USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) { @@ -183,7 +186,7 @@ generic_ohci_attach(device_t dev) } /* Enable phy */ - if (phy_get_by_ofw_name(dev, 0, "usb", &sc->phy) == 0) { + if (phy_get_by_ofw_idx(dev, node, 0, &sc->phy) == 0) { err = phy_enable(sc->phy); if (err != 0) { device_printf(dev, "Could not enable phy\n");