SDRAM Mode Register/Code
Copyright © 2002 Marvell
CONFIDENTIAL
Doc. No. MV-S300165-00, Rev. A
May 21, 2002, Preliminary
Document Classification: Proprietary Information
Page 149
Appendix B. SDRAM Mode Register/Code
/
* configuration Sdram Operation Mode */
lis r5, INTERNAL_BASE
ori r5,r5, SDRAM_MODE ! r5 holds the Sdram operation Mode
lis r6, 0x0 ! r6 <= 0x0
ori r6, r6, 0x3 ! r6 <= 0x3
stwbrx r6, 0, (r5) ! ( 0x14000474 ) <= 0x3
/* A dummy write to bank0 */
sync
lis r6, 0x0 ! r6 <= 0x0
stwbrx r0, 0, (r6) ! ( 0x0 ) <= 0x0
sync
/* A dummy write to bank1 */
lis r6, 0x0080 ! r6 <= 0x0080.0000
stwbrx r0, 0, (r6) ! ( 0x80.0000 ) <= 0x0
/* A dummy write to bank2 */
sync
lis r6, 0x0100 ! r6 <= 0x0100.0000
stwbrx r0, 0, (r6) ! ( 0x180.0000 ) <= 0x0
/* A dummy write to bank3 */
sync
lis r6, 0x0180 ! r6 <= 0x0180.0000
stwbrx r0, 0, (r6) ! ( 0x200.0000 ) <= 0x0
/* poll active bit */
lis r6, 0x8000
lis r5, r0, INTERNAL_BASE
ori r5,r5, SDRAM_MODE ! r5 holds the Sdram operation Mode
active_poll_loop:
lwbrx r7, 0 , (r5)
sync
and r7, r7, r6
cmp 0,0,r6,r7
bne active_poll_loop
/* configuration Sdram Operation Mode */
lis r5, r0, INTERNAL_BASE
ori r5,r5, SDRAM_MODE ! r5 holds the Sdram operation Mode
lis r6, 0x0 ! r6 <= 0
stwbrx r6, 0, (r5) ! ( 0x14000474 ) <= 0x0