3 Renesaso SuperH Solution Enginge MS775x BSC setting
4 Coyright (c) 2007 Nobuhiro Iwamatsu
10 #include <asm/processor.h>
12 #ifdef CONFIG_CPU_SUBTYPE_SH7751
13 #define BCR2_D_VALUE 0x2FFC /* Area 1-6 width: 32/32/32/32/32/16 */
14 #define WCR1_D_VALUE 0x02770771 /* DMA:0 A6:2 A3:0 A0:1 Others:15 */
16 #define WCR2_D_VALUE 0xFFFE4FE7 /* A6:15 A6B:7 A5:15 A5B:7 A4:15
17 A3:2 A2:15 A1:15 A0:6 A0B:7 */
18 #else /* CONFIG_MRSHPC*/
19 #define WCR2_D_VALUE 0x7FFE4FE7 /* A6:3 A6B:7 A5:15 A5B:7 A4:15
20 A3:2 A2:15 A1:15 A0:6 A0B:7 */
21 #endif /* CONFIG_MRSHPC */
22 #define WCR3_D_VALUE 0x01777771 /* A6: 0-1 A5: 1-3 A4: 1-3 A3: 1-3
23 A2: 1-3 A1: 1-3 A0: 0-1 */
24 #define LED_ADDRESS 0xBA000000 /* Address of LED register */
25 #define RTCOR_D_VALUE 0xA50D /* Write code A5, data 0D (~15us?) */
26 #define SDMR3_ADDRESS 0xFF940088 /* SDMR3 address on 32-bit bus */
27 #define MCR_D1_VALUE 0x100901B4 /* SDRAM 32-bit, CAS/RAS Refresh, ... */
28 #define MCR_D2_VALUE 0x500901B4 /* Same w/MRSET now 1 (mode reg cmd) */
29 #define SWITCH_ADDR 0xB9000000 /* Address of DIP switches */
30 #else /* CONFIG_CPU_SUBTYPE_SH7751 */
31 #define BCR2_D_VALUE 0x2E3C /* Area 1-6 width: 32/32/64/16/32/16 */
32 #define WCR1_D_VALUE 0x02720777 /* DMA:0 A6:2 A4:2 A3:0 Others:15 */
33 #define WCR2_D_VALUE 0xFFFE4FFF /* A6:15 A6B:7 A5:15 A5B:7 A4:15
34 A3:2 A2:15 A1:15 A0:15 A0B:7 */
35 #define WCR3_D_VALUE 0x01717771 /* A6: 0-1 A5: 1-3 A4: 0-1 A3: 1-3
36 A2: 1-3 A1: 1-3 A0: 0-1 */
37 #define LED_ADDRESS 0xB0C00000 /* Address of LED register */
38 #define RTCOR_D_VALUE 0xA510 /* Write code A5, data 10 (~15us?) */
39 #define SDMR3_ADDRESS 0xFF940110 /* SDMR3 address on 64-bit bus */
40 #define MCR_D1_VALUE 0x8801001C /* SDRAM 64-bit, CAS/RAS Refresh, ... */
41 #define MCR_D2_VALUE 0xC801001C /* Same w/MRSET now 1 (mode reg cmd) */
42 #define SWITCH_ADDR 0xb0800000 /* Address of DIP switches */
43 #endif /* CONFIG_CPU_SUBTYPE_SH7751 */
51 mov.l L_CCR, r1 ! CCR Address
52 mov.l L_CCR_DISABLE, r0 ! CCR Data
56 mov.l FRQCR_A,r1 /* FRQCR Address */
57 mov.l FRQCR_D,r0 /* FRQCR Data */
60 mov.l BCR1_A,r1 /* BCR1 Address */
61 mov.l BCR1_D,r0 /* BCR1 Data */
64 mov.l BCR2_A,r1 /* BCR2 Address */
65 mov.l BCR2_D,r0 /* BCR2 Data */
68 mov.l WCR1_A,r1 /* WCR1 Address */
69 mov.l WCR1_D,r0 /* WCR1 Data */
72 mov.l WCR2_A,r1 /* WCR2 Address */
73 mov.l WCR2_D,r0 /* WCR2 Data */
76 mov.l WCR3_A,r1 /* WCR3 Address */
77 mov.l WCR3_D,r0 /* WCR3 Data */
80 mov.l LED_A,r1 /* LED Address */
81 mov #0xff,r0 /* LED ALL 'on' */
85 mov.l MCR_A,r1 /* MCR Address */
86 mov.l MCR_D1,r0 /* MCR Data1 */
89 mov.l SDMR3_A,r1 /* Set SDRAM mode */
93 ! Do you need PCMCIA setting?
94 ! If so, please add the lines here...
96 mov.l RTCNT_A,r1 /* RTCNT Address */
97 mov.l RTCNT_D,r0 /* RTCNT Data */
100 mov.l RTCOR_A,r1 /* RTCOR Address */
101 mov.l RTCOR_D,r0 /* RTCOR Data */
104 mov.l RTCSR_A,r1 /* RTCSR Address */
105 mov.l RTCSR_D,r0 /* RTCSR Data */
108 mov.l RFCR_A,r1 /* RFCR Address */
109 mov.l RFCR_D,r0 /* RFCR Data */
110 mov.w r0,@r1 /* Clear reflesh counter */
111 /* Wait DRAM refresh 30 times */
119 mov.l MCR_A,r1 /* MCR Address */
120 mov.l MCR_D2,r0 /* MCR Data2 */
123 mov.l SDMR3_A,r1 /* Set SDRAM mode */
133 L_CCR_DISABLE: .long 0x0808
136 #ifdef CONFIG_CPU_SUBTYPE_SH_R
137 .long 0x00000e1a /* 12:3:3 */
139 #ifdef CONFIG_GOOD_SESH4
140 .long 0x00000e13 /* 6:2:1 */
142 .long 0x00000e23 /* 6:1:1 */
144 #endif /* CONFIG_CPU_SUBTYPE_SH_R */
147 BCR1_D: .long 0x00000008 /* Area 3 SDRAM */
149 BCR2_D: .long BCR2_D_VALUE /* Bus width settings */
151 WCR1_D: .long WCR1_D_VALUE /* Inter-area or turnaround wait states */
153 WCR2_D: .long WCR2_D_VALUE /* Per-area access and burst wait states */
155 WCR3_D: .long WCR3_D_VALUE /* Address setup and data hold cycles */
156 LED_A: .long LED_ADDRESS /* LED Address */
158 RTCSR_D: .long 0xA518 /* RTCSR Write Code A5h Data 18h */
160 RTCNT_D: .long 0xA500 /* RTCNT Write Code A5h Data 00h */
162 RTCOR_D: .long RTCOR_D_VALUE /* Set refresh time (about 15us) */
163 SDMR3_A: .long SDMR3_ADDRESS
165 MCR_D1: .long MCR_D1_VALUE
166 MCR_D2: .long MCR_D2_VALUE
168 RFCR_D: .long 0xA400 /* RFCR Write Code A4h Data 00h */