[PATCH V8 03/10] USB/ppc4xx: Add Synopsys DWC OTG CoreInterface Layer
tmarri at apm.com
Tue Feb 8 05:45:45 EST 2011
From: linuxppc-dev-bounces+tmarri=amcc.com at lists.ozlabs.org
[mailto:linuxppc-dev-bounces+tmarri=amcc.com at lists.ozlabs.org] On Behalf
Of David Laight
Sent: Wednesday, January 26, 2011 8:35 AM
Cc: linux-usb at vger.kernel.org; linuxppc-dev at lists.ozlabs.org
Subject: RE: [PATCH V8 03/10] USB/ppc4xx: Add Synopsys DWC OTG
> Also in_le32/out_le32/in_be32/out_be32 are
> architecture-specific AFAIK.
Isn't the whole patch architecture-specific ?
> I'd suggest using readl/writel for LE ops and
> for BE ops.
Since the ppc doesn't have a byteswap instruction (and the LE
memory transfers might even be slow!) you really don't want to
be doing software byteswap.
Not to mention the horrific synchronistion instructions
that in_le32() and out_le32() actually contain.
I didn't find __raw_readl() when I was looking for asm
patterns that byteswapped memory transfers.
I did find st_le32() and ld_le32() in arch/powerpc/include/asm/swab.h
but that file is actually quite difficult to #include because
there is another swab.h that gets included instead.
[marri] Initial version of DWC-IP did not have feature to swap endianness.
Whereas next versions have it.
More information about the Linuxppc-dev