MOTOROLA
Appendix E. MPC8240 Drivers
E-47
Description:
The value is written to the specified register. This function is defined in drivers/i2c/i2c2.s
E.4
MPC8240 EPIC Interrupt Driver
This appendix describes the sample EPIC driver source code provided in this DINK32
release and its usage on the Sandpoint Reference Platform running DINK32.
E.4.1
General Description
EPIC is the embedded programmable interrupt controller feature implemented on
Motorola’s MPC8240, MPC8245 and MPC107. It is derived from the Open Programmable
Interrupt Controller (PIC) Register Interface Specification R1.2 developed by AMD and
Cyrix. EPIC provides support for up to five external interrupts or one serial-style interrupt
line (supporting 16 interrupts), four internal logic-driven interrupts (DMA0, DMA1, I
2
C,
I
2
O), four global timers, and it supports a pass through mode. The MPC8245 also adds
DUART support. Please refer to the EPIC Chapter of the MPC8240, MPC8245 or MPC107
User’s Manuals for a more in depth description of EPIC. For simplicity, all manual
references in this appendix will be to the MPC8240 User’s Manual, however, the reader
should refer to the corresponding manual for their particular processor.
E.4.2
EPIC Specifics
Unlike other embedded features of the MPC824x and MPC107 such as DMA and I
2
O, the
EPIC unit is accessible from the local processor only. The control and status registers of this
unit cannot be accessed by external PCI devices. The EPIC registers are accessed as an
offset from the Embedded Utilities Memory Block (EUMB). The EPIC unit supports two
modes: Mixed and Pass-through.
The DINK32 EPIC driver sample code demonstrates EPIC in mixed mode and also error
checks for Pass-through mode in case external interrupts are enabled with no interrupt
handler setup. Both Direct and Serial mode are implemented in DINK32, but when EPIC
is initialized through DINK32 the default EPIC setup is dependant on the Sandpoint board
version. However, the default setups can be overridden using the “dev epic” command set.
The Sandpoint board version is detected by a loop back feature implemented on SuperIO
of the Sandpoint X3 (please refer to the Sandpoint X3 User’s Manual). DINK32 will
attempt to detect this loop-back feature. If the loop-back test is successful, the board version
is Sandpoint X3, if the test is unsuccessful the board version is Sandpoint X2. EPIC on a
Host PMC will default to serial mode on a Sandpoint X3 and will default to direct mode on
a Sandpoint X2. EPIC on an Agent PMC in a PCI slot will default to direct mode on either
Sandpoint board version.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.