MPC8555 USB host support

Alexandre BASTOS alebas at televes.com
Tue Nov 15 23:03:58 EST 2005


Mike,


> I've opened a project on the SourceForge,
> http://cpm2usb.sourceforge.net. The file containing patch against
> 2.6.12.3 can be downloaded at http://sourceforge.net/projects/cpm2usb.
>
> The driver was developed on MPC8272ADS, but should go as well on 8270
> since they have the same USB host controller AFAIK.
> Currently, as far as I tested it works fine with full-speed single
> device attached through hub, but fails is there are transfers from/to
> several devices simultaneously.
> As for the code itself, it's far from being perfect.


I have been testing your cpm2usb driver from sourceforge on my
MPC8272ADS and I couldn't get a usb 2.0 pendrive working.

usbcore tries to identify the device with both schemes, old and
new, but the hcd returns always a timeout. The output from console:

# modprobe usbcore
usbcore: registered new driver usbfs
usbcore: registered new driver hub

# modprobe m82xx-hcd
=> driver mpc82xx-hcd, 2005
mpc82xx-hcd mpc82xx-hcd.3: PQ2 intergrated USB controller v0.1
mpc82xx-hcd mpc82xx-hcd.3: new USB bus registered, assigned bus number 1
usb usb1: Product: PQ2 intergrated USB controller v0.1
usb usb1: Manufacturer: Linux 2.6.12 mpc82xx-hcd
usb usb1: SerialNumber: mpc82xx-hcd.3
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
PQ2USB: debug file creation

[... After pendrive insertion]

usb 1-1: new full speed USB device using mpc82xx-hcd and address 2
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: new full speed USB device using mpc82xx-hcd and address 3
usb 1-1: device descriptor read/64, error -110
usb 1-1: device descriptor read/64, error -110
usb 1-1: new full speed USB device using mpc82xx-hcd and address 4
usb 1-1: device not accepting address 4, error -110
usb 1-1: new full speed USB device using mpc82xx-hcd and address 5
usb 1-1: device not accepting address 5, error -110

To compile the driver as a module, I made only a change in "tx_err"
function from m82xx-hcd.c, which shouldn't be affecting.
I have also commented out the re-definition of BCSR_ADDR, which is
already defined to f4500000 in pq2ads.h

--- m82xx-hcd.c.orig    2005-11-15 12:05:40.547987056 +0100
+++ m82xx-hcd.c 2005-11-14 18:15:13.000000000 +0100
@@ -98,7 +98,7 @@
        hp->usb_clock = USB_CLOCK_PC24_CLK8;

        {
-#define BCSR_ADDR              ((uint)0xf8000000)
+//#define BCSR_ADDR            ((uint)0xf8000000)
        volatile uint* bcsr_usb = (volatile uint*)(BCSR_ADDR +
                                                   BCSR_USB_OFFSET);

@@ -281,7 +281,9 @@
 static void tx_err(struct m8xxhci_private *hp, int ber)
 {
        volatile usbregs_t *usbregs = hp->usbregs;
-       volatile cpm_cpm2_t *cp = cpmp;
+       //volatile cpm_cpm2_t *cp = cpmp;
+       volatile cpm2_map_t *immap = (volatile cpm2_map_t *)CPM_MAP_ADDR;
+       volatile cpm_cpm2_t *cp = &immap->im_cpm;

        if ( hp->active_qe )
                hp->stats.txe[hp->active_qe->qtype]++;

So, any idea which could be happening? I have little knowledge about usb
so I am quite lost.


Thanks.

Alex BASTOS



More information about the Linuxppc-embedded mailing list