svn commit: r340847 - head/sys/arm/allwinner
Emmanuel Vadot
manu at FreeBSD.org
Fri Nov 23 19:45:13 UTC 2018
Author: manu
Date: Fri Nov 23 19:45:11 2018
New Revision: 340847
URL: https://svnweb.freebsd.org/changeset/base/340847
Log:
a10_ehci: Always set the phy to host mode
MFC after: 1 month
Modified:
head/sys/arm/allwinner/a10_ehci.c
Modified: head/sys/arm/allwinner/a10_ehci.c
==============================================================================
--- head/sys/arm/allwinner/a10_ehci.c Fri Nov 23 19:44:26 2018 (r340846)
+++ head/sys/arm/allwinner/a10_ehci.c Fri Nov 23 19:45:11 2018 (r340847)
@@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$");
#include <arm/allwinner/aw_machdep.h>
#include <dev/extres/clk/clk.h>
#include <dev/extres/hwreset/hwreset.h>
-#include <dev/extres/phy/phy.h>
+#include <dev/extres/phy/phy_usb.h>
#define EHCI_HC_DEVSTR "Allwinner Integrated USB 2.0 controller"
@@ -242,6 +242,11 @@ a10_ehci_attach(device_t self)
/* Enable USB PHY */
if (phy_get_by_ofw_name(self, 0, "usb", &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");
+ goto error;
+ }
err = phy_enable(aw_sc->phy);
if (err != 0) {
device_printf(self, "Could not enable phy\n");
More information about the svn-src-head
mailing list