From: Alexander Gordeev <lasaine@lvk.cs.msu.su>
To: "David Laight" <David.Laight@ACULAB.COM>
Cc: linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V8 03/10] USB/ppc4xx: Add Synopsys DWC OTG CoreInterface Layer
Date: Wed, 26 Jan 2011 20:35:58 +0300 [thread overview]
Message-ID: <20110126203558.4d2ed74e@desktopvm.lvknet> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6D8AC2C@saturn3.aculab.com>
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
В Wed, 26 Jan 2011 16:35:05 -0000
"David Laight" <David.Laight@ACULAB.COM> пишет:
>
> > Also in_le32/out_le32/in_be32/out_be32 are
> > architecture-specific AFAIK.
>
> Isn't the whole patch architecture-specific ?
I use this driver on MIPS board right now. :)
This core from Synopsys is used in many SOCs with various architectures.
> > I'd suggest using readl/writel for LE ops and
> > __be32_to_cpu(__raw_readl(addr))/__raw_writel(__cpu_to_be32(b),addr)
> > 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.
I see. readl/writel are defined in asm-generic/io.h. So IMHO there
should be also le and be versions that can be redefined in
arch-specific code.
--
Alexander
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2011-01-26 17:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 22:57 [PATCH V8 03/10] USB/ppc4xx: Add Synopsys DWC OTG Core Interface Layer tmarri
2011-01-26 16:17 ` Alexander Gordeev
2011-01-26 16:35 ` [PATCH V8 03/10] USB/ppc4xx: Add Synopsys DWC OTG CoreInterface Layer David Laight
2011-01-26 17:35 ` Alexander Gordeev [this message]
2011-02-07 18:45 ` Tirumala Marri
2011-02-07 18:53 ` [PATCH V8 03/10] USB/ppc4xx: Add Synopsys DWC OTG Core Interface Layer Tirumala Marri
2011-02-08 0:19 ` Alexander Gordeev
2011-02-08 1:30 ` Greg KH
2011-02-11 18:33 ` Tirumala Marri
2011-02-14 8:53 ` [PATCH V8 03/10] USB/ppc4xx: Add Synopsys DWC OTG Core InterfaceLayer David Laight
2011-02-14 11:34 ` Alexander Gordeev
2011-02-15 1:04 ` Greg KH
2011-02-08 8:58 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110126203558.4d2ed74e@desktopvm.lvknet \
--to=lasaine@lvk.cs.msu.su \
--cc=David.Laight@ACULAB.COM \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox