diff options
author | Abhishek Aggarwal <aaggarwal@nvidia.com> | 2010-05-24 18:42:19 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-05-28 17:50:44 -0700 |
commit | 547de0b298e7113b4e5a8b63d56396b478163007 (patch) | |
tree | 25a1c26c01fa8750648bb95abb969de48a20bcb6 /drivers | |
parent | 1f8151757685553dd859d1e4c9d00d3f9c006d6c (diff) |
ehci-tegra: fix OTG state detection at boot-time on USB1
The USB device connected to USB1(OTG) port was not getting detected at
boot time. Reason being that on phy power down (host mode), there was
some delay in VBUS getting disabled. Because of this the OTG state was
getting set to "peripheral" instead of "host".
Fixed this by waiting for VBUS to be disabled in phy power down with a
max wait time of phy hardware time out (1 sec).
Change-Id: I78e561e28d942fa9931dfb88656281b02264859f
Reviewed-on: http://git-master/r/1837
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index 71b561e9a7d1..54360baf4be0 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -140,11 +140,11 @@ static int tegra_ehci_hub_control ( temp = ehci_readl(ehci, status_reg); if (!(temp & (PORT_CONNECT | PORT_CSC | PORT_PE | PORT_PEC)) && ehci->host_reinited) { + /* indicate hcd flags, that hardware is not accessable now */ + clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); tegra_ehci_power_down(hcd); ehci->transceiver->state = OTG_STATE_UNDEFINED; ehci->host_reinited = 0; - /* indicate hcd flags, that hardware is not accessable now */ - clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); } } } @@ -579,11 +579,11 @@ static int tegra_ehci_probe(struct platform_device *pdev) temp = readl(hcd->regs + TEGRA_USB_USBMODE_REG_OFFSET); writel((temp & ~TEGRA_USB_USBMODE_HOST), (hcd->regs + TEGRA_USB_USBMODE_REG_OFFSET)); - tegra_ehci_power_down(hcd); - ehci->host_reinited = 0; /* indicate hcd flags, that hardware is not accessable now * in host mode*/ clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); + tegra_ehci_power_down(hcd); + ehci->host_reinited = 0; } else #endif { |