Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Manuel Lauss <manuel.lauss@googlemail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Subject: Re: Reason for PIO_MASK?
Date: Tue, 6 Oct 2009 14:11:15 +0200	[thread overview]
Message-ID: <f861ec6f0910060511t3e95a089h63dc33e628349c11@mail.gmail.com> (raw)
In-Reply-To: <20091006115220.GC25263@linux-mips.org>

On Tue, Oct 6, 2009 at 1:52 PM, Ralf Baechle <ralf@linux-mips.org> wrote:
> 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 meant the result of ioremap() of the 36bit address of PCMCIA IO space:
so the ioport base is somewhere at 0xc0000000, which pata_pcmcia
tries to devm_iomap(), and this is rejected by the above mentioned file.

The old ide-cs.c driver takes the given IO base as-is (without trying to
do funky things to it) and just works. (i.e. there are 2 entries in the
0xc0000000-range per cf-card in /proc/ioports)


>> 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* don't want more; I want a smarter pata_pcmcia driver ;-)  I'll go bug other
people about this.  I brought this up here because one of my SH boards has
similar needs (need to do an ioremap() with special TLB flags to get access to
pcmcia IO space) but pata_pcmcia does work there (because SH kernel
either asks the board to translate an x86-IO port to memory address or
simply returns the port plus an offset).

Thanks!
        Manuel Lauss

  reply	other threads:[~2009-10-06 12:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-03 14:48 Reason for PIO_MASK? Manuel Lauss
2009-10-06 11:52 ` Ralf Baechle
2009-10-06 12:11   ` Manuel Lauss [this message]
2009-10-06 14:25     ` Ralf Baechle
2009-10-06 14:59       ` Manuel Lauss
2009-10-07 15:49         ` Sergei Shtylyov
2009-10-07 16:07           ` Manuel Lauss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f861ec6f0910060511t3e95a089h63dc33e628349c11@mail.gmail.com \
    --to=manuel.lauss@googlemail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox