
11 Jan
2007
11 Jan
'07
3:58 p.m.
Hi Wolfgang,
On Thursday 11 January 2007 14:13, Wolfgang Denk wrote:
These are different issues! usb_ohci.c uses readl and writel to access the controller's registers from the CPU (e.g. ohci.regs). The original code
never
swaps here. But a PCI OHCI controller on a PowerPC needs it. The mXX_swap macros are used to swap data fields in structures that are passed to the
host
controller indirectly.
Be careful! Keep in mind that you may need both cases in one system, like using a PCI OHCI controller on a MPC5200 board where you have to support USB both on the internal USB controllers and on the PCI card.
See our linuxppc_2_4_devel tree for one possible implementation.
Now it's getting ugly. But I will give it a glace.
Matthias