linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Baojun Wang <wangbj.ml@gmail.com>
To: linuxppc-dev@ozlabs.org
Subject: Configure CPM2 PORTC pin (PC9) for external interrupt?
Date: Fri, 14 Aug 2009 22:27:39 +0800	[thread overview]
Message-ID: <17dc9c530908140727l6423bebawaed8808f195d4d20@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 922 bytes --]

hi, list:

  I need to configure CPM2 PORTC pin (PC9) for external interrupt, when I
read the MPC8555ERM.pdf and cpm2-pic.c, I find that PC9 interrupt number is
56, and I request the IRQ in this way:

  hw_irq = 56;
  virq = irq_create_mapping(cpm2_host, hw_irq);

  reqeust_irq(virq, ...);

  I can request the irq successfully, but the interrupt is never generated
(ISR is not called) to the PC9 pins, even though the hardware said an
interrupt was raised. (the hardware have a register with a special bit)

  Should I configure the cpm2 io port first to allow PORTC interrupt? I have
read the cpm2 io port documentation, and I initialize the PC9 as:

  PPARC[pc9_bit] = 0;    /* for general purpose IO, not dedicated */
  PSORC[pc9_bit] = 0;    /* no special option */
  PDIRC[pc9_bit] = 0;     /* for both input/output */

  Am I missing some thing? Any suggestion will be greatly appreciated.

  Best Regards,
- Wang

[-- Attachment #2: Type: text/html, Size: 995 bytes --]

             reply	other threads:[~2009-08-14 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-14 14:27 Baojun Wang [this message]
2009-08-14 22:39 ` Configure CPM2 PORTC pin (PC9) for external interrupt? Guillaume Knispel
2009-08-15  4:32   ` Baojun Wang

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=17dc9c530908140727l6423bebawaed8808f195d4d20@mail.gmail.com \
    --to=wangbj.ml@gmail.com \
    --cc=linuxppc-dev@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).