Skip to contentSkip to conversation

Fix USB host on 1510/5910?

PATCH In review Jonathan McDowell 3 participants 5 messages Mar 28, 2006 – Apr 4, 2006

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix USB host on 1510/5910?

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?

-----

arch/arm/mach-omap1/clock.h +1 -1
index b7c6881..db48d73 100644
@@ -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.

#1 lore raw
Quoted 7 lines · Jonathan McDowell

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.

Signature · 2 lines
 [           noodles is almost a national pastime in japan            ]
 [ http://www.blackcatnetworks.co.uk/ - IPv6 enabled ADSL/dialup/colo ]
#2 lore raw
Quoted 4 lines · Jonathan McDowell

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.

Signature · 1 line
noodles is not pasta
arch/arm/mach-omap1/board-ams-delta.c +7 -0
index 6178f04..664c3e2 100644
@@ -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)
drivers/usb/host/ohci-omap.c +5 -1
index d9207d8..ced5b2e 100644
@@ -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);
#3 lore raw
Quoted 4 lines · Jonathan McDowell

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

reviewer
#4 lore raw
Quoted 6 lines · Ladislav Michl
Quoted 4 lines · Jonathan McDowell

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.

Quoted 9 lines

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