USB: r8a66597-hcd: suspend/resume support

Previous thread: USB: pxa27x_udc: typo fixes and code cleanups by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:31 pm. (1 message)

Next thread: sata_mv: optimize use of mv_edma_cfg by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:31 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:31 pm

Gitweb:     http://git.kernel.org/linus/e1e609be49c9d345e8b67a122a7cdae48ad27c7e
Commit:     e1e609be49c9d345e8b67a122a7cdae48ad27c7e
Parent:     71d2718f2507dc17501d04e2bdca7b8e694ce365
Author:     Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
AuthorDate: Thu Mar 19 14:18:15 2009 +0900
Committer:  Greg Kroah-Hartman <gregkh@suse.de>
CommitDate: Tue Mar 24 16:20:45 2009 -0700

    USB: r8a66597-hcd: suspend/resume support
    
    Fix the problem that system cannot suspend.
    
    Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/usb/host/r8a66597-hcd.c |  101 ++++++++++++++++++++++++++++++++++++++-
 drivers/usb/host/r8a66597.h     |    2 +
 2 files changed, 102 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 713f4cf..f1626e5 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -1013,6 +1013,9 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port,
 
 	r8a66597_write(r8a66597, ~DTCH, get_intsts_reg(port));
 	r8a66597_bset(r8a66597, DTCHE, get_intenb_reg(port));
+
+	if (r8a66597->bus_suspended)
+		usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597));
 }
 
 /* this function must be called with interrupt disabled */
@@ -1614,6 +1617,11 @@ static irqreturn_t r8a66597_irq(struct usb_hcd *hcd)
 			r8a66597_bclr(r8a66597, DTCHE, INTENB2);
 			r8a66597_usb_disconnect(r8a66597, 1);
 		}
+		if (mask2 & BCHG) {
+			r8a66597_write(r8a66597, ~BCHG, INTSTS2);
+			r8a66597_bclr(r8a66597, BCHGE, INTENB2);
+			usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597));
+		}
 	}
 
 	if (mask1) {
@@ -1629,6 +1637,12 @@ static irqreturn_t r8a66597_irq(struct usb_hcd *hcd)
 			r8a66597_bclr(r8a66597, DTCHE, INTENB1);
 			r8a66597_usb_disconnect(r8a66597, 0);
 		}
+		if (mask1 & BCHG) {
+			r8a66597_write(r8a66597, ~BCHG, INTSTS1);
+			r8a66597_bclr(r8a66597, BCHGE, ...
Previous thread: USB: pxa27x_udc: typo fixes and code cleanups by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:31 pm. (1 message)

Next thread: sata_mv: optimize use of mv_edma_cfg by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:31 pm. (1 message)