On Thu, 26 Apr 2007 11:35:15 +0200
Manuel Lauss <email@example.com> wrote:
> the file arch/mips/lib/iomap.c contains this define
> #define PIO_MASK 0x0ffffUL
> which prevents pata_pcmcia with the new devres stuff
> from attaching to a CF card. (on my Au1200).
> The ports-to-be-iomap()'ed are in the 0xc0000000 range
> and the ioport_map() function rejects all attempts
> of pata_pcmcia to devm_ioport_map() them.
> What is this mask used for and can it be removed?
iomap uses PIO_MASK to idenfiy ports within the I/O space range. The mips
code looks somewhat incomplete in the base kernel which is probably much
of the problem.
The basic idea is that ioread/iowrite and friends work generically
regardless of MMIO v PIO so you can just do
and not worry about anything.
Now if your platform doesn't have seperate IO space you could probably
implement iowrite/ioremap/ioport_map to be pretty much no-ops depending
upon how your PCI bars are encoded.