Motorola MPC8240 User Manual page 539

Integrated host processor with integrated pci
Table of Contents

Advertisement

Appendix C
Initialization Example
This appendix contains an example PowerPC assembly language routine for initializing the
configuration registers for the MPC8240 using address map B. It is excerpted from
DINK32 source code available for download at http://www.motorola.com/semiconductors.
DINK32 source code also contains examples on how to initialize the embedded utilities
(EPIC, DMA, MU and I
MPC8240Init:
// save MPC8240 Vendor ID
or
r11, r3, r3
// If the MPC8240 is detected, it must be running on a
// Sandpoint with the Unity (PPMC8240) board (or possibly
// a Yellowknife X4 with an adapter card).
// The board_type of Sandpoint+PMC8240 X4 is 4.
// stores the value 4 to sprg0, which will be stored to the
// board_type variable after DINK is copied form ROM to RAM.
addi
r3, r0, 0x4
mtspr
sprg0, r3
// Errata to address latency timer RP 7/20/99
addis
r3,r0,BMC_BASE
ori
li
r4, 0x20
stwbrxr3,0,r5
sync
stb
r4, 1(r6)
sync
addis
r3,r0,BMC_BASE
ori
li
r4, 0x08
stwbrx
r3,0,r5
sync
stb
r4, 0(r6)
sync
addis
r3,r0,BMC_BASE
ori
li
r4, 0x0006
stwbrx
r3,0,r5
2
C).
/* entry: r3 contains MPC8240 Vendor ID */
// Set LATENCY_TIMER
r3,r3,0x000d
// Set to 0x20
// Set CACHE_LINE_SIZE
r3,r3,0x000c
// Set to 0x08
// Set PCI_CMD
r3,r3,0x0004
// Set to 06 (Memory Space)
Appendix C. Initialization Example
This code
C-1

Advertisement

Table of Contents
loading

Table of Contents