Subject: Re: OHCI question...
To: Lennart Augustsson <>
From: Garrett D'Amore <>
List: tech-kern
Date: 11/01/2005 15:30:53
I've submitted diffs to do this (tested, somewhat) as part of PR 

Have a gander, and if folks like it, someone can take it on and 
integrate it.

    -- Garrett

Lennart Augustsson wrote:

> Masao Uebayashi wrote:
>> Hi!  We have a similar patch for MPC5200 in a local tree, where
>> registers are big-endian.
>>> 1) add logic to ohci.c to support run-time conditionalized byte 
>>> swapping.  Probably via a function pointer in the softc, this would 
>>> work, but might be a little bit slower.  (I'd conditionalize this 
>>> support via a new OHCI_NATIVE_ORDER or somesuch.)
>> I'm in favor of this approach.
> I do too.  Having another version of the driver seems wrong.
> But I wouldn't want to penalize ports that don't require dynamic
> swapping either.  You could define some new swapping macros
> OHTOLE32() and OLE32TOH() that can be defined to either the
> usual swapping functions if the conditional swapper.
> Furthermore, those macros could have the conditional test inside
> them so there doesn't have to be a function call for each swap.
> (Assuming there is a performance problem.  I actually doubt there
> is.)
>     -- Lennart