|
@@ -226,8 +226,13 @@ static int ehci_halt (struct ehci_hcd *ehci)
|
|
|
if ((temp & STS_HALT) != 0)
|
|
if ((temp & STS_HALT) != 0)
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ * This routine gets called during probe before ehci->command
|
|
|
|
|
+ * has been initialized, so we can't rely on its value.
|
|
|
|
|
+ */
|
|
|
|
|
+ ehci->command &= ~CMD_RUN;
|
|
|
temp = ehci_readl(ehci, &ehci->regs->command);
|
|
temp = ehci_readl(ehci, &ehci->regs->command);
|
|
|
- temp &= ~CMD_RUN;
|
|
|
|
|
|
|
+ temp &= ~(CMD_RUN | CMD_IAAD);
|
|
|
ehci_writel(ehci, temp, &ehci->regs->command);
|
|
ehci_writel(ehci, temp, &ehci->regs->command);
|
|
|
return handshake (ehci, &ehci->regs->status,
|
|
return handshake (ehci, &ehci->regs->status,
|
|
|
STS_HALT, STS_HALT, 16 * 125);
|
|
STS_HALT, STS_HALT, 16 * 125);
|
|
@@ -347,6 +352,7 @@ static int ehci_reset (struct ehci_hcd *ehci)
|
|
|
if (ehci->debug)
|
|
if (ehci->debug)
|
|
|
dbgp_external_startup();
|
|
dbgp_external_startup();
|
|
|
|
|
|
|
|
|
|
+ ehci->command = ehci_readl(ehci, &ehci->regs->command);
|
|
|
ehci->port_c_suspend = ehci->suspended_ports =
|
|
ehci->port_c_suspend = ehci->suspended_ports =
|
|
|
ehci->resuming_ports = 0;
|
|
ehci->resuming_ports = 0;
|
|
|
return retval;
|
|
return retval;
|
|
@@ -363,16 +369,14 @@ static void ehci_quiesce (struct ehci_hcd *ehci)
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
/* wait for any schedule enables/disables to take effect */
|
|
/* wait for any schedule enables/disables to take effect */
|
|
|
- temp = ehci_readl(ehci, &ehci->regs->command) << 10;
|
|
|
|
|
- temp &= STS_ASS | STS_PSS;
|
|
|
|
|
|
|
+ temp = (ehci->command << 10) & (STS_ASS | STS_PSS);
|
|
|
if (handshake_on_error_set_halt(ehci, &ehci->regs->status,
|
|
if (handshake_on_error_set_halt(ehci, &ehci->regs->status,
|
|
|
STS_ASS | STS_PSS, temp, 16 * 125))
|
|
STS_ASS | STS_PSS, temp, 16 * 125))
|
|
|
return;
|
|
return;
|
|
|
|
|
|
|
|
/* then disable anything that's still active */
|
|
/* then disable anything that's still active */
|
|
|
- temp = ehci_readl(ehci, &ehci->regs->command);
|
|
|
|
|
- temp &= ~(CMD_ASE | CMD_IAAD | CMD_PSE);
|
|
|
|
|
- ehci_writel(ehci, temp, &ehci->regs->command);
|
|
|
|
|
|
|
+ ehci->command &= ~(CMD_ASE | CMD_PSE);
|
|
|
|
|
+ ehci_writel(ehci, ehci->command, &ehci->regs->command);
|
|
|
|
|
|
|
|
/* hardware can take 16 microframes to turn off ... */
|
|
/* hardware can take 16 microframes to turn off ... */
|
|
|
handshake_on_error_set_halt(ehci, &ehci->regs->status,
|
|
handshake_on_error_set_halt(ehci, &ehci->regs->status,
|