linux-mips
[Top] [All Lists]

Re: Reason for PIO_MASK?

To: Manuel Lauss <manuel.lauss@googlemail.com>
Subject: Re: Reason for PIO_MASK?
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 6 Oct 2009 13:52:20 +0200
Cc: Linux-MIPS <linux-mips@linux-mips.org>
In-reply-to: <f861ec6f0910030748l396b45bck858f15460354e58e@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <f861ec6f0910030748l396b45bck858f15460354e58e@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.19 (2009-01-05)
On Sat, Oct 03, 2009 at 04:48:12PM +0200, Manuel Lauss wrote:

> In arch/mips/lib/iomap.c  there's this "#define PIO_MASK 0x0ffff"
> which limits the ability to successfully call ioport_map() to the
> first 64kB.  This causes pata_pcmcia to error out on CF card
> probe because devm_ioport_map() is called with the remapped
> PCMCIA IO area, which is somewhere in MAP_BASE space.

Remapped, so that then actually be a physical address?  That'd be wrong.

> I've temporarily removed the PIO_MASK check and pata_pcmcia
> works as expected. Is there any way around this, other than
> creating an Alchemy-specific ioport_map() function?

The provocative question - why would you want to have more than 64k I/O port
space?

I/O ports are x86 legacy and deprecated.  PCI limits allocations to at
most 256 bytes and I don't know of any devices that even come close to
that.

When I wrote ioport_map I reviwed all uses of ioport addresses > 64k and
found each of them to be buggy ...

  Ralf

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