[Top] [All Lists]

[PATCH] MIPS: remove port limit in ioport_map

To: Linux-MIPS <>
Subject: [PATCH] MIPS: remove port limit in ioport_map
From: Manuel Lauss <>
Date: Fri, 4 Nov 2011 15:49:51 +0100
Cc: Manuel Lauss <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=tSHxkvcokvPkUa+VFZrzyARcYxZxfixYLpDo6J80P6E=; b=NAxDIlbQMt9qJ1dhPAQbaM3MhaMubUaJ3+/i3+/AcNYG9UDwWJdPudwQXrk0p6N/21 rwrmqw8gL1nVSEf3JPyGtPJNwQaAw+EfSa3kr/IxHTgAw/o++mURz5wi0XKmHTyTqVct iMYu59auN/+TgtWY31Xv7hiDuoMhjUnXwE/js=
Alchemy PCMCIA IO lies outside the 32bit address space and needs to
be ioremapped to be accessible.  The resulting address is
then fed as IO-port base to all PCMCIA client drivers attached
to a particular socket.  pata_pcmcia does devm_ioport_map() on
the port address, which returns errors because MIPS' ioport_map()
implementation rejects incoming port addresses which are not
within the 0..64k window.  Other embedded architectures don't
bother with a check like this;  this patch brings MIPS in line
and in turn makes pata_pcmcia work on all my Alchemy systems
(and doesn't break PCI).

Signed-off-by: Manuel Lauss <>
 arch/mips/lib/iomap.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/arch/mips/lib/iomap.c b/arch/mips/lib/iomap.c
index e3acb2d..5139fa6 100644
--- a/arch/mips/lib/iomap.c
+++ b/arch/mips/lib/iomap.c
@@ -210,9 +210,6 @@ static void __iomem *ioport_map_legacy(unsigned long port, 
unsigned int nr)
 void __iomem *ioport_map(unsigned long port, unsigned int nr)
-       if (port > PIO_MASK)
-               return NULL;
        return ioport_map_legacy(port, nr);

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