Thanks for the hint.
- The first is about the get_frame_number. I see that the 'glue' driver can provide a function to read this value and that's good news for me because there is an errata for this chips that specify the red value should be corrected. However, there are two places in the code where the OHCI_FRAME_NO(ohci->hcca) macro is called instead of hcd->driver->get_frame_number(hcd), on line 248 & 626 of ohci-hcd.
I actually count six references ("grep"), not two; in iso scheduling and urb unlinking, not fast paths. Easy enough to fix ... though I'd say to avoid calling usb_bus operations. Just define an OHCI routine that optionally applies that quirk, and call it everywhere the frame number is needed (including from that usb_bus operation).
Why avoid calling usb_bus operation ?
What you mean by 'define an OHCI routine' is use macro each time, like changing the OHCI_FRAME_NO ? Because what I'd need to use
the same driver for a OHCI on PCI (no quirk) and for the OnChip one (with quirk).
- The other problems is that this chip is Big Endian ( power pc ) and that all it's internal registers including the OHCI ones are big endian ... And that's a bigger problem. The 2.4 port for this processor just uses #ifdef #define ... to override any call to cpu_to_le16 or such function when needed. However I don't want that solution because I have another OHCI controler on the PCI bus that requires those ... So what should I do ?
The register reads should always give results in native byte order, even across PCI. I'm not sure what you're saying here ... that driver mostly needs byteswapping for the in-memory data structures (TD, ED).
Yes indeed, I have misunderstood the problem. For each access to the ohci io/mapped registers, the access is thru writel/readl ( as it should be ). But in my asm/io.h, readl is defined as little endian ( cpu_to_le32 and so ). That is OK for PCI but not for the onchip controller, and if I change it to use big endian, then all the PCI are gonna fail. So I guess I have to solutions :
- Duplicate all the OHCI code, one with for PCI in LE, the other for Onchip in BE.
- At each readl/writel, check is a certain flag is set and use the good one.
But there seem to be another problem than the readl/writel issue. Ive modified them to have the correct endianness and now I have this message at boot :
usb 1-1: control timeout on ep0out
mpc5xxx_ohci 03: Unlink after no-IRQ? Different ACPI or APIC settings may help.
And the USB interrupt is triggered somthing like 2000 times a sec.
Sylvain Munaut
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
