[rtems-libbsd commit] dwc_otg: Default to USB host mode

Sebastian Huber sebh at rtems.org
Tue Feb 6 09:03:45 UTC 2018


Module:    rtems-libbsd
Branch:    master
Commit:    2275776d21768c18570a2a4bf7d8b2fff8088dc5
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=2275776d21768c18570a2a4bf7d8b2fff8088dc5

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Feb  6 09:29:49 2018 +0100

dwc_otg: Default to USB host mode

In case no "dr_mode" property is present in the device tree, then
default to USB host mode.  This is necessary to support the Cyclone V
SoC Development Kit.

---

 freebsd/sys/dev/usb/controller/dwc_otg_fdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c b/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c
index 4acbfa4..791d989 100644
--- a/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c
+++ b/freebsd/sys/dev/usb/controller/dwc_otg_fdt.c
@@ -110,6 +110,8 @@ dwc_otg_attach(device_t dev)
 			device_printf(dev, "Invalid FDT dr_mode: %s\n",
 			    usb_mode);
 		}
+	} else {
+		sc->sc_otg.sc_mode = DWC_MODE_HOST;
 	}
 
 	/* get all DMA memory */




More information about the vc mailing list