Re: [PATCH 3/4] Fix remaining big endian issue of hfcmulti

From: Benjamin Herrenschmidt
Date: Tue Aug 05 2008 - 17:44:52 EST


On Tue, 2008-08-05 at 19:25 +0200, Karsten Keil wrote:
> Yes this stuff looks really cool, but unfortunately in our case it is not
> so easy to remove the different IO functions for MMIO and PIO, since for
> MMIO the chip use a flat register model, for PIO it use indirect addressing
> via only 2 ports, one for the register offset and one for the data IO.
>
> Maybe we can use the trick from lib/iomap.c to detect which
> kind of IO is needed, but unfortunately PIO_OFFSET, PIO_MASK and
> PIO_RESERVED are not exported so it would need to copy the defines, which
> isn't a really clean solution.

Don't use a trick like that. Not all archs use lib/iomap.c and those who
don't have their own implementation using a different way of
differenciating them.

In any case, that's fine, you can still keep track of whether you
initially mapped things IO or MEM and use different access methods
without having to use different accessors.

Cheers,
Ben.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/