summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2015-06-03 19:30:59 +0800
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 10:59:18 -0600
commitadaf9935a48317ed52859a246021e9172a37c70c (patch)
tree96a7843625245156cc23ac180bf9fecedc048933 /drivers/usb/host
parent6dc06d05ed11f38374cfebf5c1a5b87832b4213c (diff)
MLK-10994-4 usb: ehci: Keep portsc unchanging when power off port
If PORT_RWC_BITS is set, it will still be cleared by writing 1. portsc.ptw can only be changed when PHY clock is off and portsc.phcd is set, if not, the PHY will be error, so we keep portsc.ptw unchanging in this patch. Signed-off-by: Peter Chen <peter.chen@freescale.com> (cherry picked from commit 24c2f76ab5b1c1d2b4bc26f95ed68e44f6768b8b)
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-hcd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f4191da0a7dd..ba9619527de3 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -331,7 +331,9 @@ static void ehci_turn_off_all_ports(struct ehci_hcd *ehci)
int port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
- ehci_writel(ehci, PORT_RWC_BITS,
+ u32 portsc = ehci_readl(ehci, &ehci->regs->port_status[port]);
+
+ ehci_writel(ehci, portsc,
&ehci->regs->port_status[port]);
spin_unlock_irq(&ehci->lock);
ehci_port_power(ehci, port, false);