public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: r8a66597-udc disable interrupts on shutdown fix
@ 2009-08-19 14:26 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2009-08-19 14:26 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@igel.co.jp>

This patch improves the disable_controller() function in the
r8a66597-udc driver to disable all interrupts and also clear
status flags. With this patch in place the driver survives
kexec.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 drivers/usb/gadget/r8a66597-udc.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- 0005/drivers/usb/gadget/r8a66597-udc.c
+++ work/drivers/usb/gadget/r8a66597-udc.c	2009-08-19 22:04:26.000000000 +0900
@@ -614,8 +614,17 @@ static void disable_controller(struct r8
 	if (r8a66597->pdata->on_chip) {
 		r8a66597_bset(r8a66597, SCKE, SYSCFG0);
 
+		/* disable interrupts */
 		r8a66597_write(r8a66597, 0, INTENB0);
 		r8a66597_write(r8a66597, 0, INTENB1);
+		r8a66597_write(r8a66597, 0, BRDYENB);
+		r8a66597_write(r8a66597, 0, BEMPENB);
+		r8a66597_write(r8a66597, 0, NRDYENB);
+
+		/* clear status */
+		r8a66597_write(r8a66597, 0, BRDYSTS);
+		r8a66597_write(r8a66597, 0, NRDYSTS);
+		r8a66597_write(r8a66597, 0, BEMPSTS);
 
 		r8a66597_bclr(r8a66597, USBE, SYSCFG0);
 		r8a66597_bclr(r8a66597, SCKE, SYSCFG0);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-19 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-19 14:26 [PATCH] usb: r8a66597-udc disable interrupts on shutdown fix Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox