Re: OHCI_BE_FRAME_NO_SHIFT question

Valentine Barshak <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
Dale Farnsworth wrote:
> On Fri, Oct 05, 2007 at 07:31:33PM +0000, Valentine Barshak wrote:
>> drivers/usb/host/ohci.h:
>>
>> /* HCCA frame number is 16 bits, but is accessed as 32 bits since not all
>>   * hardware handles 16 bit reads.  That creates a different confusion on
>>   * some big-endian SOC implementations.  Same thing happens with PSW 
>> access.
>>   *
>>   * FIXME: Deal with that as a runtime quirk when STB03xxx is ported over
>>   * to arch/powerpc
>>   */
>>
>> #ifdef CONFIG_STB03xxx
>> #define OHCI_BE_FRAME_NO_SHIFT	16
>> #else
>> #define OHCI_BE_FRAME_NO_SHIFT	0
>> #endif
>>
>>
>> Shouldn't we #define OHCI_BE_FRAME_NO_SHIFT	16 for all big endian 
>> platforms?
> 
> No.  OHCI_BE_FRAME_NO_SHIFT is needed to differentiate between
> the big endian sytems that put the frame number in the low 16
> bits and those big endian systems that put the frame number in
> the high 16 bits of that 32-bit field.

OK, thanks.
I've just never worked with those big endian platforms which
do not need this shift.
IIRC, according to OHCI specs, frame number is a 16-bit value and is 
padded with 2 zero bytes, as opposed to 32-bit value. Since it's a 
16-bit value, all be platforms should still have it in the first 2 bytes 
(need the OHCI_BE_FRAME_NO_SHIFT).

> 
>> (At least STB03xxx, 440EP/EPx should have it.)
> 
> Probably.  Each SOC ohci implementation has to be individually
> tested to see how they interpreted the ohci specification.
> 
> -Dale


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.