linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: drivers/rtc/rtc-pl031.c uses __raw_readl()?
Date: Thu, 19 Nov 2009 09:43:59 +0000	[thread overview]
Message-ID: <20091119094359.GF13376@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20091113232637.GB8637@n2100.arm.linux.org.uk>

On Fri, Nov 13, 2009 at 11:26:37PM +0000, Russell King - ARM Linux wrote:
> On Thu, Nov 12, 2009 at 09:43:43AM +0100, Linus Walleij wrote:
> > 2009/11/11 Linus Walleij <linus.ml.walleij@gmail.com>:
> > 
> > > Is there some special reason as to why drivers/rtc/rtc-pl031.c uses
> > > the __raw_[read|write]l() macro instead of plain [read|write]l()?
> > 
> > Reading the macro definitions I come to the conclusion that readl()
> > is always little-endian and __raw_readl() is the machine endianness,
> > so that if you put your ARM in BE mode or synthesize this PrimeCell
> > on PPC, it will not work. PrimeCell registers are always LE I believe.
> > 
> > Now none of that was exactly obvious so please correct me if I'm
> > wrong!
> 
> I think it's a question for Catalin - unfortunately the AMBA specifications
> (which I guess is where there's a definitive statement on the endianness
> for APB peripherals) is only available to registered users via the ARM
> website.

So where do we stand on this?  Are Primecell registers always LE?  Or
can they be BE if running in one of the BE modes?

I'm not merging the patch until we have a definitive answer on this.

  reply	other threads:[~2009-11-19  9:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11  9:30 drivers/rtc/rtc-pl031.c uses __raw_readl()? Linus Walleij
2009-11-12  8:43 ` Linus Walleij
2009-11-13 23:26   ` Russell King - ARM Linux
2009-11-19  9:43     ` Russell King - ARM Linux [this message]
2009-11-19 10:49       ` Russell King - ARM Linux
2009-11-17 10:02   ` Uwe Kleine-König
2009-11-18 22:19     ` Leo (Hao) Chen

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=20091119094359.GF13376@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).