|
@@ -60,7 +60,7 @@ int xhci_handshake(struct xhci_hcd *xhci, void __iomem *ptr,
|
|
u32 result;
|
|
u32 result;
|
|
|
|
|
|
do {
|
|
do {
|
|
- result = xhci_readl(xhci, ptr);
|
|
|
|
|
|
+ result = readl(ptr);
|
|
if (result == ~(u32)0) /* card removed */
|
|
if (result == ~(u32)0) /* card removed */
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
result &= mask;
|
|
result &= mask;
|
|
@@ -82,11 +82,11 @@ void xhci_quiesce(struct xhci_hcd *xhci)
|
|
u32 mask;
|
|
u32 mask;
|
|
|
|
|
|
mask = ~(XHCI_IRQS);
|
|
mask = ~(XHCI_IRQS);
|
|
- halted = xhci_readl(xhci, &xhci->op_regs->status) & STS_HALT;
|
|
|
|
|
|
+ halted = readl(&xhci->op_regs->status) & STS_HALT;
|
|
if (!halted)
|
|
if (!halted)
|
|
mask &= ~CMD_RUN;
|
|
mask &= ~CMD_RUN;
|
|
|
|
|
|
- cmd = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
|
|
+ cmd = readl(&xhci->op_regs->command);
|
|
cmd &= mask;
|
|
cmd &= mask;
|
|
xhci_writel(xhci, cmd, &xhci->op_regs->command);
|
|
xhci_writel(xhci, cmd, &xhci->op_regs->command);
|
|
}
|
|
}
|
|
@@ -124,7 +124,7 @@ static int xhci_start(struct xhci_hcd *xhci)
|
|
u32 temp;
|
|
u32 temp;
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
- temp = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
|
|
+ temp = readl(&xhci->op_regs->command);
|
|
temp |= (CMD_RUN);
|
|
temp |= (CMD_RUN);
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Turn on HC, cmd = 0x%x.",
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Turn on HC, cmd = 0x%x.",
|
|
temp);
|
|
temp);
|
|
@@ -158,14 +158,14 @@ int xhci_reset(struct xhci_hcd *xhci)
|
|
u32 state;
|
|
u32 state;
|
|
int ret, i;
|
|
int ret, i;
|
|
|
|
|
|
- state = xhci_readl(xhci, &xhci->op_regs->status);
|
|
|
|
|
|
+ state = readl(&xhci->op_regs->status);
|
|
if ((state & STS_HALT) == 0) {
|
|
if ((state & STS_HALT) == 0) {
|
|
xhci_warn(xhci, "Host controller not halted, aborting reset.\n");
|
|
xhci_warn(xhci, "Host controller not halted, aborting reset.\n");
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Reset the HC");
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Reset the HC");
|
|
- command = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
|
|
+ command = readl(&xhci->op_regs->command);
|
|
command |= CMD_RESET;
|
|
command |= CMD_RESET;
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
|
|
|
|
@@ -422,7 +422,7 @@ static void compliance_mode_recovery(unsigned long arg)
|
|
xhci = (struct xhci_hcd *)arg;
|
|
xhci = (struct xhci_hcd *)arg;
|
|
|
|
|
|
for (i = 0; i < xhci->num_usb3_ports; i++) {
|
|
for (i = 0; i < xhci->num_usb3_ports; i++) {
|
|
- temp = xhci_readl(xhci, xhci->usb3_ports[i]);
|
|
|
|
|
|
+ temp = readl(xhci->usb3_ports[i]);
|
|
if ((temp & PORT_PLS_MASK) == USB_SS_PORT_LS_COMP_MOD) {
|
|
if ((temp & PORT_PLS_MASK) == USB_SS_PORT_LS_COMP_MOD) {
|
|
/*
|
|
/*
|
|
* Compliance Mode Detected. Letting USB Core
|
|
* Compliance Mode Detected. Letting USB Core
|
|
@@ -611,19 +611,19 @@ int xhci_run(struct usb_hcd *hcd)
|
|
|
|
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
"// Set the interrupt modulation register");
|
|
"// Set the interrupt modulation register");
|
|
- temp = xhci_readl(xhci, &xhci->ir_set->irq_control);
|
|
|
|
|
|
+ temp = readl(&xhci->ir_set->irq_control);
|
|
temp &= ~ER_IRQ_INTERVAL_MASK;
|
|
temp &= ~ER_IRQ_INTERVAL_MASK;
|
|
temp |= (u32) 160;
|
|
temp |= (u32) 160;
|
|
xhci_writel(xhci, temp, &xhci->ir_set->irq_control);
|
|
xhci_writel(xhci, temp, &xhci->ir_set->irq_control);
|
|
|
|
|
|
/* Set the HCD state before we enable the irqs */
|
|
/* Set the HCD state before we enable the irqs */
|
|
- temp = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
|
|
+ temp = readl(&xhci->op_regs->command);
|
|
temp |= (CMD_EIE);
|
|
temp |= (CMD_EIE);
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
"// Enable interrupts, cmd = 0x%x.", temp);
|
|
"// Enable interrupts, cmd = 0x%x.", temp);
|
|
xhci_writel(xhci, temp, &xhci->op_regs->command);
|
|
xhci_writel(xhci, temp, &xhci->op_regs->command);
|
|
|
|
|
|
- temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
|
|
|
|
|
|
+ temp = readl(&xhci->ir_set->irq_pending);
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
"// Enabling event ring interrupter %p by writing 0x%x to irq_pending",
|
|
"// Enabling event ring interrupter %p by writing 0x%x to irq_pending",
|
|
xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp));
|
|
xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp));
|
|
@@ -698,9 +698,9 @@ void xhci_stop(struct usb_hcd *hcd)
|
|
|
|
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
"// Disabling event ring interrupts");
|
|
"// Disabling event ring interrupts");
|
|
- temp = xhci_readl(xhci, &xhci->op_regs->status);
|
|
|
|
|
|
+ temp = readl(&xhci->op_regs->status);
|
|
xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status);
|
|
xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status);
|
|
- temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
|
|
|
|
|
|
+ temp = readl(&xhci->ir_set->irq_pending);
|
|
xhci_writel(xhci, ER_IRQ_DISABLE(temp),
|
|
xhci_writel(xhci, ER_IRQ_DISABLE(temp),
|
|
&xhci->ir_set->irq_pending);
|
|
&xhci->ir_set->irq_pending);
|
|
xhci_print_ir_set(xhci, 0);
|
|
xhci_print_ir_set(xhci, 0);
|
|
@@ -709,7 +709,7 @@ void xhci_stop(struct usb_hcd *hcd)
|
|
xhci_mem_cleanup(xhci);
|
|
xhci_mem_cleanup(xhci);
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
"xhci_stop completed - status = %x",
|
|
"xhci_stop completed - status = %x",
|
|
- xhci_readl(xhci, &xhci->op_regs->status));
|
|
|
|
|
|
+ readl(&xhci->op_regs->status));
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -739,7 +739,7 @@ void xhci_shutdown(struct usb_hcd *hcd)
|
|
|
|
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
|
|
"xhci_shutdown completed - status = %x",
|
|
"xhci_shutdown completed - status = %x",
|
|
- xhci_readl(xhci, &xhci->op_regs->status));
|
|
|
|
|
|
+ readl(&xhci->op_regs->status));
|
|
|
|
|
|
/* Yet another workaround for spurious wakeups at shutdown with HSW */
|
|
/* Yet another workaround for spurious wakeups at shutdown with HSW */
|
|
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
|
|
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)
|
|
@@ -749,15 +749,15 @@ void xhci_shutdown(struct usb_hcd *hcd)
|
|
#ifdef CONFIG_PM
|
|
#ifdef CONFIG_PM
|
|
static void xhci_save_registers(struct xhci_hcd *xhci)
|
|
static void xhci_save_registers(struct xhci_hcd *xhci)
|
|
{
|
|
{
|
|
- xhci->s3.command = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
- xhci->s3.dev_nt = xhci_readl(xhci, &xhci->op_regs->dev_notification);
|
|
|
|
|
|
+ xhci->s3.command = readl(&xhci->op_regs->command);
|
|
|
|
+ xhci->s3.dev_nt = readl(&xhci->op_regs->dev_notification);
|
|
xhci->s3.dcbaa_ptr = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr);
|
|
xhci->s3.dcbaa_ptr = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr);
|
|
- xhci->s3.config_reg = xhci_readl(xhci, &xhci->op_regs->config_reg);
|
|
|
|
- xhci->s3.erst_size = xhci_readl(xhci, &xhci->ir_set->erst_size);
|
|
|
|
|
|
+ xhci->s3.config_reg = readl(&xhci->op_regs->config_reg);
|
|
|
|
+ xhci->s3.erst_size = readl(&xhci->ir_set->erst_size);
|
|
xhci->s3.erst_base = xhci_read_64(xhci, &xhci->ir_set->erst_base);
|
|
xhci->s3.erst_base = xhci_read_64(xhci, &xhci->ir_set->erst_base);
|
|
xhci->s3.erst_dequeue = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue);
|
|
xhci->s3.erst_dequeue = xhci_read_64(xhci, &xhci->ir_set->erst_dequeue);
|
|
- xhci->s3.irq_pending = xhci_readl(xhci, &xhci->ir_set->irq_pending);
|
|
|
|
- xhci->s3.irq_control = xhci_readl(xhci, &xhci->ir_set->irq_control);
|
|
|
|
|
|
+ xhci->s3.irq_pending = readl(&xhci->ir_set->irq_pending);
|
|
|
|
+ xhci->s3.irq_control = readl(&xhci->ir_set->irq_control);
|
|
}
|
|
}
|
|
|
|
|
|
static void xhci_restore_registers(struct xhci_hcd *xhci)
|
|
static void xhci_restore_registers(struct xhci_hcd *xhci)
|
|
@@ -866,7 +866,7 @@ int xhci_suspend(struct xhci_hcd *xhci)
|
|
/* skipped assuming that port suspend has done */
|
|
/* skipped assuming that port suspend has done */
|
|
|
|
|
|
/* step 2: clear Run/Stop bit */
|
|
/* step 2: clear Run/Stop bit */
|
|
- command = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
|
|
+ command = readl(&xhci->op_regs->command);
|
|
command &= ~CMD_RUN;
|
|
command &= ~CMD_RUN;
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
|
|
|
|
@@ -885,7 +885,7 @@ int xhci_suspend(struct xhci_hcd *xhci)
|
|
xhci_save_registers(xhci);
|
|
xhci_save_registers(xhci);
|
|
|
|
|
|
/* step 4: set CSS flag */
|
|
/* step 4: set CSS flag */
|
|
- command = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
|
|
+ command = readl(&xhci->op_regs->command);
|
|
command |= CMD_CSS;
|
|
command |= CMD_CSS;
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
if (xhci_handshake(xhci, &xhci->op_regs->status,
|
|
if (xhci_handshake(xhci, &xhci->op_regs->status,
|
|
@@ -951,7 +951,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
|
xhci_set_cmd_ring_deq(xhci);
|
|
xhci_set_cmd_ring_deq(xhci);
|
|
/* step 3: restore state and start state*/
|
|
/* step 3: restore state and start state*/
|
|
/* step 3: set CRS flag */
|
|
/* step 3: set CRS flag */
|
|
- command = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
|
|
+ command = readl(&xhci->op_regs->command);
|
|
command |= CMD_CRS;
|
|
command |= CMD_CRS;
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
if (xhci_handshake(xhci, &xhci->op_regs->status,
|
|
if (xhci_handshake(xhci, &xhci->op_regs->status,
|
|
@@ -960,7 +960,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
|
spin_unlock_irq(&xhci->lock);
|
|
spin_unlock_irq(&xhci->lock);
|
|
return -ETIMEDOUT;
|
|
return -ETIMEDOUT;
|
|
}
|
|
}
|
|
- temp = xhci_readl(xhci, &xhci->op_regs->status);
|
|
|
|
|
|
+ temp = readl(&xhci->op_regs->status);
|
|
}
|
|
}
|
|
|
|
|
|
/* If restore operation fails, re-initialize the HC during resume */
|
|
/* If restore operation fails, re-initialize the HC during resume */
|
|
@@ -984,9 +984,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
|
xhci_cleanup_msix(xhci);
|
|
xhci_cleanup_msix(xhci);
|
|
|
|
|
|
xhci_dbg(xhci, "// Disabling event ring interrupts\n");
|
|
xhci_dbg(xhci, "// Disabling event ring interrupts\n");
|
|
- temp = xhci_readl(xhci, &xhci->op_regs->status);
|
|
|
|
|
|
+ temp = readl(&xhci->op_regs->status);
|
|
xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status);
|
|
xhci_writel(xhci, temp & ~STS_EINT, &xhci->op_regs->status);
|
|
- temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
|
|
|
|
|
|
+ temp = readl(&xhci->ir_set->irq_pending);
|
|
xhci_writel(xhci, ER_IRQ_DISABLE(temp),
|
|
xhci_writel(xhci, ER_IRQ_DISABLE(temp),
|
|
&xhci->ir_set->irq_pending);
|
|
&xhci->ir_set->irq_pending);
|
|
xhci_print_ir_set(xhci, 0);
|
|
xhci_print_ir_set(xhci, 0);
|
|
@@ -994,7 +994,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
|
xhci_dbg(xhci, "cleaning up memory\n");
|
|
xhci_dbg(xhci, "cleaning up memory\n");
|
|
xhci_mem_cleanup(xhci);
|
|
xhci_mem_cleanup(xhci);
|
|
xhci_dbg(xhci, "xhci_stop completed - status = %x\n",
|
|
xhci_dbg(xhci, "xhci_stop completed - status = %x\n",
|
|
- xhci_readl(xhci, &xhci->op_regs->status));
|
|
|
|
|
|
+ readl(&xhci->op_regs->status));
|
|
|
|
|
|
/* USB core calls the PCI reinit and start functions twice:
|
|
/* USB core calls the PCI reinit and start functions twice:
|
|
* first with the primary HCD, and then with the secondary HCD.
|
|
* first with the primary HCD, and then with the secondary HCD.
|
|
@@ -1023,7 +1023,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
|
}
|
|
}
|
|
|
|
|
|
/* step 4: set Run/Stop bit */
|
|
/* step 4: set Run/Stop bit */
|
|
- command = xhci_readl(xhci, &xhci->op_regs->command);
|
|
|
|
|
|
+ command = readl(&xhci->op_regs->command);
|
|
command |= CMD_RUN;
|
|
command |= CMD_RUN;
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
xhci_writel(xhci, command, &xhci->op_regs->command);
|
|
xhci_handshake(xhci, &xhci->op_regs->status, STS_HALT,
|
|
xhci_handshake(xhci, &xhci->op_regs->status, STS_HALT,
|
|
@@ -1464,7 +1464,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
|
|
ret = usb_hcd_check_unlink_urb(hcd, urb, status);
|
|
ret = usb_hcd_check_unlink_urb(hcd, urb, status);
|
|
if (ret || !urb->hcpriv)
|
|
if (ret || !urb->hcpriv)
|
|
goto done;
|
|
goto done;
|
|
- temp = xhci_readl(xhci, &xhci->op_regs->status);
|
|
|
|
|
|
+ temp = readl(&xhci->op_regs->status);
|
|
if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_HALTED)) {
|
|
if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_HALTED)) {
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
|
|
xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
|
|
"HW died, freeing TD.");
|
|
"HW died, freeing TD.");
|
|
@@ -3585,7 +3585,7 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
|
|
|
|
|
|
spin_lock_irqsave(&xhci->lock, flags);
|
|
spin_lock_irqsave(&xhci->lock, flags);
|
|
/* Don't disable the slot if the host controller is dead. */
|
|
/* Don't disable the slot if the host controller is dead. */
|
|
- state = xhci_readl(xhci, &xhci->op_regs->status);
|
|
|
|
|
|
+ state = readl(&xhci->op_regs->status);
|
|
if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) ||
|
|
if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) ||
|
|
(xhci->xhc_state & XHCI_STATE_HALTED)) {
|
|
(xhci->xhc_state & XHCI_STATE_HALTED)) {
|
|
xhci_free_virt_device(xhci, udev->slot_id);
|
|
xhci_free_virt_device(xhci, udev->slot_id);
|
|
@@ -4042,7 +4042,7 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
|
|
port_array = xhci->usb2_ports;
|
|
port_array = xhci->usb2_ports;
|
|
port_num = udev->portnum - 1;
|
|
port_num = udev->portnum - 1;
|
|
pm_addr = port_array[port_num] + PORTPMSC;
|
|
pm_addr = port_array[port_num] + PORTPMSC;
|
|
- pm_val = xhci_readl(xhci, pm_addr);
|
|
|
|
|
|
+ pm_val = readl(pm_addr);
|
|
hlpm_addr = port_array[port_num] + PORTHLPMC;
|
|
hlpm_addr = port_array[port_num] + PORTHLPMC;
|
|
field = le32_to_cpu(udev->bos->ext_cap->bmAttributes);
|
|
field = le32_to_cpu(udev->bos->ext_cap->bmAttributes);
|
|
|
|
|
|
@@ -4084,7 +4084,7 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
|
|
hlpm_val = xhci_calculate_usb2_hw_lpm_params(udev);
|
|
hlpm_val = xhci_calculate_usb2_hw_lpm_params(udev);
|
|
xhci_writel(xhci, hlpm_val, hlpm_addr);
|
|
xhci_writel(xhci, hlpm_val, hlpm_addr);
|
|
/* flush write */
|
|
/* flush write */
|
|
- xhci_readl(xhci, hlpm_addr);
|
|
|
|
|
|
+ readl(hlpm_addr);
|
|
} else {
|
|
} else {
|
|
hird = xhci_calculate_hird_besl(xhci, udev);
|
|
hird = xhci_calculate_hird_besl(xhci, udev);
|
|
}
|
|
}
|
|
@@ -4092,16 +4092,16 @@ int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd,
|
|
pm_val &= ~PORT_HIRD_MASK;
|
|
pm_val &= ~PORT_HIRD_MASK;
|
|
pm_val |= PORT_HIRD(hird) | PORT_RWE | PORT_L1DS(udev->slot_id);
|
|
pm_val |= PORT_HIRD(hird) | PORT_RWE | PORT_L1DS(udev->slot_id);
|
|
xhci_writel(xhci, pm_val, pm_addr);
|
|
xhci_writel(xhci, pm_val, pm_addr);
|
|
- pm_val = xhci_readl(xhci, pm_addr);
|
|
|
|
|
|
+ pm_val = readl(pm_addr);
|
|
pm_val |= PORT_HLE;
|
|
pm_val |= PORT_HLE;
|
|
xhci_writel(xhci, pm_val, pm_addr);
|
|
xhci_writel(xhci, pm_val, pm_addr);
|
|
/* flush write */
|
|
/* flush write */
|
|
- xhci_readl(xhci, pm_addr);
|
|
|
|
|
|
+ readl(pm_addr);
|
|
} else {
|
|
} else {
|
|
pm_val &= ~(PORT_HLE | PORT_RWE | PORT_HIRD_MASK | PORT_L1DS_MASK);
|
|
pm_val &= ~(PORT_HLE | PORT_RWE | PORT_HIRD_MASK | PORT_L1DS_MASK);
|
|
xhci_writel(xhci, pm_val, pm_addr);
|
|
xhci_writel(xhci, pm_val, pm_addr);
|
|
/* flush write */
|
|
/* flush write */
|
|
- xhci_readl(xhci, pm_addr);
|
|
|
|
|
|
+ readl(pm_addr);
|
|
if (udev->usb2_hw_lpm_besl_capable) {
|
|
if (udev->usb2_hw_lpm_besl_capable) {
|
|
spin_unlock_irqrestore(&xhci->lock, flags);
|
|
spin_unlock_irqrestore(&xhci->lock, flags);
|
|
mutex_lock(hcd->bandwidth_mutex);
|
|
mutex_lock(hcd->bandwidth_mutex);
|
|
@@ -4704,7 +4704,7 @@ int xhci_get_frame(struct usb_hcd *hcd)
|
|
{
|
|
{
|
|
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
|
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
|
|
/* EHCI mods by the periodic size. Why? */
|
|
/* EHCI mods by the periodic size. Why? */
|
|
- return xhci_readl(xhci, &xhci->run_regs->microframe_index) >> 3;
|
|
|
|
|
|
+ return readl(&xhci->run_regs->microframe_index) >> 3;
|
|
}
|
|
}
|
|
|
|
|
|
int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
|
int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
|
@@ -4748,16 +4748,16 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
|
|
|
|
|
xhci->cap_regs = hcd->regs;
|
|
xhci->cap_regs = hcd->regs;
|
|
xhci->op_regs = hcd->regs +
|
|
xhci->op_regs = hcd->regs +
|
|
- HC_LENGTH(xhci_readl(xhci, &xhci->cap_regs->hc_capbase));
|
|
|
|
|
|
+ HC_LENGTH(readl(&xhci->cap_regs->hc_capbase));
|
|
xhci->run_regs = hcd->regs +
|
|
xhci->run_regs = hcd->regs +
|
|
- (xhci_readl(xhci, &xhci->cap_regs->run_regs_off) & RTSOFF_MASK);
|
|
|
|
|
|
+ (readl(&xhci->cap_regs->run_regs_off) & RTSOFF_MASK);
|
|
/* Cache read-only capability registers */
|
|
/* Cache read-only capability registers */
|
|
- xhci->hcs_params1 = xhci_readl(xhci, &xhci->cap_regs->hcs_params1);
|
|
|
|
- xhci->hcs_params2 = xhci_readl(xhci, &xhci->cap_regs->hcs_params2);
|
|
|
|
- xhci->hcs_params3 = xhci_readl(xhci, &xhci->cap_regs->hcs_params3);
|
|
|
|
- xhci->hcc_params = xhci_readl(xhci, &xhci->cap_regs->hc_capbase);
|
|
|
|
|
|
+ xhci->hcs_params1 = readl(&xhci->cap_regs->hcs_params1);
|
|
|
|
+ xhci->hcs_params2 = readl(&xhci->cap_regs->hcs_params2);
|
|
|
|
+ xhci->hcs_params3 = readl(&xhci->cap_regs->hcs_params3);
|
|
|
|
+ xhci->hcc_params = readl(&xhci->cap_regs->hc_capbase);
|
|
xhci->hci_version = HC_VERSION(xhci->hcc_params);
|
|
xhci->hci_version = HC_VERSION(xhci->hcc_params);
|
|
- xhci->hcc_params = xhci_readl(xhci, &xhci->cap_regs->hcc_params);
|
|
|
|
|
|
+ xhci->hcc_params = readl(&xhci->cap_regs->hcc_params);
|
|
xhci_print_registers(xhci);
|
|
xhci_print_registers(xhci);
|
|
|
|
|
|
get_quirks(dev, xhci);
|
|
get_quirks(dev, xhci);
|