Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Kaz Kylheku <KKylheku@zeugmasystems.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Interrupt routing issue on BCM1480.
Date: Tue, 18 Nov 2008 22:28:20 +0000	[thread overview]
Message-ID: <20081118222820.GA14689@linux-mips.org> (raw)
In-Reply-To: <DDFD17CC94A9BD49A82147DDF7D545C50144C3F0@exchange.ZeugmaSystems.local>

On Tue, Nov 18, 2008 at 02:00:08PM -0800, Kaz Kylheku wrote:

> Ralf's fixes in arch/mips/pci/pci-bcm1480.c break on our board. Multiple
> devices somehow report the same pin number (or perhaps some invalid pin
> number that is mapped to 1).  The mapping function then assigns IRQ 8 to
> multiple devices.

That's fine.  A simple PCI device that uses an interrupt is supposed to
use INTA that is report a 1 in the interrupt pin register.  After going
through any PCI-to-PCI bridges (if they exist), INTA..INTD eventually
will be wired in a system specific way to the host.  For the BCM91480
that wiring seems to be to simply wire (or "or") all INTA pins together
and connect that signal to the SOC, same for the remaining INTB..INTD.
In practice this means it is expected to see most PCI devices to use
K_BCM1480_INT_PCI_INTA which is 8.  I suppose your system may wire up
things in a different way and CFE knows about that but not pcibios_map_irq().

> The old ``return dev->irq'' in pcibios_map_irq worked fine.
> 
> What was the issue: is it that CFE sets up these IRQ numbers, such that
> they might not correspond to pins?

Linux interrupt number is not necessarily the same as that of any
firmware, so relying on firmware is generally wrong or at least
something only to be done if you know what you do ...

  Ralf

  parent reply	other threads:[~2008-11-18 22:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-18 22:00 Interrupt routing issue on BCM1480 Kaz Kylheku
2008-11-18 22:00 ` Kaz Kylheku
2008-11-18 22:28 ` Ralf Baechle [this message]
2008-11-18 22:47   ` Maciej W. Rozycki

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=20081118222820.GA14689@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=KKylheku@zeugmasystems.com \
    --cc=linux-mips@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