From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by ozlabs.org (Postfix) with ESMTP id 80029DDE2A for ; Wed, 19 Sep 2007 17:16:49 +1000 (EST) Received: by mu-out-0910.google.com with SMTP id w1so139879mue for ; Wed, 19 Sep 2007 00:16:48 -0700 (PDT) Date: Wed, 19 Sep 2007 09:16:43 +0200 To: linuxppc-dev@ozlabs.org Subject: Re: [NEWBIE] Interrupt-problem mpc5200 Message-ID: <20070919071643.GE5682@sfrouter> References: <20070906133050.GE11807@sfrouter> <20070911124154.GI11807@sfrouter> <20070911182811.GA3582@sfrouter> <20070912183038.GA5682@sfrouter> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AH+kv8CCoFf6qPuz" In-Reply-To: From: "S. Fricke" Reply-To: "S. Fricke" List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --AH+kv8CCoFf6qPuz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, > > Can u give me an example with a single IRQ of a configuration-node for a > > dts? >=20 > myreallycooldevice@0 { > interrupts =3D <1 2 3>; > interrupt-parent =3D <&mpc5200_pic>; > }; Ahh - oh weh - so simple! Thank you! > The interrupts property matches the size of the #interrupt-cells > property in the interrupt controller node. For the 5200-intc, each > interrupt is described by 3 cells; l1, l2 and sense which is a > reflection of the interrupt controller architecture. For IRQ0, l1=3D0, > l2=3D0; IRQ1, l1=3D1, l2=3D1; IRQ2, l1=3D1 and l2=3D2; IRQ3, l1=3D1, l2= =3D3 Sense is > described in mpc52xx-device-tree-bindings.txt OK, my dts is now: / { /* ... */ soc5200@f0000000 { /* ... */ intpin@0 { interrupt-parent =3D <500>; interrupts =3D <1 2 2>; }; /* ... */ }; /* ... */ }; And the corresponding code is: struct intmod_priv { /** Interrupt-Number */ int own_irq; /** The of-device-node */ struct device_node *intmod_dev_node; }; static int __init mod_init( void ) { // ... priv.intmod_dev_node =3D NULL; priv.intmod_dev_node =3D of_find_node_by_name(NULL, "intpin"); priv.own_irq =3D irq_of_parse_and_map(priv.intmod_dev_node, 0); request_irq(priv.own_irq, intmod_isr, IRQF_DISABLED , "intmod", INTMOD_= IRQ_BOARD); // ... Thank you and bye, my next question is following :-) Silvio Fricke --=20 -- S. Fricke ----------------------------- MAILTO:silvio.fricke@gmail.com -- Diplom-Informatiker (FH) Linux-Entwicklung ---------------------------------------------------------------------------- --AH+kv8CCoFf6qPuz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFG8Mzb8WEBxatmn40RApMyAKCw8WbTUAJz2vpV2B0xApANmNzUfACfZd16 +5xsTF1qKP9faB1VOgtkgEw= =J1WD -----END PGP SIGNATURE----- --AH+kv8CCoFf6qPuz--