From: Eugene Surovegin <ebs@ebshome.net>
To: "Jenkins, Clive" <Clive.Jenkins@xerox.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: Yosemite/440EP why are readl()/ioread32() setuptoreadlittle-endian?
Date: Thu, 2 Feb 2006 09:16:46 -0800 [thread overview]
Message-ID: <20060202171646.GD12810@gate.ebshome.net> (raw)
In-Reply-To: <35786B99AB3FDC45A8215724617919736D921E@gbrwgceumf01.eu.xerox.net>
On Thu, Feb 02, 2006 at 11:26:22AM -0000, Jenkins, Clive wrote:
> Regardless of what standards or hardware might exist, I would be
> happy if Linux provided alternatives to readl()... that converted
> between big-endian and cpu-endian, so that I could write in my
> driver, for example:
>
> static inline my_readl(...)
> {
> #if (my interconnect is PCI or other little-endian)
> return(readl(...));
> #else
> return(readl_be(...));
> #endif
> }
>
> That must make my driver more portable in future circumstances
Huh?
If you re-read this thread, you'll notice that I was responding to
e-mail where original poster did NOT want to do exactly this in his
driver. But you are suggesting what we were discussing on how to
_avoid_. I'm really confused, what is your point?
What I was talking, in short, that if we _really_ want generic non-PCI
accessors, we need something similar to the way IDE layer defines its
I/O operations - bunch of per-bus/device function pointers which can
be overridden depending on arch, bus and the way peripheral is wired.
--
Eugene
prev parent reply other threads:[~2006-02-02 17:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-02 11:26 Yosemite/440EP why are readl()/ioread32() setuptoreadlittle-endian? Jenkins, Clive
2006-02-02 14:39 ` Matt Porter
2006-02-02 17:16 ` Eugene Surovegin [this message]
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=20060202171646.GD12810@gate.ebshome.net \
--to=ebs@ebshome.net \
--cc=Clive.Jenkins@xerox.com \
--cc=linuxppc-embedded@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).