linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: mtwallet <mike_timmons@trimble.com>
To: linuxppc-embedded@ozlabs.org
Subject: Re: mpc5200 arch=powerpc kernel=2.6.24: how do I request external IRQ0-3?
Date: Sat, 26 Apr 2008 18:58:50 -0700 (PDT)	[thread overview]
Message-ID: <16918127.post@talk.nabble.com> (raw)
In-Reply-To: <161B3BAD77161449A144FF054231C3D60206D6DC@uss-am-xch-01.am.trimblecorp.net>


I got something working. I created a "device" child in the DTS file and used
th platform driver subsystem to register my module and get the virtual IRQ
as derived from the interrupt triplet-style spec in the dts file.

I'm still not real content as my child is nested with the SOC peripherals,
but this is more of a style/readability hang-up for me, for now. At least
now I can get the virtual irq by registering a platform driver, requesting
the irq number, and successfully requesting the irq.

I welcome any advice if I have used the dts file in an unintended fashion,
but it feels like the right place to specify a "device", even if all the
device embodies is an IRQ. Newbie conceptual difficulty overcome.



mtwallet wrote:
> 
> I am confused on a very simple subject: requesting an external IRQ from
> a custom driver I'm writing  for a lite5200b-based board running kernel
> 2.6.24, arch=powerpc. 
> 
>  
> 
> With the old arch=ppc I saw reference to MPC52xx_IRQ3 and such. I don't
> see reference to specific IRQs under the powerpc arch. I am starting to
> better understand the dts scheme for peripheral interrupts, but I am
> hung-up on the seemingly simple task of requesting an external IRQ and
> registering a callback from my driver:
> 
>  
> 
> request_irq(  virtual_irq_number_for_IRQ3_that_I_don't_know_right_now,
> &my_callback, flags, name, dev)
> 
>  
> 
> For this to work do I need to create a child node in the dts that
> specifies interrupts = <1 3 2> for IRQ3?  Must the IRQ I'm requesting be
> associated with the dev argument to request_irq via the dts?
> 
>  
> 
> I just think I'm missing something very obvious as regards using
> IRQ[0-3] on the mpc52xx. The DTS makes sens to me for peripheral
> interrupts getting associated with their respective peripherals, but
> when I want any old driver to use IRQ0-3 How do I request it?
> 
>  
> 
> Thanks.
> 
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 

-- 
View this message in context: http://www.nabble.com/mpc5200-arch%3Dpowerpc-kernel%3D2.6.24%3A-how-do-I-request-external-IRQ0-3--tp16900805p16918127.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

  reply	other threads:[~2008-04-27  1:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-25 16:14 mpc5200 arch=powerpc kernel=2.6.24: how do I request external IRQ0-3? Mike Timmons
2008-04-27  1:58 ` mtwallet [this message]
2008-04-27  5:01   ` Grant Likely

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=16918127.post@talk.nabble.com \
    --to=mike_timmons@trimble.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).