Date: Tue, 1 Oct 2019 20:21:49 +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: r352940 - head/sys/dev/usb/controller Message-ID: <201910012021.x91KLn3h040032@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910012021.x91KLn3h040032>