Re: Yosemite/440EP why are readl()/ioread32() setuptoreadlittle-endian?
From: Eugene Surovegin <hidden>
Date: 2006-02-02 17:16:49
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 circumstancesHuh? 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