GT-64260A Design Guide
Doc. No. MV-S300165-00, Rev. A
CONFIDENTIAL
Copyright © 2002 Marvell
Page 150
Document Classification: Proprietary Information
May 21, 2002, Preliminary
Appendix C. ECC Initialization- Example Code
C.1 Assembler Code
The following is the Assembler Code to Copy the Boot Device to SDRAM.
! Copy dink to memory....
addisr3,0,0
! Load dram address (0) into r3.
addisr4,0,RESET_BASE! Load r4 with base eprom address
! of 0xFFF00000.
addisr6,0,0x10 ! Load r6 with upper half of 1M.
ori r6,r6,0x0000! Load r6 with lower half of 1M.
lis r5,0x1400 ! DMA source address register
ori r5,r5,0x0910 ! loaded with flash base address
stwbrx r4,0,(r5)
lis r5,0x1400 ! DMA destination address register
ori r5,r5,0x0920 ! loaded with dram base address
stwbrx r3,0,(r5)
lis r5,0x1400 ! DMA ByteCount register
ori r5,r5,0x0900 ! loaded with block size
stwbrx r6,0,(r5)
lis r5,0x1400 ! DMA control register
ori r5,r5,0x0940
lis r3,0x8000 ! DMA control register loaded
ori r3,r3,0x1a00 ! with block mode, 8bytes limit
stwbrx r3,0,(r5)
lis r4,0x0
sync
lis r6,0x0
chanAct
lis r4,0x0
ori r4,r4,0x4000 ! Is channel active?
lwbrx r6,0,(r5)
and. r4,r4,r6
bnz chanAct ! Loop while DMA transfer continues