This source file includes following definitions.
- pica_set_led
- r4030_read_reg16
- r4030_read_reg32
- r4030_write_reg16
- r4030_write_reg32
1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef __ASM_MIPS_JAZZ_H
14 #define __ASM_MIPS_JAZZ_H
15
16
17
18
19
20
21
22
23
24 #define JAZZ_LOCAL_IO_SPACE 0xe0000000
25
26
27
28
29
30
31
32
33 #define PICA_ASIC_REVISION 0xe0000008
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50 #define PICA_LED 0xe000f000
51
52
53
54
55
56
57
58
59 #define LED_DOT 0x01
60 #define LED_SPACE 0x00
61 #define LED_0 0xfc
62 #define LED_1 0x60
63 #define LED_2 0xda
64 #define LED_3 0xf2
65 #define LED_4 0x66
66 #define LED_5 0xb6
67 #define LED_6 0xbe
68 #define LED_7 0xe0
69 #define LED_8 0xfe
70 #define LED_9 0xf6
71 #define LED_A 0xee
72 #define LED_b 0x3e
73 #define LED_C 0x9c
74 #define LED_d 0x7a
75 #define LED_E 0x9e
76 #define LED_F 0x8e
77
78 #ifndef __LANGUAGE_ASSEMBLY__
79
80 extern __inline__ void pica_set_led(unsigned int bits)
81 {
82 volatile unsigned int *led_register = (unsigned int *) PICA_LED;
83
84 *led_register = bits;
85 }
86
87 #endif
88
89
90
91
92
93
94 #define JAZZ_KEYBOARD_ADDRESS 0xe0005000
95 #define JAZZ_KEYBOARD_DATA 0xe0005000
96 #define JAZZ_KEYBOARD_COMMAND 0xe0005001
97
98 #ifndef __LANGUAGE_ASSEMBLY__
99
100 typedef struct {
101 unsigned char data;
102 unsigned char command;
103 } jazz_keyboard_hardware;
104
105 typedef struct {
106 unsigned char pad0[3];
107 unsigned char data;
108 unsigned char pad1[3];
109 unsigned char command;
110 } mips_keyboard_hardware;
111
112
113
114
115 #define keyboard_hardware jazz_keyboard_hardware
116
117 #endif
118
119
120
121
122 #define MIPS_KEYBOARD_ADDRESS 0xb9005000
123 #define MIPS_KEYBOARD_DATA 0xb9005003
124 #define MIPS_KEYBOARD_COMMAND 0xb9005007
125
126
127
128
129 #define JAZZ_SERIAL1_BASE (unsigned int)0xe0006000
130 #define JAZZ_SERIAL2_BASE (unsigned int)0xe0007000
131 #define JAZZ_PARALLEL_BASE (unsigned int)0xe0008000
132
133
134
135
136 #define JAZZ_DUMMY_DEVICE 0xe000d000
137
138
139
140
141
142
143
144 #define JAZZ_TIMER_INTERVAL 0xe0000228
145 #define JAZZ_TIMER_REGISTER 0xe0000230
146
147
148
149
150 #ifndef __LANGUAGE_ASSEMBLY__
151 #ifdef __MIPSEL__
152 typedef struct {
153 unsigned int bank2 : 3;
154 unsigned int bank1 : 3;
155 unsigned int mem_bus_width : 1;
156 unsigned int reserved2 : 1;
157 unsigned int page_mode : 1;
158 unsigned int reserved1 : 23;
159 } dram_configuration;
160 #else
161 typedef struct {
162 unsigned int reserved1 : 23;
163 unsigned int page_mode : 1;
164 unsigned int reserved2 : 1;
165 unsigned int mem_bus_width : 1;
166 unsigned int bank1 : 3;
167 unsigned int bank2 : 3;
168 } dram_configuration;
169 #endif
170 #endif
171
172 #define PICA_DRAM_CONFIG 0xe00fffe0
173
174
175
176
177 #define JAZZ_IO_IRQ_SOURCE 0xe0100000
178 #define JAZZ_IO_IRQ_ENABLE 0xe0100002
179
180
181
182
183 #define JAZZ_IE_PARALLEL (1 << 0)
184 #define JAZZ_IE_FLOPPY (1 << 1)
185 #define JAZZ_IE_SOUND (1 << 2)
186 #define JAZZ_IE_VIDEO (1 << 3)
187 #define JAZZ_IE_ETHERNET (1 << 4)
188 #define JAZZ_IE_SCSI (1 << 5)
189 #define JAZZ_IE_KEYBOARD (1 << 6)
190 #define JAZZ_IE_MOUSE (1 << 7)
191 #define JAZZ_IE_SERIAL1 (1 << 8)
192 #define JAZZ_IE_SERIAL2 (1 << 9)
193
194
195
196
197 #define JAZZ_TIMER_IRQ 0
198 #define JAZZ_KEYBOARD_IRQ 1
199 #define JAZZ_ETHERNET_IRQ 2
200 #define JAZZ_SERIAL1_IRQ 3
201 #define JAZZ_SERIAL2_IRQ 4
202 #define JAZZ_PARALLEL_IRQ 5
203 #define JAZZ_FLOPPY_IRQ 6
204
205
206
207
208
209
210
211 #define JAZZ_SCSI_DMA 0
212 #define JAZZ_FLOPPY_DMA 1
213 #define JAZZ_AUDIOL_DMA 2
214 #define JAZZ_AUDIOR_DMA 3
215
216
217
218
219
220 #define JAZZ_R4030_CONFIG 0xE0000000
221 #define JAZZ_R4030_REVISION 0xE0000008
222 #define JAZZ_R4030_INV_ADDR 0xE0000010
223
224 #define JAZZ_R4030_TRSTBL_BASE 0xE0000018
225 #define JAZZ_R4030_TRSTBL_LIM 0xE0000020
226 #define JAZZ_R4030_TRSTBL_INV 0xE0000028
227
228 #define JAZZ_R4030_CACHE_MTNC 0xE0000030
229 #define JAZZ_R4030_R_FAIL_ADDR 0xE0000038
230 #define JAZZ_R4030_M_FAIL_ADDR 0xE0000040
231
232 #define JAZZ_R4030_CACHE_PTAG 0xE0000048
233 #define JAZZ_R4030_CACHE_LTAG 0xE0000050
234 #define JAZZ_R4030_CACHE_BMASK 0xE0000058
235 #define JAZZ_R4030_CACHE_BWIN 0xE0000060
236
237
238
239
240
241
242
243
244
245 #define JAZZ_R4030_REM_SPEED 0xE0000070
246
247 #define JAZZ_R4030_IRQ_ENABLE 0xE00000E8
248
249 #define JAZZ_R4030_IRQ_SOURCE 0xE0000200
250 #define JAZZ_R4030_I386_ERROR 0xE0000208
251
252
253
254
255
256 #ifndef __LANGUAGE_ASSEMBLY__
257
258 extern inline unsigned short r4030_read_reg16(unsigned addr) {
259 unsigned short ret = *((volatile unsigned short *)addr);
260 __asm__ __volatile__(
261 ".set\tnoreorder\n\t"
262 "nop\n\t"
263 "nop\n\t"
264 "nop\n\t"
265 "nop\n\t"
266 ".set\treorder");
267 return ret;
268 }
269
270 extern inline unsigned int r4030_read_reg32(unsigned addr) {
271 unsigned int ret = *((volatile unsigned int *)addr);
272 __asm__ __volatile__(
273 ".set\tnoreorder\n\t"
274 "nop\n\t"
275 "nop\n\t"
276 "nop\n\t"
277 "nop\n\t"
278 ".set\treorder");
279 return ret;
280 }
281
282 extern inline void r4030_write_reg16(unsigned addr, unsigned val) {
283 *((volatile unsigned short *)addr) = val;
284 __asm__ __volatile__(
285 ".set\tnoreorder\n\t"
286 "nop\n\t"
287 "nop\n\t"
288 "nop\n\t"
289 "nop\n\t"
290 ".set\treorder");
291 }
292
293 extern inline unsigned int r4030_write_reg32(unsigned addr, unsigned val) {
294 *((volatile unsigned int *)addr) = val;
295 __asm__ __volatile__(
296 ".set\tnoreorder\n\t"
297 "nop\n\t"
298 "nop\n\t"
299 "nop\n\t"
300 "nop\n\t"
301 ".set\treorder");
302 }
303
304 #endif
305
306 #define JAZZ_FDC_BASE 0xe0003000
307
308 #define JAZZ_RTC_BASE 0xe0004000
309
310 #endif