Adding interrupt codes

This commit is contained in:
xj 2024-08-08 00:08:23 -07:00
parent b9de9baf1c
commit 0e09b55903
2 changed files with 19 additions and 3 deletions

View File

@ -47,9 +47,7 @@ Modification: Modify USB Device Initialization in xHCI code to apply to XiZi AIO
#include "usbh_hub.h" #include "usbh_hub.h"
#include "xhci.h" #include "xhci.h"
#include "libipc.h"
#include "libserial.h"
#include "usyscall.h"
/************************** Constant Definitions *****************************/ /************************** 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_INTERFACE(Ipc_xhci_intr, 1);
// IPC_SERVER_THREAD_INTERFACE(Ipc_wait_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, 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;
}

View File

@ -41,6 +41,10 @@ Modification: rewrite xhci functions to dock with USB core layer, so that the xh
#include "xhci.h" #include "xhci.h"
#include "usbh_core.h" #include "usbh_core.h"
#include "libipc.h"
#include "libserial.h"
#include "usyscall.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #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); __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 #ifdef __cplusplus
} }