linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tirumala Marri <tmarri@apm.com>
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: Mon, 7 Feb 2011 10:45:45 -0800	[thread overview]
Message-ID: <0a93b035a8cae3d1bcc7dae9f31e3adc@mail.gmail.com> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6D8AC2C@saturn3.aculab.com>

-----Original Message-----
From: linuxppc-dev-bounces+tmarri=amcc.com@lists.ozlabs.org
[mailto:linuxppc-dev-bounces+tmarri=amcc.com@lists.ozlabs.org] On Behalf
Of David Laight
Sent: Wednesday, January 26, 2011 8:35 AM
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


> 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
> __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.

[marri] Initial version of DWC-IP did not have feature to swap endianness.
Whereas next versions have it.

  parent reply	other threads:[~2011-02-07 18:45 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
2011-02-07 18:45     ` Tirumala Marri [this message]
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=0a93b035a8cae3d1bcc7dae9f31e3adc@mail.gmail.com \
    --to=tmarri@apm.com \
    --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;
as well as URLs for NNTP newsgroup(s).