@@ -764,17 +764,6 @@ int board_usb_cleanup(int index, enum usb_init_type init)
return 0;
}
-
-int usb_gadget_handle_interrupts(int index)
-{
- u32 status;
-
- status = dwc3_omap_uboot_interrupt_status(index);
- if (status)
- dwc3_uboot_handle_interrupt(index);
-
- return 0;
-}
#endif
#ifdef CONFIG_DRIVER_TI_CPSW
@@ -411,17 +411,6 @@ int board_usb_cleanup(int index, enum usb_init_type init)
disable_usb_clocks(index);
return 0;
}
-
-int usb_gadget_handle_interrupts(int index)
-{
- u32 status;
-
- status = dwc3_omap_uboot_interrupt_status(index);
- if (status)
- dwc3_uboot_handle_interrupt(index);
-
- return 0;
-}
#endif
#ifdef CONFIG_DRIVER_TI_CPSW
@@ -209,17 +209,6 @@ int board_usb_cleanup(int index, enum usb_init_type init)
disable_usb_clocks(index);
return 0;
}
-
-int usb_gadget_handle_interrupts(int index)
-{
- u32 status;
-
- status = dwc3_omap_uboot_interrupt_status(index);
- if (status)
- dwc3_uboot_handle_interrupt(index);
-
- return 0;
-}
#endif
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_OS_BOOT)
@@ -23,6 +23,7 @@
#include <linux/usb/otg.h>
#include <linux/compat.h>
+#include <dwc3-uboot.h>
#include "linux-compat.h"
@@ -445,6 +446,17 @@ int dwc3_omap_uboot_interrupt_status(int index)
return 0;
}
+int usb_gadget_handle_interrupts(int index)
+{
+ u32 status;
+
+ status = dwc3_omap_uboot_interrupt_status(index);
+ if (status)
+ dwc3_uboot_handle_interrupt(index);
+
+ return 0;
+}
+
MODULE_ALIAS("platform:omap-dwc3");
MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
MODULE_LICENSE("GPL v2");
In board files of am437x, dra7xx and am5xx, usb_gadget_handle_interrupts() is just a place holder to handle dwc3 interrupts, nothing related to board is handled here, so move usb_gadget_handle_interrupts() from board files to dwc3-omap.c to avoid code duplication based on boards. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> --- board/ti/am43xx/board.c | 11 ----------- board/ti/am57xx/board.c | 11 ----------- board/ti/dra7xx/evm.c | 11 ----------- drivers/usb/dwc3/dwc3-omap.c | 12 ++++++++++++ 4 files changed, 12 insertions(+), 33 deletions(-)