MPC8240 EPIC Driver (Attached)

3 messages, 3 authors, 2001-08-13 · open the first message on its own page

MPC8240 EPIC Driver (Attached)

From: James F Dougherty <hidden>
Date: 2001-08-11 07:18:58

A while ago, I posted some questions on getting the OpenPIC driver working
correctly for the EPIC (Embedded Programmable Interrupt Controller) internal
to the MPC8240. After several attempts on open_pic.*, I gave up, and ported a
an existing driver.

The attached files function as an interrupt driver for MPC8240 (PPC603)
systems with the internal EPIC operating in discrete mode. In this mode,
IRQ's are connected to the MPC8240 EPIC and the 8259 cascade function
is not needed. Typically, one or more PCI devices will use one of IRQ X (0-5)
on the MPC8240 EPIC, these interrupts will be received as EPIC_VECTOR_XX
and perform the EPIC EOI handling. Interrupts can be nested, such that higher
priority interrupts are not blocked out. For more information, see the Motorola
MPC8240 Users Manual, Chapter 11, Embedded Programmable Interrupt Controller.
Also, although I have not checked, I am pretty sure the same logic is in the
MPC8245.

If anyone has improvements or suggestions on how to improve this driver,
please email me directly.


					Thanks,
					-James

Re: MPC8240 EPIC Driver (Attached)

From: Dan Malek <hidden>
Date: 2001-08-11 23:47:23

James F Dougherty wrote:
A while ago, I posted some questions on getting the OpenPIC driver working
correctly for the EPIC (Embedded Programmable Interrupt Controller) internal
to the MPC8240. After several attempts on open_pic.*, I gave up, and ported a
an existing driver.
Ummm, I'm confused.  The existing PowerPC OpenPIC works just fine with
the 8240/8245/MPC107 EPICs, at least on the Sandpoint.  I can't believe
there would be much of anything needed for a custom board.  I have some
Sandpoint X3 patches that enables the serial mode control lines as well.
I think there could be a few minor improvements, but it is certainly
functional.  All you should need are the interrupt senses table for
the OpenPIC initialization and the proper routing table for the PCI
setup.


	-- Dan

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: MPC8240 EPIC Driver (Attached)

From: Andrew Johnson <hidden>
Date: 2001-08-13 15:56:09

Dan Malek wrote:
James F Dougherty wrote:
quoted
A while ago, I posted some questions on getting the OpenPIC driver working
correctly for the EPIC (Embedded Programmable Interrupt Controller) internal
to the MPC8240. After several attempts on open_pic.*, I gave up, and ported a
an existing driver.
Ummm, I'm confused.  The existing PowerPC OpenPIC works just fine with
the 8240/8245/MPC107 EPICs, at least on the Sandpoint.
Not quite - the Sandpoint has an i8259 as well, and the OpenPic code as
shipped with HHL-2.0 assumes that there is one present (at least you have
to link in the i8259 code, although you can arrange that it is never
called).  Not all 8240 systems have an 8259 such as the MVME2100, and I
had to #if out some stuff from OpenPic.c to be able to omit the i8259.

Then there's the problem of accessing the 8240's interrupts for I2C, 2 DMA
channels and Message Unit, which are highly dis-contiguous with the other
interrupts; these would appear at IRQs 129, 130, 131 and 134 in the
current scheme (needing a rather large and sparse interrupt senses
table).  Oh, and the 4 Global timer interrupts would have to appear at
negative IRQ numbers, so it's a good thing Linux doesn't need to use
these.

I haven't looked at James' code, but the OpenPIC stuff certainly does need
some changes to be truly universal.

- Andrew
--
The world is such a cheerful place when viewed from upside-down
It makes a rise of every fall, a smile of every frown

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help