2018-08-20 20:10:06 -07:00
|
|
|
constant SI_BASE($A480) // $04800000..$0480001B Serial Interface (SI) Base Register
|
|
|
|
constant SI_DRAM_ADDR($00) // $04800000..$04800003 SI: DRAM Address Register
|
|
|
|
constant SI_PIF_ADDR_RD64B($04) // $04800004..$04800007 SI: Address Read 64B Register
|
|
|
|
//*RESERVED*($08) // $04800008..$0480000B SI: Reserved Register
|
|
|
|
//*RESERVED*($0C) // $0480000C..$0480000F SI: Reserved Register
|
|
|
|
constant SI_PIF_ADDR_WR64B($10) // $04800010..$04800013 SI: Address Write 64B Register
|
|
|
|
//*RESERVED*($14) // $04800014..$04800017 SI: Reserved Register
|
|
|
|
constant SI_STATUS($18) // $04800018..$0480001B SI: Status Register
|
2018-08-23 20:10:58 -07:00
|
|
|
|
|
|
|
macro SI_WAIT() {
|
|
|
|
lui a0, SI_BASE
|
|
|
|
-
|
|
|
|
lw t0, SI_STATUS(a0)
|
|
|
|
andi t0, 0x0003
|
|
|
|
sltu t0, r0, t0
|
|
|
|
bnez t0,-
|
|
|
|
nop
|
|
|
|
}
|