forked from xuos/xiuos
Modify xhci_port_protocol, xhci_supported_protocol and xhci_legacy_release so that the xHCI can adapt to XiZi AIOT
This commit is contained in:
parent
21a0f8ed30
commit
e30c4e662f
|
@ -420,7 +420,8 @@ static void xhci_legacy_release ( struct xhci_host *xhci ) {
|
|||
}
|
||||
|
||||
/* Release ownership */
|
||||
writeb ( 0, xhci->cap + xhci->legacy + XHCI_USBLEGSUP_OS );
|
||||
// writeb ( 0, xhci->cap + xhci->legacy + XHCI_USBLEGSUP_OS );
|
||||
writeb ( 0, xhci->cap_addr + xhci->legacy + XHCI_USBLEGSUP_OS );
|
||||
USB_LOG_DBG("XHCI %s released ownership to BIOS\n", xhci->name );
|
||||
}
|
||||
|
||||
|
@ -586,7 +587,8 @@ static unsigned int xhci_port_protocol ( struct xhci_host *xhci,
|
|||
return 0;
|
||||
|
||||
/* Determine protocol version */
|
||||
revision = readl ( xhci->cap + supported + XHCI_SUPPORTED_REVISION );
|
||||
// revision = readl ( xhci->cap + supported + XHCI_SUPPORTED_REVISION );
|
||||
revision = readl ( xhci->cap_addr + supported + XHCI_SUPPORTED_REVISION );
|
||||
protocol = XHCI_SUPPORTED_REVISION_VER ( revision );
|
||||
|
||||
/* Describe port protocol */
|
||||
|
@ -599,11 +601,14 @@ static unsigned int xhci_port_protocol ( struct xhci_host *xhci,
|
|||
type = XHCI_SUPPORTED_SLOT_TYPE ( slot );
|
||||
USB_LOG_DBG("XHCI %s-%d %sv%04x type %d \r\n",
|
||||
xhci->name, port, name.text, protocol, type );
|
||||
ports = readl ( xhci->cap + supported + XHCI_SUPPORTED_PORTS );
|
||||
// ports = readl ( xhci->cap + supported + XHCI_SUPPORTED_PORTS );
|
||||
ports = readl ( xhci->cap_addr + supported + XHCI_SUPPORTED_PORTS );
|
||||
psic = XHCI_SUPPORTED_PORTS_PSIC ( ports );
|
||||
if ( psic ) {
|
||||
USB_LOG_DBG(" speeds \r\n" );
|
||||
for ( i = 0 ; i < psic ; i++ ) {
|
||||
// psi = readl ( xhci->cap + supported +
|
||||
// XHCI_SUPPORTED_PSI ( i ) );
|
||||
psi = readl ( xhci->cap + supported +
|
||||
XHCI_SUPPORTED_PSI ( i ) );
|
||||
psiv = XHCI_SUPPORTED_PSI_VALUE ( psi );
|
||||
|
@ -1209,13 +1214,16 @@ static int xhci_port_speed ( struct xhci_host *xhci, unsigned int port,
|
|||
return -ENOTSUP;
|
||||
|
||||
/* Get protocol speed ID count */
|
||||
ports = readl ( xhci->cap + supported + XHCI_SUPPORTED_PORTS );
|
||||
// ports = readl ( xhci->cap + supported + XHCI_SUPPORTED_PORTS );
|
||||
ports = readl ( xhci->cap_addr + supported + XHCI_SUPPORTED_PORTS );
|
||||
psic = XHCI_SUPPORTED_PORTS_PSIC ( ports );
|
||||
|
||||
/* Use protocol speed ID table unless device is known to be faulty */
|
||||
/* Iterate over PSI dwords looking for a match */
|
||||
for ( i = 0 ; i < psic ; i++ ) {
|
||||
psi = readl ( xhci->cap + supported +
|
||||
// psi = readl ( xhci->cap + supported +
|
||||
// XHCI_SUPPORTED_PSI ( i ) );
|
||||
psi = readl ( xhci->cap_addr + supported +
|
||||
XHCI_SUPPORTED_PSI ( i ) );
|
||||
if ( psiv == XHCI_SUPPORTED_PSI_VALUE ( psi ) ) {
|
||||
mantissa = XHCI_SUPPORTED_PSI_MANTISSA ( psi );
|
||||
|
|
Loading…
Reference in New Issue