From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Desfarges Subject: Re: Interruption on PCI Bus Date: Fri, 17 Apr 2009 10:24:25 +0200 Message-ID: <49E83CB9.8070607@fr.thalesgroup.com> References: <49E6E542.5090504@fr.thalesgroup.com> <49E6F14A.9010800@firmworks.com> <49E74AC0.4000508@fr.thalesgroup.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org To: Grant Likely Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org List-Id: devicetree@vger.kernel.org Grant Likely a =E9crit : > On Thu, Apr 16, 2009 at 9:12 AM, Simon Desfarges > wrote: >> >> Grant Likely a =E9crit : >>> On Thu, Apr 16, 2009 at 2:50 AM, Mitch Bradley wrot= e: >>>> Sorry for being so vague. As the person who originally devised this >>>> interrupt tree stuff, I'm pretty sure about the intention, but much le= ss >>>> sure about what specific versions of Linux and U-Boot actually do. >>>> Hopefully someone else can give you a definitive answer about that. >>> U-Boot doesn't really do anything with interrupts. It usually just >>> polls everything. >>> >>> Linux arch/powerpc does walk the device tree to get irq routing and >>> resolve to a Linux-internal virtual IRQ number. I'm pretty sure that >>> the IRQ registers are normally ignored unless something goes wrong >>> with parsing the tree. See arch/powerpc/kernel/pci-common.c and >>> search for of_irq_map_pci(). >>> >>> g. >>> >> OK, thank you very much for your answers, you are very helpful for a new= bie >> like me. >> >> So, if I understood well, of_irq_map_pci() maps the IRQs by reading the >> device tree and doesn't use the irq_line register (if there is nothing >> wrong) of the PCI device and doesn't initialize it. My problem is PCI de= vice >> drivers are using this field (I have read this in the ldd book). I think= I >> have missed something because it seems to work well like this. > = > LDDv3 is several years old now and tends to be x86 centric. It is > unlikely that PCI device drivers are reading the IRQ registers > directly (instead of using the PCI API), and if they are it is > probably a bug. If you see code that does otherwise, then please let > me know. > = > g. > = I continue my investigations, it could be a little bit long because I'm = waiting for a new board... Thank you very much, Simon Desfarges