diff options
author | Steve Lin <stlin@nvidia.com> | 2011-11-16 17:47:29 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:50:25 -0800 |
commit | 09393292f6f9fc2f39a9613c62fac70d4bf46c39 (patch) | |
tree | 8b5f3da1217f7e12e7b556e267fbdfc9c644f934 /drivers/usb/host | |
parent | 3bdfa6a904741e97671809ffabf3252f78ff12ed (diff) |
tegra: host: ehci: Null phy state handling
Update the state of the null phy to RUNNING only when suspended in non-LP0.
For LP0 case keep the state as SUSPENDED.
Bug 856442
Reviewed-on: http://git-master/r/65057
(cherry picked from commit 31c6f47165e79e221b79be400a36811165a694c7)
Change-Id: I21853747a72cbaf48b2a35df8e69860eef286aba
Reviewed-on: http://git-master/r/67001
Reviewed-by: Steve Lin <stlin@nvidia.com>
Tested-by: Steve Lin <stlin@nvidia.com>
Rebase-Id: R5ecbe93d3bbe0eed0f6436e5632680ba30d6ca34
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index f7b63573d4e1..b6896a61d2ff 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -432,7 +432,7 @@ done: } #ifdef CONFIG_PM -static void tegra_ehci_restart(struct usb_hcd *hcd) +static void tegra_ehci_restart(struct usb_hcd *hcd, bool is_dpd) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); @@ -461,7 +461,10 @@ static void tegra_ehci_restart(struct usb_hcd *hcd) } down_write(&ehci_cf_port_reset_rwsem); - hcd->state = HC_STATE_RUNNING; + if(is_dpd) + hcd->state = HC_STATE_SUSPENDED; + else + hcd->state = HC_STATE_RUNNING; ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); /* flush posted writes */ ehci_readl(ehci, &ehci->regs->command); @@ -632,8 +635,7 @@ restart: val = readl(&hw->port_status[0]); if (!((val & PORT_POWER) && (val & PORT_PE))) { - tegra_ehci_restart(hcd); - usb_set_device_state(udev, USB_STATE_CONFIGURED); + tegra_ehci_restart(hcd, is_dpd); } if (LP0) @@ -647,7 +649,7 @@ restart: if (hsic) { val = readl(&hw->port_status[0]); if (!((val & PORT_POWER) && (val & PORT_PE))) { - tegra_ehci_restart(hcd); + tegra_ehci_restart(hcd, false); usb_set_device_state(udev, USB_STATE_CONFIGURED); } tegra_usb_phy_bus_idle(tegra->phy); @@ -655,7 +657,7 @@ restart: if (!tegra_usb_phy_is_device_connected(tegra->phy)) schedule_delayed_work(&tegra->work, 50); } else { - tegra_ehci_restart(hcd); + tegra_ehci_restart(hcd, false); } return 0; |