public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [BUG] cannot access IO ports in CMI8738 sound chip.
Date: Mon, 21 Jan 2008 08:35:08 +0000	[thread overview]
Message-ID: <20080121083508.GA20265@linux-sh.org> (raw)
In-Reply-To: <20080121.152550.68560038.matsu@igel.co.jp>

On Mon, Jan 21, 2008 at 05:04:20PM +0900, Katsuya MATSUBARA wrote:
> > On Mon, Jan 21, 2008 at 04:39:04PM +0900, Katsuya MATSUBARA wrote:
> > > > On Mon, Jan 21, 2008 at 03:25:50PM +0900, Katsuya MATSUBARA wrote:
> > > > >  Unfortunately CMI8738 cannot treat (large) memory addresses
> > > > >  as IO port numers because some upper bits of 'Base Address
> > > > >  Register 0' in the PCI configuration space cannot be updated.
> > > > >  (pcibios_setup_bars() in arch/sh/drivers/pci/pci-auto.c
> > > > >  updates the register with the memory address.)
> > > > >  
> > > > >  How should I fix the problem?
> > > > 
> > > > Disable PCI_AUTO_UPDATE_RESOURCES like the dreamcast does?
> > > 
> > >  I did it.
> > >  Any PCI devices, include an ethernet, cannot be accessed
> > >  if PCI_AUTO_UPDATE_RESOURCES is disabled.
> > >  
> > And with pci-auto disabled?
> 
>  Yes, I did. I got the same failure even if PCI_AUTO was disabled.

The driver itself looks a bit questionable. There's a
pci_resource_start() for that BAR that assigns it to ->iobase and then
uses that for direct I/O without a remap. Whether this BAR is an I/O or
MEM bar, the remap is still necessary. So this does need to go through
something like pci_iomap() regardless.

If you need to do special handling for your pci_iomap() implementation,
that's perfectly acceptable, and a number of platforms do something like
that already. We definitely don't want to overload the I/O routines to
work around driver incompetence, though. Please fix the driver.

  parent reply	other threads:[~2008-01-21  8:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21  6:25 [BUG] cannot access IO ports in CMI8738 sound chip Katsuya MATSUBARA
2008-01-21  6:41 ` Paul Mundt
2008-01-21  7:39 ` Katsuya MATSUBARA
2008-01-21  7:52 ` Paul Mundt
2008-01-21  8:04 ` Katsuya MATSUBARA
2008-01-21  8:35 ` Paul Mundt [this message]
2008-01-21  9:18 ` Katsuya MATSUBARA
2008-01-21  9:37 ` Paul Mundt
2008-01-30  5:27 ` Katsuya MATSUBARA

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=20080121083508.GA20265@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox