public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix USB host on 1510/5910?
@ 2006-03-28 16:44 Jonathan McDowell
  2006-03-28 19:05 ` Jonathan McDowell
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan McDowell @ 2006-03-28 16:44 UTC (permalink / raw)
  To: linux-omap-open-source

I'm not quite sure if this is necessary or not. I've found I need it to
get USB working correctly on the Amstrad E3, which is an OMAP5910. From
my reading of ohci-omap.c usb_dc_ck is requested for the 1510 as well,
and if it can't be obtained an error is returned.

Does anyone have USB working correctly on a 1510/5910 with latest git
without something like the below?

Signed-Off-By: Jonathan McDowell <noodles@earth.li>

-----
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
index b7c6881..db48d73 100644
--- a/arch/arm/mach-omap1/clock.h
+++ b/arch/arm/mach-omap1/clock.h
@@ -633,7 +633,7 @@ static struct clk usb_dc_ck = {
 	.name		= "usb_dc_ck",
 	/* Direct from ULPD, no parent */
 	.rate		= 48000000,
-	.flags		= CLOCK_IN_OMAP16XX | RATE_FIXED,
+	.flags		= CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | RATE_FIXED,
 	.enable_reg	= (void __iomem *)SOFT_REQ_REG,
 	.enable_bit	= 4,
 	.enable		= &omap1_clk_enable_generic,
-----

J.

-- 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix USB host on 1510/5910?
  2006-03-28 16:44 [PATCH] Fix USB host on 1510/5910? Jonathan McDowell
@ 2006-03-28 19:05 ` Jonathan McDowell
  2006-03-30 18:02   ` Jonathan McDowell
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan McDowell @ 2006-03-28 19:05 UTC (permalink / raw)
  To: linux-omap-open-source

On Tue, Mar 28, 2006 at 05:44:03PM +0100, Jonathan McDowell wrote:
> I'm not quite sure if this is necessary or not. I've found I need it to
> get USB working correctly on the Amstrad E3, which is an OMAP5910. From
> my reading of ohci-omap.c usb_dc_ck is requested for the 1510 as well,
> and if it can't be obtained an error is returned.
> 
> Does anyone have USB working correctly on a 1510/5910 with latest git
> without something like the below?

Scratch that for the moment. I'm now getting:

ohci ohci: Unlink after no-IRQ?  Controller is probably using the wrong IRQ.

even with this patch, whereas it worked fine for 2.6.15-omap1.

I'd still like to know if anyone's having success with a 1510/5910 and
latest git though, as I've had someone else tell me they were seeing
similar problems on a platform that wasn't the E3 (unfortunately it was
on IRC and I don't have their details. :( ).

J.

-- 
 [           noodles is almost a national pastime in japan            ]
 [ http://www.blackcatnetworks.co.uk/ - IPv6 enabled ADSL/dialup/colo ]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix USB host on 1510/5910?
  2006-03-28 19:05 ` Jonathan McDowell
@ 2006-03-30 18:02   ` Jonathan McDowell
  2006-04-04  7:38     ` Ladislav Michl
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan McDowell @ 2006-03-30 18:02 UTC (permalink / raw)
  To: Ladislav Michl; +Cc: linux-omap-open-source

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

On Tue, Mar 28, 2006 at 08:05:19PM +0100, Jonathan McDowell wrote:
> I'd still like to know if anyone's having success with a 1510/5910 and
> latest git though, as I've had someone else tell me they were seeing
> similar problems on a platform that wasn't the E3 (unfortunately it
> was on IRC and I don't have their details. :( ).

ladis, I think this was you. Does the attached help at all, if you're
still having problems? It sorts things out for me on the E3 with latest
git; the OMAP5910 datasheet says that the lb clock needs enabled for USB
to work, so it seems reasonable that this is required.

J.

-- 
noodles is not pasta

[-- Attachment #2: omap-git-usb-fix.diff --]
[-- Type: text/plain, Size: 1153 bytes --]

diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 6178f04..664c3e2 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -80,8 +80,15 @@ static struct omap_uart_config ams_delta
 	.enabled_uarts = 1,
 };
 
