* using cpm interrupts on 8xx
@ 2002-05-22 14:58 Nate Pletcher
2002-05-23 3:20 ` Dan Malek
0 siblings, 1 reply; 4+ messages in thread
From: Nate Pletcher @ 2002-05-22 14:58 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I'm trying to use IDMA CPM interrupts on custom MPC855t hardware similar
to an Embedded Planet CLLF or RPX Lite board. We're using MontaVista's
Hard Hat Linux CDK 1.2 with the 2.2.14 kernel and included tools.
I'm writing a kernel module to control an onboard FPGA that must DMA
data. I've read through the kernel source in arch/ppc/kernel/irq.c and
arch/ppc/8xx_io/commproc.c and searched the linuxppc-embedded archives,
but I'm still not clear on how to use request_8xxirq() and
cpm_install_handler(). Do I need to register a handler for the SIU
interrupt for the CPM and then another handler for the individual IDMA
interrupt from the CPM? Perhaps someone could point me to some
documentation on how to register a CPM interrupt handler.
The interrupt hardware on the 8xx is multilevel (CPM interrupts
multiplexed into SIU) so it seems that both functions would be
necessary. I have read all the MPC8xx documentation on the interrupt
hardware so I'm familiar with the structure, but I'm unsure how PPC
Linux is setup to handle this. What do I need to do myself and what is
provided by the request_/free_irq interface?
This is my first Linux device driver so any help on registering
interrupt handlers on PPC 8xx would be appreciated.
Thanks,
Nate
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using cpm interrupts on 8xx
2002-05-22 14:58 using cpm interrupts on 8xx Nate Pletcher
@ 2002-05-23 3:20 ` Dan Malek
0 siblings, 0 replies; 4+ messages in thread
From: Dan Malek @ 2002-05-23 3:20 UTC (permalink / raw)
To: Nate Pletcher; +Cc: linuxppc-embedded
Nate Pletcher wrote:
> ... Do I need to register a handler for the SIU
> interrupt for the CPM and then another handler for the individual IDMA
> interrupt from the CPM?
All you need to do is use cpm_install_handler() for the IDMA interrupt.
> The interrupt hardware on the 8xx is multilevel (CPM interrupts
> multiplexed into SIU) so it seems that both functions would be
> necessary.
The cpm initialization installs the SIU interrupt handler, so don't
worry about that one.
> .... What do I need to do myself and what is
> provided by the request_/free_irq interface?
For your IDMA device all you need to do is cpm_install_handler()/cpm_free_handler().
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using cpm interrupts on 8xx
[not found] <20020522162110.447DF1196F@denx.denx.de>
@ 2002-05-23 19:01 ` Nate Pletcher
2002-05-23 19:09 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Nate Pletcher @ 2002-05-23 19:01 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: linuxppc-embedded
On Wed, 2002-05-22 at 12:21, Wolfgang Denk wrote:
> > interrupt for the CPM and then another handler for the individual IDMA
> > interrupt from the CPM? Perhaps someone could point me to some
>
> No, the CPM has it's own interrupt already registered with the SIU
> (because things like the console UART or Ethernet need it anyway).
> You are right in principle, though: this registration was done using
> request_8xxirq() - but it has to be done only once, and Linux already
> did this for you. So all you need is to call cpm_install_handler().
> to register your CPM interrupt handler.
Thanks for the explanation. Now I understand how the CPM interrupts
work.
Ok, I tried using cpm_install_handler in my loadable module by including
arch/ppc/8xx_io/commproc.h and it compiles cleanly, but when I try to
insert the module I get:
# insmod fpga.o
fpga.o: unresolved symbol cpm_install_handler
I looked through the Linux 2.2.14 source we are using and the function
is there but it isn't exported in arch/ppc/kernel/ppc_ksyms.c. I added
a line to export the symbol but still got the same error. Any ideas?
> > We're using MontaVista's
> > Hard Hat Linux CDK 1.2 with the 2.2.14 kernel and included tools.
>
> This stuff is _awfully_ old. Why don't you use a more current kernel?
We're in the process of migrating to a new kernel, and this may solve
the problem. Does anyone have recommendations for kernel sources that
are easy to get running on a CLLF/RPXlite board (i.e. kernel.org with
ppc patch or BitKeeper linux_2_4?)
Thanks,
Nate
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: using cpm interrupts on 8xx
2002-05-23 19:01 ` Nate Pletcher
@ 2002-05-23 19:09 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2002-05-23 19:09 UTC (permalink / raw)
To: Nate Pletcher; +Cc: Wolfgang Denk, linuxppc-embedded
On Thu, May 23, 2002 at 03:01:26PM -0400, Nate Pletcher wrote:
> Ok, I tried using cpm_install_handler in my loadable module by including
> arch/ppc/8xx_io/commproc.h and it compiles cleanly, but when I try to
> insert the module I get:
>
> # insmod fpga.o
> fpga.o: unresolved symbol cpm_install_handler
>
> I looked through the Linux 2.2.14 source we are using and the function
> is there but it isn't exported in arch/ppc/kernel/ppc_ksyms.c. I added
> a line to export the symbol but still got the same error. Any ideas?
It's a 'feature':
$ mv .config /tmp/
$ make distclean
$ mv /tmp/.config .
$ make oldconfig
$ make zImage modules
And try again.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-23 19:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-22 14:58 using cpm interrupts on 8xx Nate Pletcher
2002-05-23 3:20 ` Dan Malek
[not found] <20020522162110.447DF1196F@denx.denx.de>
2002-05-23 19:01 ` Nate Pletcher
2002-05-23 19:09 ` Tom Rini
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).