Modify xhci_reset so that the xHCI can adapt to XiZi AIOT

This commit is contained in:
xj 2024-07-01 04:13:01 -07:00
parent 3efb2335c5
commit 21a0f8ed30
1 changed files with 5 additions and 2 deletions

View File

@ -479,13 +479,16 @@ static int xhci_reset ( struct xhci_host *xhci ) {
} }
/* Reset device */ /* Reset device */
writel ( XHCI_USBCMD_HCRST, xhci->op + XHCI_OP_USBCMD ); // writel ( XHCI_USBCMD_HCRST, xhci->op + XHCI_OP_USBCMD );
writel ( XHCI_USBCMD_HCRST, xhci->op_addr + XHCI_OP_USBCMD );
/* Wait for reset to complete */ /* Wait for reset to complete */
for ( i = 0 ; i < XHCI_RESET_MAX_WAIT_MS ; i++ ) { for ( i = 0 ; i < XHCI_RESET_MAX_WAIT_MS ; i++ ) {
/* Check if reset is complete */ /* Check if reset is complete */
usbcmd = readl ( xhci->op + XHCI_OP_USBCMD ); // usbcmd = readl ( xhci->op + XHCI_OP_USBCMD );
usbcmd = readl ( xhci->op_addr + XHCI_OP_USBCMD );
if ( ! ( usbcmd & XHCI_USBCMD_HCRST ) ) if ( ! ( usbcmd & XHCI_USBCMD_HCRST ) )
return 0; return 0;