From: "sylvain louchez" <sylvain.louchez@gmail.com>
To: <linuxppc-dev@ozlabs.org>
Subject: using IRQ1 in mpc5121ads
Date: Mon, 30 Mar 2009 10:33:11 -0400 [thread overview]
Message-ID: <49d0d82a.09038e0a.585d.348b@mx.google.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1649 bytes --]
Hello, I'm a newbie looking for where the documentation and implementation
model can be found.
My custom driver is looking for an interrupt notification from the kernel -
and it registers in the /proc/interrupts file as expected when installed,
i.e.
$insmod custom_driver.ko gps_irq=<n>
**Note - this part's OK, I see the instance in /proc/interrupts after I load
it**
On the hardware side the actual signal is a 1 Hz pulse (from GPS) routed to
IRQ1 through the board's CPLD. This is the only interrupt on IRQ_1 so we can
keep the logic simple i.e. on IRQ1 we can just jump to the service routine
in a custom driver.
I understand 2 things have to be done:
1. create an entry in the dts file; I think we've got this understood
through advice already received - for example the new interrupt entry can be
created in the dts file - something like:
gps@0 { // there is no address so just make it 0
compatible = "gps_interrupt";
interrupts = <17 0x8>; // 17 is irq1, 8 is level low, see
include/linux/irq.h for others
interrupt-parent = < &ipic >;
};
2. but now we need to relate the actual interrupt to the virtual interrupt
called in the driver... by invoking the function irq_of_parse_and_map - but
we don't know how to do it - nor have we found how to do it in browsing
through the open source documentation
A secondary question: where to properly add this function call in the file
system?
Are we on the right track here? Is there sample/ tutorial code you could
point us to?
Thanks in advance for any pointers - documentation on these mechanisms,
sample code.
Sylvain Louchez
[-- Attachment #2: Type: text/html, Size: 6213 bytes --]
next reply other threads:[~2009-03-30 14:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-30 14:33 sylvain louchez [this message]
2009-03-30 16:42 ` using IRQ1 in mpc5121ads Grant Likely
2009-03-31 23:10 ` David Gibson
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=49d0d82a.09038e0a.585d.348b@mx.google.com \
--to=sylvain.louchez@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=sylvain.louchez@g4apps.com \
/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).