From b5c65e3022f285d389759bb699a9cefee79c5fd0 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 8 Jan 2025 22:00:42 -0500 Subject: kernel: xhci: Add xHC interrupt management Signed-off-by: Ian Moffett --- sys/include/dev/usb/xhciregs.h | 5 +++++ sys/include/dev/usb/xhcivar.h | 1 + 2 files changed, 6 insertions(+) (limited to 'sys/include/dev') diff --git a/sys/include/dev/usb/xhciregs.h b/sys/include/dev/usb/xhciregs.h index 8c47739..0416601 100644 --- a/sys/include/dev/usb/xhciregs.h +++ b/sys/include/dev/usb/xhciregs.h @@ -73,6 +73,7 @@ struct xhci_opregs { /* USBCMD bits */ #define USBCMD_RUN BIT(0) /* Run/stop */ #define USBCMD_HCRST BIT(1) /* xHC reset */ +#define USBCMD_INTE BIT(2) /* Interrupt Enable */ /* USBSTS bits */ #define USBSTS_HCH BIT(0) /* HC halted */ @@ -113,4 +114,8 @@ struct xhci_opregs { #define XHCI_BIOS_SEM BIT(16) #define XHCI_OS_SEM BIT(24) +/* IMAN bits */ +#define XHCI_IMAN_IP BIT(0) +#define XHCI_IMAN_IE BIT(1) + #endif /* !_USB_XHCIREGS_H_ */ diff --git a/sys/include/dev/usb/xhcivar.h b/sys/include/dev/usb/xhcivar.h index cd445c8..4b0f1bf 100644 --- a/sys/include/dev/usb/xhcivar.h +++ b/sys/include/dev/usb/xhcivar.h @@ -39,6 +39,7 @@ #define XHCI_EVRING_LEN 16 #define XHCI_TRB_SIZE 16 /* In bytes */ #define XHCI_MAX_PROTOS 4 +#define XHCI_IMOD_DEFAULT 0 /* * USB proto (USB 2.0 or 3.0) -- cgit v1.2.3