linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Joakim Tjernlund" <joakim.tjernlund@transmode.se>
To: "'Andy Fleming'" <afleming@freescale.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: RE: 83xx: requesting external interrupts
Date: Sat, 30 Jun 2007 16:02:50 +0200	[thread overview]
Message-ID: <004501c7bb1f$58c84a50$0e67a8c0@Jocke> (raw)
In-Reply-To: <1B23F0C1-3BDF-434B-BF90-E75BB4C3994B@freescale.com>

 

> -----Original Message-----
> From: Andy Fleming [mailto:afleming@freescale.com] 
> Sent: den 30 juni 2007 01:55
> To: Joakim Tjernlund
> Cc: bwarren@qstreams.com; linuxppc-embedded@ozlabs.org
> Subject: Re: 83xx: requesting external interrupts
> 
> 
> On Jun 29, 2007, at 06:34, Joakim Tjernlund wrote:
> > mdio@2320 {
> > 			#address-cells = <1>;
> > 			#size-cells = <0>;
> > 			reg = <2320 18>;
> > 			device_type = "mdio";
> > 			compatible = "ucc_geth_phy";
> >
> > 			phy1: ethernet-phy@0 {
> > 				interrupt-parent = <&ipic>;
> > 				interrupts = <12 2>; //EXT IRQ2
> > 				reg = <0>; // 0
> > 				device_type = "ethernet-phy";
> > 				interface = <3>; //ENET_100_MII
> > 			};
> >
> > Now the things is that the IRQ works with and without the
> >  /* All external IRQs + Generic timer IRQs must be initialized by  
> > BSP */
> >  const int bsp_irqs[] = {48, 17, 18, 19, 20, 21, 22, 23, 90, 78,  
> > 84, 72};
> >  for (i=0;i<sizeof(bsp_irqs)/sizeof(bsp_irqs[0]);i++)
> > 	virq = irq_create_mapping(NULL, bsp_irqs[i]);
> 
> 
> This isn't how to use the device tree.  That is, you *aren't* using  
> the device tree.  You want to read the node of every device you want  
> to set up, and create the mapping.  Look at irq_of_parse_and_map().   
> Look in include/asm-powerpc/prom.h, at of_irq_to_resource(), which  
> maps an irq in the device tree.

I use both!
I see that ipic.c does all the work for me, so I should just drop
the above code. It is strange though that the virq # changes if
I keep the code.

hmm, maybe if I sort the bsp_irqs[] list numerically it will be the same?
Am at home ATM so I can't verify.

 Jocke

      reply	other threads:[~2007-06-30 14:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 16:45 83xx: requesting external interrupts Alex Zeffertt
2007-05-10 17:07 ` Ben Warren
     [not found]   ` <46443784.3060600@cambridgebroadband.com>
2007-05-11 14:12     ` Ben Warren
2007-05-11 20:15       ` Kumar Gala
2007-05-11 20:29         ` Ben Warren
2007-05-11 20:37           ` Kumar Gala
2007-06-29 11:34       ` Joakim Tjernlund
2007-06-29 16:43         ` Ben Warren
2007-06-29 23:54         ` Andy Fleming
2007-06-30 14:02           ` Joakim Tjernlund [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='004501c7bb1f$58c84a50$0e67a8c0@Jocke' \
    --to=joakim.tjernlund@transmode.se \
    --cc=afleming@freescale.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).