From: Anton Vorontsov <avorontsov@ru.mvista.com>
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
linuxppc-dev@ozlabs.org, Alan Stern <stern@rowland.harvard.edu>,
Andrew Morton <akpm@linux-foundation.org>,
Li Yang <leoli@freescale.com>, Timur Tabi <timur@freescale.com>
Subject: [PATCH 3/6] USB: fsl_qe_udc: Fix QE USB controller initialization
Date: Thu, 25 Dec 2008 17:15:07 +0300 [thread overview]
Message-ID: <20081225141507.GC6786@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <20081225141402.GA30689@oksana.dev.rtsoft.ru>
qe_udc_reg_init() leaves the USB controller enabled before muram memory
initialized. Sometimes the uninitialized muram memory confuses the
controller, and it start sending the busy interrupts.
Fix this by disabling the controller, it will be enabled later by
the gadget driver, at bind time.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/usb/gadget/fsl_qe_udc.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c
index 2677c9e..b460c6d 100644
--- a/drivers/usb/gadget/fsl_qe_udc.c
+++ b/drivers/usb/gadget/fsl_qe_udc.c
@@ -2452,8 +2452,12 @@ static int __devinit qe_udc_reg_init(struct qe_udc *udc)
struct usb_ctlr __iomem *qe_usbregs;
qe_usbregs = udc->usb_regs;
- /* Init the usb register */
+ /* Spec says that we must enable the USB controller to change mode. */
out_8(&qe_usbregs->usb_usmod, 0x01);
+ /* Mode changed, now disable it, since muram isn't initialized yet. */
+ out_8(&qe_usbregs->usb_usmod, 0x00);
+
+ /* Initialize the rest. */
out_be16(&qe_usbregs->usb_usbmr, 0);
out_8(&qe_usbregs->usb_uscom, 0);
out_be16(&qe_usbregs->usb_usber, USBER_ALL_CLEAR);
--
1.5.6.5
next prev parent reply other threads:[~2008-12-25 14:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-25 14:14 [PATCH 0/6] USB: Fixes for fsl_qe_udc driver Anton Vorontsov
2008-12-25 14:15 ` [PATCH 1/6] USB: fsl_qe_udc: Fix oops on QE UDC probe failure Anton Vorontsov
2008-12-25 14:15 ` [PATCH 2/6] USB: fsl_qe_udc: Fix recursive locking bug in ch9getstatus() Anton Vorontsov
2008-12-25 14:15 ` Anton Vorontsov [this message]
2008-12-25 14:15 ` [PATCH 4/6] USB: fsl_qe_udc: Fix disconnects reporting during bus reset Anton Vorontsov
2008-12-25 14:15 ` [PATCH 5/6] USB: fsl_qe_udc: Fix muram corruption by disabled endpoints Anton Vorontsov
2008-12-25 14:15 ` [PATCH 6/6] USB: fsl_qe_udc: Fix stalled TX requests bug Anton Vorontsov
2009-01-07 4:44 ` [PATCH 0/6] USB: Fixes for fsl_qe_udc driver Kumar Gala
2009-01-07 4:53 ` Greg KH
2009-01-13 15:49 ` Kumar Gala
2009-01-13 16:40 ` Greg KH
2009-01-13 17:30 ` Kumar Gala
2009-02-02 15:50 ` Anton Vorontsov
2009-02-04 1:27 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081225141507.GC6786@oksana.dev.rtsoft.ru \
--to=avorontsov@ru.mvista.com \
--cc=akpm@linux-foundation.org \
--cc=dbrownell@users.sourceforge.net \
--cc=greg@kroah.com \
--cc=leoli@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=stern@rowland.harvard.edu \
--cc=timur@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).