linux-mips
[Top] [All Lists]

Re: MIPS ioport_map and Au1xxx PCMCIA

To: Manuel Lauss <mano@roarinelk.homelinux.net>
Subject: Re: MIPS ioport_map and Au1xxx PCMCIA
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Thu, 26 Apr 2007 16:55:25 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <20070426093515.GA26434@roarinelk.homelinux.net>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070426093515.GA26434@roarinelk.homelinux.net>
Sender: linux-mips-bounce@linux-mips.org
On Thu, 26 Apr 2007 11:35:15 +0200
Manuel Lauss <mano@roarinelk.homelinux.net> wrote:

> Hello,
> 
> 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

        pci_iomap(some bar);
        iowrite(blah);
        pci_iounmap(blah)

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.

Alan

<Prev in Thread] Current Thread [Next in Thread>