summaryrefslogtreecommitdiff
path: root/board/renesas/r2dplus/lowlevel_init.S
diff options
context:
space:
mode:
Diffstat (limited to 'board/renesas/r2dplus/lowlevel_init.S')
-rw-r--r--board/renesas/r2dplus/lowlevel_init.S99
1 files changed, 30 insertions, 69 deletions
diff --git a/board/renesas/r2dplus/lowlevel_init.S b/board/renesas/r2dplus/lowlevel_init.S
index 28d2b37..76d3cfc 100644
--- a/board/renesas/r2dplus/lowlevel_init.S
+++ b/board/renesas/r2dplus/lowlevel_init.S
@@ -8,6 +8,7 @@
#include <version.h>
#include <asm/processor.h>
+#include <asm/macro.h>
.global lowlevel_init
.text
@@ -15,98 +16,56 @@
lowlevel_init:
- mov.l CCR_A, r1
- mov.l CCR_D_D, r0
- mov.l r0,@r1
+ write32 CCR_A, CCR_D_D
- mov.l MMUCR_A,r1
- mov.l MMUCR_D,r0
- mov.l r0,@r1
+ write32 MMUCR_A, MMUCR_D
- mov.l BCR1_A,r1
- mov.l BCR1_D,r0
- mov.l r0,@r1
+ write32 BCR1_A, BCR1_D
- mov.l BCR2_A,r1
- mov.l BCR2_D,r0
- mov.w r0,@r1
+ write16 BCR2_A, BCR2_D
- mov.l BCR3_A,r1
- mov.l BCR3_D,r0
- mov.w r0,@r1
+ write16 BCR3_A, BCR3_D
- mov.l BCR4_A,r1
- mov.l BCR4_D,r0
- mov.l r0,@r1
+ write32 BCR4_A, BCR4_D
- mov.l WCR1_A,r1
- mov.l WCR1_D,r0
- mov.l r0,@r1
+ write32 WCR1_A, WCR1_D
- mov.l WCR2_A,r1
- mov.l WCR2_D,r0
- mov.l r0,@r1
+ write32 WCR2_A, WCR2_D
- mov.l WCR3_A,r1
- mov.l WCR3_D,r0
- mov.l r0,@r1
+ write32 WCR3_A, WCR3_D
- mov.l PCR_A,r1
- mov.l PCR_D,r0
- mov.w r0,@r1
+ write16 PCR_A, PCR_D
- mov.l LED_A,r1
- mov #0xff,r0
- mov.w r0,@r1
+ write16 LED_A, LED_D
- mov.l MCR_A,r1
- mov.l MCR_D1,r0
- mov.l r0,@r1
+ write32 MCR_A, MCR_D1
- mov.l RTCNT_A,r1
- mov.l RTCNT_D,r0
- mov.w r0,@r1
+ write16 RTCNT_A, RTCNT_D
- mov.l RTCOR_A,r1
- mov.l RTCOR_D,r0
- mov.w r0,@r1
+ write16 RTCOR_A, RTCOR_D
- mov.l RFCR_A,r1
- mov.l RFCR_D,r0
- mov.w r0,@r1
+ write16 RFCR_A, RFCR_D
- mov.l RTCSR_A,r1
- mov.l RTCSR_D,r0
- mov.w r0,@r1
+ write16 RTCSR_A, RTCSR_D
- mov.l SDMR3_A,r1
- mov #0x55,r0
- mov.b r0,@r1
+ write8 SDMR3_A, SDMR3_D0
/* Wait DRAM refresh 30 times */
- mov.l RFCR_A,r1
- mov #30,r3
+ mov.l RFCR_A, r1
+ mov #30, r3
1:
- mov.w @r1,r0
- extu.w r0,r2
- cmp/hi r3,r2
+ mov.w @r1, r0
+ extu.w r0, r2
+ cmp/hi r3, r2
bf 1b
- mov.l MCR_A,r1
- mov.l MCR_D2,r0
- mov.l r0,@r1
+ write32 MCR_A, MCR_D2
- mov.l SDMR3_A,r1
- mov #0,r0
- mov.b r0,@r1
+ write8 SDMR3_A, SDMR3_D1
- mov.l IRLMASK_A,r1
- mov.l IRLMASK_D,r0
- mov.l r0,@r1
+ write32 IRLMASK_A, IRLMASK_D
- mov.l CCR_A, r1
- mov.l CCR_D_E, r0
- mov.l r0, @r1
+ write32 CCR_A, CCR_D_E
rts
nop
@@ -133,6 +92,7 @@ WCR2_D: .long 0xcff86fbf
WCR3_A: .long WCR3 /* WCR3 Address */
WCR3_D: .long 0x07777707
LED_A: .long 0x04000036 /* LED Address */
+LED_D: .long 0xFF /* LED Data */
RTCNT_A: .long RTCNT /* RTCNT Address */
RTCNT_D: .long 0xA500 /* RTCNT Write Code A5h Data 00h */
RTCOR_A: .long RTCOR /* RTCOR Address */
@@ -140,7 +100,8 @@ RTCOR_D: .long 0xA534 /* RTCOR Write Code */
RTCSR_A: .long RTCSR /* RTCSR Address */
RTCSR_D: .long 0xA510 /* RTCSR Write Code */
SDMR3_A: .long 0xFF9400CC /* SDMR3 Address */
-SDMR3_D: .long 0x55
+SDMR3_D0: .long 0x55
+SDMR3_D1: .long 0x00
MCR_A: .long MCR /* MCR Address */
MCR_D1: .long 0x081901F4 /* MRSET:'0' */
MCR_D2: .long 0x481901F4 /* MRSET:'1' */