mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: RFC: Fix big endian MMIO primitives.
Date: Sun, 06 May 2012 20:01:58 +0200	[thread overview]
Message-ID: <m37gwpyyqx.fsf@intrepid.localdomain> (raw)
In-Reply-To: <20120506174334.GW4141@pengutronix.de> (Sascha Hauer's message of "Sun, 6 May 2012 19:43:34 +0200")

Sascha Hauer <s.hauer@pengutronix.de> writes:

> Maybe we should rather use the __raw_* variants in the cfi driver aswell
> which is the only user of the functions below.

We can do that for the sake of compatibility with Linux.

> For some reason I
> believed that the __raw_* variants also do little endian accesses which
> is wrong.
> I don't like the naming of the __raw_* variants very much as the
> underscores and 'raw' suggests that these are internal functions which
> one should rather not use, but in fact these are the correct functions
> in most SoC (non PCI) drivers. Anyway, since Linux has this functions we
> should use them aswell, everything else probably leads to more
> confusion.

I don't know.

I would rename:
__raw_* -> cpu_*() as they are just plain and simple accessors with
native endianness.

readl() and friends -> le32_readl() etc.
The 'l' is somewhat redundant, the size is already determined by '32'
(and 16, 8). Maybe le32_read() or read_le32()?

Your call. We can just limit this renaming to cpu_* -> __raw_*.


To be honest, I would like this stuff renamed in Linux as well. Perhaps
some day.
-- 
Krzysztof Halasa

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-05-06 18:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05 21:34 Krzysztof Halasa
2012-05-06 17:43 ` Sascha Hauer
2012-05-06 18:01   ` Krzysztof Halasa [this message]
2012-05-06 18:13     ` Sascha Hauer
2012-05-07  7:51 ` Sascha Hauer

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=m37gwpyyqx.fsf@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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