All of lore.kernel.org
 help / color / mirror / Atom feed
* Interrupt routing issue on BCM1480.
@ 2008-11-18 22:00 ` Kaz Kylheku
  0 siblings, 0 replies; 4+ messages in thread
From: Kaz Kylheku @ 2008-11-18 22:00 UTC (permalink / raw)
  To: linux-mips

Hi guys,

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.

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Interrupt routing issue on BCM1480.
@ 2008-11-18 22:00 ` Kaz Kylheku
  0 siblings, 0 replies; 4+ messages in thread
From: Kaz Kylheku @ 2008-11-18 22:00 UTC (permalink / raw)
  To: linux-mips

Hi guys,

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.

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Interrupt routing issue on BCM1480.
  2008-11-18 22:00 ` Kaz Kylheku
  (?)
@ 2008-11-18 22:28 ` Ralf Baechle
  2008-11-18 22:47   ` Maciej W. Rozycki
  -1 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2008-11-18 22:28 UTC (permalink / raw)
  To: Kaz Kylheku; +Cc: linux-mips

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Interrupt routing issue on BCM1480.
  2008-11-18 22:28 ` Ralf Baechle
@ 2008-11-18 22:47   ` Maciej W. Rozycki
  0 siblings, 0 replies; 4+ messages in thread
From: Maciej W. Rozycki @ 2008-11-18 22:47 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Kaz Kylheku, linux-mips

On Tue, 18 Nov 2008, Ralf Baechle wrote:

> 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.

 Interesting -- swizzling is the usual approach to spread the load.  
Though this platform's software-driven IRQ dispatcher we have is probably 
not smart enough to take advantage of such an arrangement anyway, so 
perhaps they didn't bother to optimise hardware.  The 91250A did use 
swizzling.

  Maciej

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-18 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-11-18 22:47   ` Maciej W. Rozycki

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.