summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-tegra.c
diff options
context:
space:
mode:
authorRakesh Bodla <rbodla@nvidia.com>2011-12-01 12:47:41 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-08 17:05:58 +0530
commita3dd680a9e55e216871adb44132c7bb6a620bb1f (patch)
tree1964937a775c9f36d1d71b132fade477edf04f8c /drivers/usb/host/ehci-tegra.c
parent85eb6549652b7c6eeb2434efca01df7c13a2923c (diff)
usb: ehci: tegra: remote wakeup for usb host in lp0
enable_irq_wake call for INT_USB/INT_USB3 is added Bug 902114 Change-Id: I90f273019285f19bd3ec1e7a2c57641c12ab8202 Reviewed-on: http://git-master/r/67607 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'drivers/usb/host/ehci-tegra.c')
-rw-r--r--drivers/usb/host/ehci-tegra.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
index b6896a61d2ff..1e211b16c12f 100644
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@ -73,6 +73,7 @@ struct tegra_ehci_hcd {
bool timer_event;
int hsic_connect_retries;
struct mutex tegra_ehci_hcd_mutex;
+ unsigned int irq;
};
static void tegra_ehci_power_up(struct usb_hcd *hcd, bool is_dpd)
@@ -1195,6 +1196,7 @@ static int tegra_ehci_probe(struct platform_device *pdev)
goto fail;
}
set_irq_flags(irq, IRQF_VALID);
+ tegra->irq = irq;
#ifdef CONFIG_USB_EHCI_ONOFF_FEATURE
if (instance == 1) {
@@ -1213,10 +1215,18 @@ static int tegra_ehci_probe(struct platform_device *pdev)
err = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
if (err) {
- dev_err(&pdev->dev, "Failed to add USB HCD\n");
+ dev_err(&pdev->dev, "Failed to add USB HCD error = %d\n", err);
goto fail;
}
+ err = enable_irq_wake(tegra->irq);
+ if (err < 0) {
+ dev_warn(&pdev->dev,
+ "Couldn't enable USB host mode wakeup, irq=%d, "
+ "error=%d\n", tegra->irq, err);
+ err = 0;
+ }
+
#ifdef CONFIG_USB_EHCI_ONOFF_FEATURE
if (instance == 1)
ehci_handle = hcd;
@@ -1335,6 +1345,7 @@ static int tegra_ehci_remove(struct platform_device *pdev)
/* Turn Off Interrupts */
ehci_writel(tegra->ehci, 0, &tegra->ehci->regs->intr_enable);
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
+ disable_irq_wake(tegra->irq);
usb_remove_hcd(hcd);
usb_put_hcd(hcd);
cancel_delayed_work(&tegra->work);