[U-Boot] mpc5121 - EHCI problems with some (but not all) USB hubs

Damien Dusha d.dusha at gmail.com
Tue Sep 22 08:32:26 CEST 2009


Dear All,

I am attempting to integrate the USB on the Freescale mpc5121
processor on the mpc5121ads board from Silicon Turnkey for upgrades of
kernel, u-boot etc.

I have succeeded in integrating Francesco Rendine 's EHCI patch for
the MPC5121 (see
http://lists.denx.de/pipermail/u-boot/2009-June/055021.html ) and I
have the general functionality of upgrading from a USB stick working
straight from the USB, or through some (but not all) USB hubs.

However, I am having problem using the driver with some (but not all)
USB hubs.   I have some USB hubs that work "out of the box", but I
have other hubs that cause booting u-boot to hang after attempting to
initialise the USB.  The ones that do work, and the ones that fail all
fail in the same place the great majority of the time (they succeed
very occasionally).

I have traced the hang to the following lines in drivers/usb/host/ehci-hcd.c:

	/* Wait for TDs to be processed. */
	ts = get_timer(0);
	vtd = td;
	do {
		/* Invalidate dcache */
		ehci_invalidate_dcache(&qh_list);
		token = hc32_to_cpu(vtd->qt_token);
		if (!(token & 0x80))
			break;

               /* This was my own line I added to check.  The
get_timer(ts) always returns 0 and never exits the loop */
               debug("get_timer: %d, CONFIG_SYS_HZ: %d\n",
get_timer(ts), CONFIG_SYS_HZ);
	} while (get_timer(ts) < CONFIG_SYS_HZ);

One of the hubs that fails is part of a 4-port USB-Serial converter
(it's a hub to 4 FTDI chips) and is described as:
Manufacturer ALCOR
Product      Generic USB Hub

Another of the (mostly) failing hubs is a generic "i-rocks" brand:
Manufacturer
Product      USB2.0 Hub

It happens even when the hubs are self-powered, or connected through a
hub that is itself powered externally (we've had power problems from
the mpc5121ads board's USB in the past).

The hubs (and USB-Serial adaptors) are perfectly recognised under
Linux, if USB is not started in U-Boot and we proceed to a normal
Linux boot sequence.

Is anyone able to suggest what might be going wrong, or some further
testing that may help reveal the problem?

Best regards
Damien Dusha.


More information about the U-Boot mailing list