All of lore.kernel.org
 help / color / mirror / Atom feed
* ioremap() and CONFIG_SWAP_IO_SPACE
@ 2004-08-25  9:30 Thomas Koeller
  2004-08-25  9:32 ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Koeller @ 2004-08-25  9:30 UTC (permalink / raw)
  To: linux-mips

Hi,

my platform (PMC-Sierra Yosemite in big endian mode),
like many others, uses ioremap() to map device
registers, such as the RM9000's OCD registers.
To access those registers, the return value of
ioremap() is casted to a suitable pointer type and
dereferenced. This of course works, but the return
value of ioremap() is documented not to be a
directly dereferenceable pointer value, and accesses
to ioremapped addresses should be performed using
the readx/writex APIs.

I therefore decided to straighten this out and use those
APIs throughout, but that did not work. The platform
defines 'CONFIG_SWAP_IO_SPACE=y', which causes all
accesses through readx/writex to be byte-swapped. That
is not really appropriate, as the registers are in big
endian order. I therefore tried to change that setting
in yosemite_defconfig, only to find that every time
I do 'make oldconfig' it returns to its original
value of 'y'.

So here are my questions:

1. Am I right to conclude that the platform configuration
   should not set CONFIG_SWAP_IO_SPACE, or am I missing
   something?

2. What is the mechanism that causes that setting to
   always revert to enabled when doing 'make oldconfig'?
   How do I avoid that?

thanks,
Thomas
-- 
--------------------------------------------------

Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-20  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-25  9:30 ioremap() and CONFIG_SWAP_IO_SPACE Thomas Koeller
2004-08-25  9:32 ` Geert Uytterhoeven
2004-10-19 10:45   ` Thomas Koeller
2004-10-19 18:31     ` Ralf Baechle
2004-10-20  8:47       ` Thomas Koeller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.