123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- #include <config.h>
- #include <asm/processor.h>
- #include <asm/macro.h>
- #ifdef CONFIG_CPU_SH7751
- #define BCR2_D_VALUE 0x2FFC
- #define WCR1_D_VALUE 0x02770771
- #ifdef CONFIG_MARUBUN_PCCARD
- #define WCR2_D_VALUE 0xFFFE4FE7
- #else
- #define WCR2_D_VALUE 0x7FFE4FE7
- #endif
- #define WCR3_D_VALUE 0x01777771
- #define RTCOR_D_VALUE 0xA50D
- #define SDMR3_ADDRESS 0xFF940088
- #define MCR_D1_VALUE 0x100901B4
- #define MCR_D2_VALUE 0x500901B4
- #else
- #define BCR2_D_VALUE 0x2E3C
- #define WCR1_D_VALUE 0x02720777
- #define WCR2_D_VALUE 0xFFFE4FFF
- #define WCR3_D_VALUE 0x01717771
- #define RTCOR_D_VALUE 0xA510
- #define SDMR3_ADDRESS 0xFF940110
- #define MCR_D1_VALUE 0x8801001C
- #define MCR_D2_VALUE 0xC801001C
- #endif
- .global lowlevel_init
- .text
- .align 2
- lowlevel_init:
- write32 CCR_A, CCR_D_DISABLE
- init_bsc:
- write16 FRQCR_A, FRQCR_D
- write32 BCR1_A, BCR1_D
- write16 BCR2_A, BCR2_D
- write32 WCR1_A, WCR1_D
- write32 WCR2_A, WCR2_D
- write32 WCR3_A, WCR3_D
- write32 MCR_A, MCR_D1
-
- write8 SDMR3_A, SDMR3_D
- ! Do you need PCMCIA setting?
- ! If so, please add the lines here...
- write16 RTCNT_A, RTCNT_D
- write16 RTCOR_A, RTCOR_D
- write16 RTCSR_A, RTCSR_D
- write16 RFCR_A, RFCR_D
-
- mov #30, r3
- 1:
- mov.w @r1, r0
- extu.w r0, r2
- cmp/hi r3, r2
- bf 1b
- write32 MCR_A, MCR_D2
-
- write8 SDMR3_A, SDMR3_D
- rts
- nop
- .align 2
- CCR_A: .long CCR
- CCR_D_DISABLE: .long 0x0808
- FRQCR_A: .long FRQCR
- FRQCR_D:
- #ifdef CONFIG_CPU_TYPE_R
- .word 0x0e1a
- #else
- #ifdef CONFIG_GOOD_SESH4
- .word 0x00e13
- #else
- .word 0x00e23
- #endif
- .align 2
- #endif
- BCR1_A: .long BCR1
- BCR1_D: .long 0x00000008
- BCR2_A: .long BCR2
- BCR2_D: .long BCR2_D_VALUE
- WCR1_A: .long WCR1
- WCR1_D: .long WCR1_D_VALUE
- WCR2_A: .long WCR2
- WCR2_D: .long WCR2_D_VALUE
- WCR3_A: .long WCR3
- WCR3_D: .long WCR3_D_VALUE
- RTCSR_A: .long RTCSR
- RTCSR_D: .word 0xA518
- .align 2
- RTCNT_A: .long RTCNT
- RTCNT_D: .word 0xA500
- .align 2
- RTCOR_A: .long RTCOR
- RTCOR_D: .word RTCOR_D_VALUE
- .align 2
- SDMR3_A: .long SDMR3_ADDRESS
- SDMR3_D: .long 0x00
- MCR_A: .long MCR
- MCR_D1: .long MCR_D1_VALUE
- MCR_D2: .long MCR_D2_VALUE
- RFCR_A: .long RFCR
- RFCR_D: .word 0xA400
- .align 2
|