diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c index 768b5c560..03cc796db 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.c @@ -47,9 +47,7 @@ Modification: Modify USB Device Initialization in xHCI code to apply to XiZi AIO #include "usbh_hub.h" #include "xhci.h" -#include "libipc.h" -#include "libserial.h" -#include "usyscall.h" + /************************** Constant Definitions *****************************/ @@ -1061,3 +1059,14 @@ int IPC_DO_SERVE_FUNC(Ipc_wait_xhci_intr)(void* ignore) IPC_SERVER_INTERFACE(Ipc_xhci_intr, 1); // IPC_SERVER_THREAD_INTERFACE(Ipc_wait_xhci_intr, 1); // IPC_SERVER_REGISTER_INTERFACES(IpcXhciIntrHandler, 2, Ipc_xhci_intr, Ipc_wait_xhci_intr); +IPC_SERVER_REGISTER_INTERFACES(IpcXhciIntrHandler, 1, Ipc_xhci_intr); + +int bind_xhci_intr(void *para){ + + if (register_irq(USB3_0_INTERRUPT_NO, Ipc_xhci_intr) < 0) { + printf("bind failed!\n"); + exit(1); + } + + return 0; +} diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.h b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.h index 4b1f89226..5cd9fa556 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.h +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/port/xhci/usb_hc_xhci.h @@ -41,6 +41,10 @@ Modification: rewrite xhci functions to dock with USB core layer, so that the xh #include "xhci.h" #include "usbh_core.h" +#include "libipc.h" +#include "libserial.h" +#include "usyscall.h" + #ifdef __cplusplus extern "C" { #endif @@ -160,6 +164,9 @@ __WEAK int usb_hc_get_register_id(unsigned long base_addr); __WEAK unsigned long usb_hc_get_register_vir_base(uint32_t id); +int bind_xhci_intr(void *para); + +IPC_SERVICES(IpcXhciIntrHandler, Ipc_xhci_intr); #ifdef __cplusplus }