linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Konovalov <akonovalov@ru.mvista.com>
To: "Eckart Göhler" <e.goehler@ifen.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: mv-linux: Problem to implement custom driver interrupt handling
Date: Fri, 10 Feb 2006 22:13:08 +0300	[thread overview]
Message-ID: <43ECE5C4.5090308@ru.mvista.com> (raw)
In-Reply-To: <43ECB078.4080209@ifen.com>

Eckart Göhler wrote:
> 
> Andrei Konovalov wrote:
>  > Hi,
>  >
>  > In the Linux driver you should not access the interrupt controller
>  > directly.
>  > The relevant XIntc_* calls are done by arch/ppc/syslib/xilinx_pic.c 
> code.
>  > E.g. the particular interrupt is unmasked when one calls request_irq().
>  >
>  > Few more comments below.
> 
> 
> Hi,
> 
> Thanks a lot. Actually I inserted the low-level code below after 
> request_irq() did not work. The note about xilinx_pic.c code (that is 
> located in my implementation in arch/ppc/kernel/xilinx_pic.c) lead me to 

Correct. arch/ppc/syslib/xilinx_pic.c is the 2.6 kernel case.

> the problem origin that should be reported here for the community (which 
> I presume already know the very fact):
> The interrupt numbering generated by the EDK is opposite to the one used 
> by linux, i.e. interrupt number 4 reported in EDK-generated 
> xparameters.h/xparameters_ml300.h becomes 31-4 = 27 when using request_irq.

Yes, this is true for 2.4 kernels.

In 2.6 the "natural" irq numbering is used.
I.e. for irq number of 4 (as per xparameters.h) one should pass
to request_irq()
    31-4 = 27 if using 2.4 kernel
and
   4 if using 2.6 kernel.

Thanks,
Andrei

> Therefore the handler was not called because he was attached to the 
> wrong interrupt, and also was not able to reset the interrupt pending 
> flag, that must be done as you noted below.
> 
> cheers
> 
> eckart

      reply	other threads:[~2006-02-10 19:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-06 13:31 mv-linux: Problem to implement custom driver interrupt handling Eckart Göhler
2006-02-06 15:14 ` Andrei Konovalov
2006-02-10 15:25   ` Eckart Göhler
2006-02-10 19:13     ` Andrei Konovalov [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=43ECE5C4.5090308@ru.mvista.com \
    --to=akonovalov@ru.mvista.com \
    --cc=e.goehler@ifen.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).