]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/glsdk-u-boot.git/blob - arch/ppc/cpu/mpc824x/drivers/epic/README
nios2: Move individual board linker scripts to common script in cpu tree.
[glsdk/glsdk-u-boot.git] / arch / ppc / cpu / mpc824x / drivers / epic / README
1 CONTENT:
3    epic.h
4    epic1.c
5    epic2.s
7 WHAT ARE THESE FILES:
9 These files contain MPC8240 (Kahlua) EPIC
10 driver routines. The driver routines are not
11 written for any specific operating system.
12 They serves the purpose of code sample, and
13 jump-start for using the MPC8240 EPIC unit.
15 For the reason of correctness of C language
16 syntax, these files are compiled by Metaware
17 C compiler and assembler.
19 ENDIAN NOTATION:
21 The algorithm is designed for big-endian mode,
22 software is responsible for byte swapping.
24 USAGE:
26 1. The host system that is running on MPC8240
27    shall link the files listed here. The memory
28    location of driver routines shall take into
29    account of that driver routines need to run
30    in supervisor mode and they process external
31    interrupts.
33    The routine epic_exception shall be called by
34    exception vector at location 0x500, i.e.,
35    603e core external exception vector.
37 2. The host system is responsible for configuring
38    the MPC8240 including Embedded Utilities Memory
39    Block. All EPIC driver functions require the
40    content of Embedded Utilities Memory Block
41    Base Address Register, EUMBBAR, as the first
42    parameter.
44 3. Before EPIC unit of MPC8240 can be used,
45    initialize EPIC unit by calling epicInit
46    with the corresponding parameters.
48    The initialization shall disable the 603e
49    core External Exception by calling CoreExtIntDisable( ).
50    Next, call epicInit( ). Last, enable the 603e core
51    External Exception by calling CoreExtIntEnable( ).
53 4. After EPIC unit has been successfully initialized,
54    epicIntSourceSet( ) shall be used to register each
55    external interrupt source. Anytime, an external
56    interrupt source can be disabled or enabled by
57    calling corresponding function, epicIntDisable( ),
58    or epicIntEnable( ).
60    Global Timers' resource, base count and frequency,
61    can be changed by calling epicTmFrequencySet( )
62    and epicTmBaseSet( ).
64    To stop counting a specific global timer, use
65    the function, epicTmInhibit while epicTmEnable
66    can be used to start counting a timer.
68 5. To mask a set of external interrupts that are
69    are certain level below, epicIntPrioritySet( )
70    can be used. For example, if the processor's
71    current task priority register is set to 0x7,
72    only interrupts of priority 0x8 or higher will
73    be passed to the processor.
75    Be careful when using this function. It may
76    corrupt the current interrupt pending, selector,
77    and request registers, resulting an invalid vetor.
79    After enabling an interrupt, disable it may also
80    cause an invalid vector. User may consider using
81    the spurious vector interrupt service routine to
82    handle this case.
84 6. The EPIC driver routines contains a set
85    of utilities, Set and Get, for host system
86    to query and modify the desired EPIC source
87    registers.
89 7. Each external interrupt source shall register
90    its interrupt service routine. The routine
91    shall contain all interrupt source specific
92    processes and keep as short as possible.
94    Special customized end of interrupt routine
95    is optional. If it is needed, it shall contain
96    the external interrupt source specific end of
97    interrupt process.
99    External interrupt exception vector at 0x500
100    shall always call the epicEOI just before
101    rfi instruction. Refer to the routine,
102    epic_exception, for a code sample.