[rtems-libbsd commit] ohci: Fix for BSP_USB_OTG_TRANSCEIVER_I2C_ADDR

Sebastian Huber sebh at rtems.org
Tue Jul 18 06:33:12 UTC 2017


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jul 18 08:31:03 2017 +0200

ohci: Fix for BSP_USB_OTG_TRANSCEIVER_I2C_ADDR

---

 freebsd/sys/dev/usb/controller/ohci.h      | 5 +++++
 rtemsbsd/sys/dev/usb/controller/ohci_lpc.c | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/freebsd/sys/dev/usb/controller/ohci.h b/freebsd/sys/dev/usb/controller/ohci.h
index a650ce1..69fc9a6 100755
--- a/freebsd/sys/dev/usb/controller/ohci.h
+++ b/freebsd/sys/dev/usb/controller/ohci.h
@@ -32,6 +32,11 @@
 #ifndef _OHCI_H_
 #define	_OHCI_H_
 
+#ifdef __rtems__
+#ifdef BSP_USB_OTG_TRANSCEIVER_I2C_ADDR
+#include <dev/usb/usb_otg_transceiver.h>
+#endif
+#endif /* __rtems__ */
 #define	OHCI_MAX_DEVICES MIN(USB_MAX_DEVICES, 128)
 
 #define	OHCI_NO_INTRS		32
diff --git a/rtemsbsd/sys/dev/usb/controller/ohci_lpc.c b/rtemsbsd/sys/dev/usb/controller/ohci_lpc.c
index ac806ec..e70f054 100755
--- a/rtemsbsd/sys/dev/usb/controller/ohci_lpc.c
+++ b/rtemsbsd/sys/dev/usb/controller/ohci_lpc.c
@@ -311,6 +311,8 @@ ohci_lpc_resume(device_t self)
 	int eno = 0;
 
 #ifdef BSP_USB_OTG_TRANSCEIVER_I2C_ADDR
+	ohci_softc_t *e = device_get_softc(self);
+
 	if (eno == 0) {
 		eno = lpc_otg_clk_ctrl(
 			LPC_OTG_CLK_AHB | LPC_OTG_CLK_HOST | LPC_OTG_CLK_I2C




More information about the vc mailing list