From 7a7318734be643eeb1d47f88e6c31c5d09549d27 Mon Sep 17 00:00:00 2001 From: xj Date: Fri, 16 Aug 2024 05:32:32 -0700 Subject: [PATCH] adding usb_assert --- .../services/drivers/usb/components/osal/usb_osal.c | 6 ++++++ .../services/drivers/usb/components/port/xhci/usb_hc_xhci.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/osal/usb_osal.c b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/osal/usb_osal.c index 0f6b7c988..ab3ae16f0 100644 --- a/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/osal/usb_osal.c +++ b/Ubiquitous/XiZi_AIoT/services/drivers/usb/components/osal/usb_osal.c @@ -337,4 +337,10 @@ void usb_osal_msleep(uint32_t delay){ if(delay > 0){ } +} + + +void usb_assert(const char *filename, int linenum){ + printf("%s, %d\n", filename, linenum); + exit(-1); } \ No newline at end of file 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 c0d7df4da..999c290d9 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 @@ -578,7 +578,7 @@ void USBH_IRQHandler(void *param) usbsts |= XHCI_USBSTS_EINT; writel(usbsts, xhci->op + XHCI_OP_USBSTS); - /* ack interrupt */ + /* ack interrupt */xhci_usbh_roothub_control runtime = readl(xhci->run + XHCI_RUN_IR_IMAN ( 0 )); runtime |= XHCI_RUN_IR_IMAN_IP; writel (runtime, xhci->run + XHCI_RUN_IR_IMAN ( 0 )); @@ -1123,3 +1123,5 @@ int create_xhci_intr_service(void *para){ return 0; } + +