Hi David,

David Brownell wrote:
> I cleaned it up a bunch ... can you verify this still works on your hardware?
> Sanity tested on x86_64.
>   
I've made the similar work to support big endian dma descriptors in EHCI 
since I have the board based on IXP4XX processor configured in BE mode 
and on-chip EHCI HCD that has BE descriptors. My patch is mostly close 
to this one except changes related to ehci cpufreq patch and 
constant_cpu_to_le32 conversations.

I confirm that these patch works fine with my BE h/w (IXP4XX) and also 
I've tested it with LE h/w (mips based board with LE on-SoC usb) in 
2.6.21-rc4.

But I would like to post a minor comments:
> The guts of the patch are to introduce the hc32 type and change all
> references from le32 to hc32.  All access routines are converted from
> cpu_to_le32(...) to cpu_to_hc32(ehci, ...) and similar for the other
> "direction".  (This is the same approach used with OHCI.)
>   
To be more close to OHCI approach we should add some additional Kconfig 
rules to
avoid run-time endianness checking for pure BE case (when MMIO and DESC 
have the same endianness).
I agree, now this is OK for pure LE and mixed (USB controller MMIO and 
DESC with differend endianness -
the related h/w is PPC PS3) cases.
This is safe for pure LE case via CONFIG_USB_EHCI_BIG_ENDIAN_{DESC,MMIO} 
options but is not for
pure BE case (the related h/w are AMCC PPC440EPx SoC and Intel IXP4XX 
processor).

> +#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_DESC
> +typedef __u32 __bitwise __hc32;
> +typedef __u16 __bitwise __hc16;
> +#else
> +#define __hc32       __le32
> +#define __hc16       __le16
> +#endif
>   
__hc16 is useless for EHCI. This just provide a mess.
> +/*
> + * The AMCC 440EPx not only implements its EHCI registers in big-endian
> + * format, but also its DMA data structures (descriptors).
> + *
> + * EHCI controllers accessed through PCI work normally (little-endian
> + * everywhere), so we won't bother supporting a BE-only mode for now.
> + */
>   
Why not for now? :)
There are already 2 platforms that support BE-only mode.

It's simple to render the OHCI logic for EHCI. Also this will keep the 
identity. If you want I can prepare a patch over this one for your review.

Best regards,
Vladimir


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to