All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@linux.it>
To: Pete Popov <ppopov@embeddedalley.com>
Cc: "'linux-mips@linux-mips.org'" <linux-mips@linux-mips.org>
Subject: Re: USB hangs on AU1100
Date: Fri, 6 May 2005 11:18:45 +0200	[thread overview]
Message-ID: <20050506091845.GB1987@enneenne.com> (raw)
In-Reply-To: <1115311361.1614.6.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

On Thu, May 05, 2005 at 09:42:41AM -0700, Pete Popov wrote:
> It sounds like this is a custom Au1100 based board? What boot code are

Yes, but is very close to the DB1100.

> you running?  I'm guessing the SOC isn't setup correctly or you have a
> HW problem.

I selected the code for the DB1100... I'm very puzzled about this
problem!

However let me suggest you this little patch in order to advice the
user about this problem and to avoid system locks.

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@linux.it
Linux Device Driver                             giometti@enneenne.com
Embedded Systems                     home page: giometti.enneenne.com
UNIX programming                     phone:     +39 349 2432127

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1564 bytes --]

Index: ohci-au1xxx.c
===================================================================
RCS file: /home/cvs/linux/drivers/usb/host/ohci-au1xxx.c,v
retrieving revision 1.5
diff -u -r1.5 ohci-au1xxx.c
--- ohci-au1xxx.c	3 Apr 2005 20:39:19 -0000	1.5
+++ ohci-au1xxx.c	6 May 2005 09:14:35 -0000
@@ -38,8 +38,10 @@
 
 /*-------------------------------------------------------------------------*/
 
-static void au1xxx_start_hc(struct platform_device *dev)
+static int au1xxx_start_hc(struct platform_device *dev)
 {
+	int count = 3000;
+
 	printk(KERN_DEBUG __FILE__
 		": starting Au1xxx OHCI USB Controller\n");
 
@@ -51,11 +53,19 @@
 
 	/* wait for reset complete (read register twice; see au1500 errata) */
 	while (au_readl(USB_HOST_CONFIG),
-		!(au_readl(USB_HOST_CONFIG) & USBH_ENABLE_RD)) 
+		!(au_readl(USB_HOST_CONFIG) & USBH_ENABLE_RD)) {
 		udelay(1000);
+		if (--count == 0) {
+			printk(KERN_ERR __FILE__
+			": unable to reset USB host\n");
+			return -EBUSY;
+		}
+	}
 
 	printk(KERN_DEBUG __FILE__
 	": Clock to USB host has been enabled \n");
+
+	return 0;
 }
 
 static void au1xxx_stop_hc(struct platform_device *dev)
@@ -113,7 +123,11 @@
 		goto err2;
 	}
 
-	au1xxx_start_hc(dev);
+	retval = au1xxx_start_hc(dev);
+	if (retval < 0) {
+		pr_debug("au1xxx start failed");
+		goto err3;
+	}
 	ohci_hcd_init(hcd_to_ohci(hcd));
 
 	retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT);
@@ -121,6 +135,7 @@
 		return retval;
 
 	au1xxx_stop_hc(dev);
+ err3:
 	iounmap(hcd->regs);
  err2:
 	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);

  parent reply	other threads:[~2005-05-06  9:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-05 15:54 USB hangs on AU1100 Rodolfo Giometti
2005-05-05 16:42 ` Pete Popov
2005-05-05 17:20   ` Thiemo Seufer
2005-05-05 17:51     ` Maciej W. Rozycki
2005-05-05 18:50       ` Pete Popov
2005-05-05 17:56     ` Ulrich Teichert
2005-05-05 17:56       ` Ulrich Teichert
2005-05-05 19:18       ` Thiemo Seufer
2005-05-06  9:18   ` Rodolfo Giometti [this message]
2005-05-06 14:27   ` Rodolfo Giometti
2005-05-06 14:54     ` Dan Malek
2005-05-06 15:51     ` Pete Popov

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=20050506091845.GB1987@enneenne.com \
    --to=giometti@linux.it \
    --cc=linux-mips@linux-mips.org \
    --cc=ppopov@embeddedalley.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.