From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7Fl0-0002mG-R3 for qemu-devel@nongnu.org; Mon, 01 Dec 2008 15:52:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7Fkx-0002kf-Ti for qemu-devel@nongnu.org; Mon, 01 Dec 2008 15:52:37 -0500 Received: from [199.232.76.173] (port=44147 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7Fkx-0002kZ-Iu for qemu-devel@nongnu.org; Mon, 01 Dec 2008 15:52:35 -0500 Received: from mail-gx0-f17.google.com ([209.85.217.17]:63621) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L7Fkw-00061l-NH for qemu-devel@nongnu.org; Mon, 01 Dec 2008 15:52:34 -0500 Received: by gxk10 with SMTP id 10so3140597gxk.10 for ; Mon, 01 Dec 2008 12:52:32 -0800 (PST) Message-ID: Date: Mon, 1 Dec 2008 22:51:15 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH] IBM PowerPC 4xx 32-bit PCI controller emulation In-Reply-To: <1228161569.14874.55.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1227727332-17939-1-git-send-email-hollisb@us.ibm.com> <1228161569.14874.55.camel@localhost.localdomain> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hollis Blanchard Cc: qemu-devel@nongnu.org On 12/1/08, Hollis Blanchard wrote: > On Mon, 2008-12-01 at 20:15 +0200, Blue Swirl wrote: > > > > > > + /* Board IRQs 2-5 are connected to UIC IRQs 28-25 */ > > > + /* XXX Needs some abstracting for boards other than Bamboo. */ > > > + qemu_set_irq(pic[30-irq_num], level); > > > +} > > > > The IRQs should be set up at the board level and then passed to the > > device. > > > As far as I can see, this isn't going to work. The functions that need > access to this information are the driver's map_irq() and set_irq(), and > neither of these callbacks is provided a pointer to the driver-specific > structure where I could store the board irqs. > > Can you elaborate on your idea, or point me to existing code that > implements it? The board creates four IRQs which it passes to the device. These are not directly connected to PIC. Instead the request function of the IRQ (defined in the board file) raises whatever PIC IRQs the board wants.