Date: Tue, 1 Oct 2019 20:22:54 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352941 - head/sys/arm/allwinner Message-ID: <201910012022.x91KMsmB040373@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910012022.x91KMsmB040373>