Re: Problem with OF interrupt parsing code

2007-10-02 Thread Gerhard Pircher
Original-Nachricht Datum: Tue, 02 Oct 2007 07:39:47 +1000 Von: Benjamin Herrenschmidt [EMAIL PROTECTED] An: Gerhard Pircher [EMAIL PROTECTED] CC: linuxppc-dev@ozlabs.org Betreff: Re: Problem with OF interrupt parsing code Part of your problem is that interrupt-parent

Re: Problem with OF interrupt parsing code

2007-10-02 Thread Gerhard Pircher
Original-Nachricht Datum: Tue, 02 Oct 2007 08:54:04 +1000 Von: Benjamin Herrenschmidt [EMAIL PROTECTED] An: Segher Boessenkool [EMAIL PROTECTED] CC: Gerhard Pircher [EMAIL PROTECTED], linuxppc-dev@ozlabs.org Betreff: Re: Problem with OF interrupt parsing code It shoudn't

Re: Problem with OF interrupt parsing code

2007-10-02 Thread Gerhard Pircher
Original-Nachricht Datum: Mon, 01 Oct 2007 16:26:14 -0500 Von: Scott Wood [EMAIL PROTECTED] An: Gerhard Pircher [EMAIL PROTECTED] CC: linuxppc-dev@ozlabs.org Betreff: Re: Problem with OF interrupt parsing code Secondly the AmigaOne is a desktop system with 4 PCI/AGP

Re: Problem with OF interrupt parsing code

2007-10-02 Thread Benjamin Herrenschmidt
On Tue, 2007-10-02 at 14:38 +0200, Gerhard Pircher wrote: I know that it's ugly, but the problem is how to distinguish the boards. The only real difference I know of is the PCI interrupt mapping. The northbridges chip revision for example is always the same, but CPU type, amount of memory

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Benjamin Herrenschmidt
On Mon, 2007-10-01 at 23:00 +0200, Gerhard Pircher wrote: Hi, I think I found an issue in the OF interrupt parsing code, although I have to admit that my device tree source doesn't really follow the specification. First some information about my target setup. I didn't specify an

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Scott Wood
Scott Wood wrote: The problem occurs now, if there is no device node defined for another PCI device. In this case, of_irq_map_pci() checks for an interrupt pin, searches again for the host bridge node and calls of_irq_map_raw() with the device node of the host bridge. The function finds the

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Benjamin Herrenschmidt
On Mon, 2007-10-01 at 23:11 +0200, Gerhard Pircher wrote: [EMAIL PROTECTED] { device_type = pci; compatible = mai-logic,articia-s; bus-frequency = 01fca055; // 33.3MHz bus-range = 0 ff;

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Benjamin Herrenschmidt
On Mon, 2007-10-01 at 16:37 -0500, Scott Wood wrote: Scott Wood wrote: The problem occurs now, if there is no device node defined for another PCI device. In this case, of_irq_map_pci() checks for an interrupt pin, searches again for the host bridge node and calls of_irq_map_raw() with

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Benjamin Herrenschmidt
On Mon, 2007-10-01 at 16:48 -0500, Scott Wood wrote: Benjamin Herrenschmidt wrote: On Mon, 2007-10-01 at 16:37 -0500, Scott Wood wrote: Scott Wood wrote: Actually, it doesn't -- it should stop when it sees the interrupt-controller property in the i8259 node, at which point it'll be

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Segher Boessenkool
i8259: [EMAIL PROTECTED] { device_type = interrupt-controller; compatible = pnpPNP,000; interrupt-controller; reg = 0001 0020 0002

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Benjamin Herrenschmidt
On Tue, 2007-10-02 at 00:33 +0200, Segher Boessenkool wrote: i8259: [EMAIL PROTECTED] { device_type = interrupt-controller; compatible = pnpPNP,000; interrupt-controller;

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Benjamin Herrenschmidt
On Tue, 2007-10-02 at 08:54 +1000, Benjamin Herrenschmidt wrote: It shoudn't normally happen. The reason it -does- happen in fact is that the above node is also missing the #interrupt-cells property, which cause the parent-lookup routine to skip it before it gets a chance to see that there's

Re: Problem with OF interrupt parsing code

2007-10-01 Thread Segher Boessenkool
This is an interrupt controller (it has an interrupt-controller property, and it has no interrupt parent (there is no interrupt-parent property, for interrupt controllers you do not follow the normal tree parent), so it is the root interrupt controller and there is no loop. It seems from