a10_ehci: Always set the phy to host mode
MFC after: 1 month
This commit is contained in:
parent
85e46d08b9
commit
89bd410ea5
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user