[PATCH 2/2] POWERPC: Remove global CPM mappings

Dan Malek dan at embeddedalley.com
Tue Apr 24 11:26:59 EST 2007

On Apr 23, 2007, at 6:39 PM, Vitaly Bordug wrote:

> Gets rid or direct IMMR accesses/dereferences for PQ SoC targets and
> relevant drivers.

Can we find a way to do this without the constant
ioremapping and unmapping?  It's a quick and
dirty hack, but it would be nice if we could map once
during an initialization, keep the pointer around
and at least use it within the file context.  I know it
doesn't cost much, but all of these cycles add up,
and someday ioremap could grow into something
more complex.  Please?

The whole of the CPM supporting functions need this,
it could be mapped once and shared at least among
them.  Any drivers that use the IMMR should also be
cleaner about managing this space as they would
any other mapped resource that is typically done
only once for the life of the driver.

There are also many different methods used that
I don't understand the reason.  Sometimes the
mappings are hidden in macros, sometimes done
in a function that is called, other times ioremap()
is called explicitly.  It just looks, well....  icky.  :-)


	-- Dan

More information about the Linuxppc-dev mailing list