All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Palmer <me@danielpalmer.co.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: PATA_ARTOP reads byte from PCI IO port without mapping it to the right address.
Date: Wed, 30 Mar 2011 21:24:31 +0100	[thread overview]
Message-ID: <4D93917F.6090309@danielpalmer.co.uk> (raw)
In-Reply-To: <201103302200.47052.arnd@arndb.de>


> Is this an ARM machine? The platform specific mach/io.h header

Sorry, I should have mentioned it more explicitly.
The machine is an SH4 based (The processor model is SH7751R, board is 
landisk.. in /arch/sh/include/mach-landisk/).

> You have to ioremap() the physical address 0xfe240000 to a virtual
> address, and then add the base address to the number inside of the
> __io macro, e.g.
>
>
>    
-- snip --

Ok, that makes a lot of sense.  This is the first time I've ever touched 
PCI.
I've looked around and I can't right now see where that matches up with 
the SH/board specific code but I'll have a better look later.

We've been trying to work this out for a few days.. we were fudging the 
io port base address in arch/sh/kernel/ioport.c to the start of the PCI 
space. But we didn't think that was the right thing to be doing.
We have another board with the same processor and e100 NIC that uses the 
same mapping to 0x1400 and uses io ports but worked fine. So we guessed 
it was pata_artops use of inb() .. the person that did a lot of changes 
to this board's code recently also wrote that he thought it was 
pata_artops fault when I asked on the linux-sh list.



  reply	other threads:[~2011-03-30 20:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30 19:09 PATA_ARTOP reads byte from PCI IO port without mapping it to the right address Daniel Palmer
2011-03-30 19:26 ` Alan Cox
2011-03-30 19:36   ` Linus Torvalds
2011-03-30 19:48   ` Daniel Palmer
2011-03-30 20:00     ` Arnd Bergmann
2011-03-30 20:24       ` Daniel Palmer [this message]
2011-03-30 20:37         ` Arnd Bergmann
2011-03-30 20:24     ` Alan Cox

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=4D93917F.6090309@danielpalmer.co.uk \
    --to=me@danielpalmer.co.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arnd@arndb.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.