diff options
author | Krishna Yarlagadda <kyarlagadda@nvidia.com> | 2012-02-13 18:29:01 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-06-26 12:47:10 +0530 |
commit | 436b669626eafbfa03c8fa78681a23e24a6bdb59 (patch) | |
tree | 796789a21a1292db2c22bbd4aaa4be0d8c936810 /drivers/usb/host/ehci-tegra.c | |
parent | d3e52d6cdd3dc0ff9bcf6d959df9fa7db17a2cf6 (diff) |
usb: host: select parallel interface after reset
Ensure that controller is in parallel interface mode
after reset and before starting any transactions
Bug 837133
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Change-Id: I8045cfaeed8cb002bb64367884eec5cacc14cfea
Reviewed-on: http://git-master/r/83462
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index ab2bdb3dc5c9..06f3a709dd69 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -37,6 +37,11 @@ static const char driver_name[] = "tegra-ehci"; #define TEGRA_USB_DMA_ALIGN 32 +#define HOSTPC_REG_OFFSET 0x1b4 + +#define HOSTPC1_DEVLC_STS (1 << 28) +#define HOSTPC1_DEVLC_NYT_ASUS 1 + struct tegra_ehci_hcd { struct ehci_hcd *ehci; struct tegra_usb_phy *phy; @@ -305,6 +310,9 @@ static int tegra_ehci_setup(struct usb_hcd *hcd) struct ehci_hcd *ehci = hcd_to_ehci(hcd); struct tegra_ehci_hcd *tegra = dev_get_drvdata(hcd->self.controller); int retval; +#ifndef CONFIG_ARCH_TEGRA_2x_SOC + u32 val; +#endif /* EHCI registers start at offset 0x100 */ ehci->caps = hcd->regs + 0x100; @@ -319,6 +327,14 @@ static int tegra_ehci_setup(struct usb_hcd *hcd) ehci->has_hostpc = tegra_usb_phy_has_hostpc(tegra->phy) ? 1 : 0; ehci->broken_hostpc_phcd = true; +#ifndef CONFIG_ARCH_TEGRA_2x_SOC + ehci->has_hostpc = 1; + + val = readl(hcd->regs + HOSTPC_REG_OFFSET); + val &= ~HOSTPC1_DEVLC_STS; + val &= ~HOSTPC1_DEVLC_NYT_ASUS; + writel(val, hcd->regs + HOSTPC_REG_OFFSET); +#endif hcd->has_tt = 1; retval = ehci_halt(ehci); |