+static struct omap_usb_config ams_delta_usb_config __initdata = {
+	.register_host	= 1,
+	.hmc_mode	= 16,
+	.pins[0]	= 2,
+};
+
 static struct omap_board_config_kernel ams_delta_config[] = {
 	{ OMAP_TAG_UART,	&ams_delta_uart_config },
+	{ OMAP_TAG_USB,		&ams_delta_usb_config },
 };
 
 static void __init ams_delta_init(void)
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index d9207d8..ced5b2e 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -353,7 +353,11 @@ int usb_hcd_omap_probe (const struct hc_
 	if (IS_ERR(usb_host_ck))
 		return PTR_ERR(usb_host_ck);
 
-	usb_dc_ck = clk_get(0, "usb_dc_ck");
+	if (!cpu_is_omap1510())
+		usb_dc_ck = clk_get(0, "usb_dc_ck");
+	else
+		usb_dc_ck = clk_get(0, "lb_ck");
+
 	if (IS_ERR(usb_dc_ck)) {
 		clk_put(usb_host_ck);
 		return PTR_ERR(usb_dc_ck);

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix USB host on 1510/5910?
  2006-03-30 18:02   ` Jonathan McDowell
@ 2006-04-04  7:38     ` Ladislav Michl
  2006-04-04 14:47       ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Ladislav Michl @ 2006-04-04  7:38 UTC (permalink / raw)
  To: Jonathan McDowell; +Cc: linux-omap-open-source

On Thu, Mar 30, 2006 at 07:02:21PM +0100, Jonathan McDowell wrote:
> ladis, I think this was you. Does the attached help at all, if you're
> still having problems? It sorts things out for me on the E3 with latest
> git; the OMAP5910 datasheet says that the lb clock needs enabled for USB
> to work, so it seems reasonable that this is required.

Yes, that's it. Now it ends with:
ohci ohci: OMAP OHCI
ohci ohci: new USB bus registered, assigned bus number 1
ohci ohci: irq 38, io mem 0xfffba000
ohci ohci: OHCI Unrecoverable Error, disabled
ohci ohci: HC died; cleaning up
irq38: nobody cared
which is expected result, because voiceblue board has 64MB memory and
it's something what current omap_1510_local_bus_init cannot handle.

Thanks,
	ladis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix USB host on 1510/5910?
  2006-04-04  7:38     ` Ladislav Michl
@ 2006-04-04 14:47       ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2006-04-04 14:47 UTC (permalink / raw)
  To: Ladislav Michl; +Cc: linux-omap-open-source

* Ladislav Michl <ladis@linux-mips.org> [060404 00:39]:
> On Thu, Mar 30, 2006 at 07:02:21PM +0100, Jonathan McDowell wrote:
> > ladis, I think this was you. Does the attached help at all, if you're
> > still having problems? It sorts things out for me on the E3 with latest
> > git; the OMAP5910 datasheet says that the lb clock needs enabled for USB
> > to work, so it seems reasonable that this is required.
> 
> Yes, that's it. Now it ends with:
> ohci ohci: OMAP OHCI
> ohci ohci: new USB bus registered, assigned bus number 1
> ohci ohci: irq 38, io mem 0xfffba000
> ohci ohci: OHCI Unrecoverable Error, disabled
> ohci ohci: HC died; cleaning up
> irq38: nobody cared
> which is expected result, because voiceblue board has 64MB memory and
> it's something what current omap_1510_local_bus_init cannot handle.

Good to hear, I've pushed it and generated 2.6.16-omap2 patch with it.

This should cut down the once a month usb-host-does-not-work-on-1510 mails :)

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-04-04 14:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-28 16:44 [PATCH] Fix USB host on 1510/5910? Jonathan McDowell
2006-03-28 19:05 ` Jonathan McDowell
2006-03-30 18:02   ` Jonathan McDowell
2006-04-04  7:38     ` Ladislav Michl
2006-04-04 14:47       ` Tony Lindgren

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