Getting rid of static IO mapping

Dan Malek dan at embeddededge.com
Thu Jul 8 06:49:08 EST 2004


On Jul 7, 2004, at 1:07 PM, Sylvain Munaut wrote:

> I'll try to re-explain my problem more clearly. Maybe some one will
> see a solution.

I think you are trying too hard to solve something that really
isn't a problem.

The use of BATs is a significant performance advantage.  It's
relatively easy to create an ioremap() function that can see if
a BAT covers a space we want and return an appropriate
mapped address.  The converse, creating an ioremap() function
that is smart enough to track all of the I/O usage and determine
how best to use BATs, is very challenging.

Due to the way we have to access memory and devices for
initialization (when vm mapping through ioremap() isn't available)
and the constraints on the kernel VM space, I find it easy to
just declare the BAT values and let ioremap() work as it does in 2.4.

If you look outside of the traditional PowerPC cores (to things
like 8xx, 4xx, and 85xx) you will find even more challenging
early or efficient mapping problems.

Just set the BATs according to the board configurations, keep
the functions simple, and move on.  These functions are
currently working fine for many of the 603 core platforms.  I'd
suggest changing your board setup functions to work with
the common code already present instead of trying to fix
something that isn't broken.

Thanks.

	-- Dan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list