diff options
author | Joshua Cha <joshuac@nvidia.com> | 2012-04-16 23:39:19 +0900 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-04-20 15:26:20 -0700 |
commit | 86bd8c33acff1e87b4389e3e0538a018f1419779 (patch) | |
tree | 641680e5c4b699fc73f0db5fcbbd607dc76444b9 /drivers | |
parent | dff743fd36183a25d9ef83cafaf7e4974e15e6b4 (diff) |
tegra: usb: otg: Clear only interrupt enabling bits in suspend
In resuming from LP1, USB HOST is wrongly detected in Tegra2.
In that time, adb connection doesn't work also.
So clear only interrupt enabling bits to fix this problem.
Bug 960254
Bug 970012
Change-Id: I2f8e891ab2abcf8552526ff305d6f3a148076edd
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: http://git-master/r/96769
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/otg/tegra-otg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/otg/tegra-otg.c b/drivers/usb/otg/tegra-otg.c index 35dea5a8ca3c..ecb88acf8d24 100644 --- a/drivers/usb/otg/tegra-otg.c +++ b/drivers/usb/otg/tegra-otg.c @@ -545,10 +545,13 @@ static int tegra_otg_suspend(struct device *dev) struct tegra_otg_data *tegra_otg = platform_get_drvdata(pdev); struct otg_transceiver *otg = &tegra_otg->otg; enum usb_otg_state from = otg->state; + unsigned int val; + /* store the interupt enable for cable ID and VBUS */ clk_enable(tegra_otg->clk); tegra_otg->intr_reg_data = readl(tegra_otg->regs + USB_PHY_WAKEUP); - writel(0, (tegra_otg->regs + USB_PHY_WAKEUP)); + val = tegra_otg->intr_reg_data & ~(USB_ID_INT_EN | USB_VBUS_INT_EN); + writel(val, (tegra_otg->regs + USB_PHY_WAKEUP)); clk_disable(tegra_otg->clk); if (from == OTG_STATE_B_PERIPHERAL && otg->gadget) { |