diff options
author | Zhao Chenhui <chenhui.zhao@freescale.com> | 2012-03-23 09:03:39 (GMT) |
---|---|---|
committer | Fleming Andrew-AFLEMING <AFLEMING@freescale.com> | 2013-04-17 23:17:08 (GMT) |
commit | 8ad5123074bad1f487aac35f86b772fd7ac02499 (patch) | |
tree | 7f372342c41b680cb1c8dd2d4ccb093ed529da56 /drivers/usb | |
parent | afd36f7bd825908dc88775a0ec3979340fa537eb (diff) | |
download | linux-fsl-qoriq-8ad5123074bad1f487aac35f86b772fd7ac02499.tar.xz |
usb/fsl: enable USB wakeup
To enable USB wakeup feature,
* Add a interrupt flag IRQF_NO_SUSPEND to avoid the USB interrupt
disabled when suspending.
* Set the USB module as a wakeup source.
Change-Id: I85b1b538175ded6e6f56f701d76f49da9884178f
Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/1448
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index d81d2fc..e645b23 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -30,6 +30,7 @@ #include <linux/err.h> #include <linux/platform_device.h> #include <linux/fsl_devices.h> +#include <sysdev/fsl_soc.h> #include "ehci-fsl.h" @@ -135,7 +136,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, /* Don't need to set host mode here. It will be done by tdi_reset() */ - retval = usb_add_hcd(hcd, irq, IRQF_SHARED); + retval = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_NO_SUSPEND); if (retval != 0) goto err4; @@ -564,6 +565,8 @@ static int ehci_fsl_drv_suspend(struct device *dev) return ehci_fsl_mpc512x_drv_suspend(dev); } + mpc85xx_pmc_set_wake(dev, true); + ehci_prepare_ports_for_controller_suspend(hcd_to_ehci(hcd), device_may_wakeup(dev)); if (!fsl_deep_sleep()) @@ -585,6 +588,8 @@ static int ehci_fsl_drv_resume(struct device *dev) return ehci_fsl_mpc512x_drv_resume(dev); } + mpc85xx_pmc_set_wake(dev, false); + ehci_prepare_ports_for_controller_resume(ehci); if (!fsl_deep_sleep()) return 0; |