This source file includes following definitions.
- amifb_video_off
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #ifndef _M68K_AMIGAHW_H
17 #define _M68K_AMIGAHW_H
18
19 #include <linux/ioport.h>
20
21 #include <asm/bootinfo-amiga.h>
22
23
24
25
26
27
28 extern unsigned long amiga_chipset;
29
30
31
32
33
34
35 extern unsigned long amiga_eclock;
36 extern unsigned long amiga_colorclock;
37 extern unsigned long amiga_chip_size;
38 extern unsigned char amiga_vblank;
39
40
41 #define AMIGAHW_DECLARE(name) unsigned name : 1
42 #define AMIGAHW_SET(name) (amiga_hw_present.name = 1)
43 #define AMIGAHW_PRESENT(name) (amiga_hw_present.name)
44
45 struct amiga_hw_present {
46
47 AMIGAHW_DECLARE(AMI_VIDEO);
48 AMIGAHW_DECLARE(AMI_BLITTER);
49 AMIGAHW_DECLARE(AMBER_FF);
50
51 AMIGAHW_DECLARE(AMI_AUDIO);
52
53 AMIGAHW_DECLARE(AMI_FLOPPY);
54 AMIGAHW_DECLARE(A3000_SCSI);
55 AMIGAHW_DECLARE(A4000_SCSI);
56 AMIGAHW_DECLARE(A1200_IDE);
57 AMIGAHW_DECLARE(A4000_IDE);
58 AMIGAHW_DECLARE(CD_ROM);
59
60 AMIGAHW_DECLARE(AMI_KEYBOARD);
61 AMIGAHW_DECLARE(AMI_MOUSE);
62 AMIGAHW_DECLARE(AMI_SERIAL);
63 AMIGAHW_DECLARE(AMI_PARALLEL);
64
65 AMIGAHW_DECLARE(A2000_CLK);
66 AMIGAHW_DECLARE(A3000_CLK);
67
68 AMIGAHW_DECLARE(CHIP_RAM);
69 AMIGAHW_DECLARE(PAULA);
70 AMIGAHW_DECLARE(DENISE);
71 AMIGAHW_DECLARE(DENISE_HR);
72 AMIGAHW_DECLARE(LISA);
73 AMIGAHW_DECLARE(AGNUS_PAL);
74 AMIGAHW_DECLARE(AGNUS_NTSC);
75 AMIGAHW_DECLARE(AGNUS_HR_PAL);
76 AMIGAHW_DECLARE(AGNUS_HR_NTSC);
77 AMIGAHW_DECLARE(ALICE_PAL);
78 AMIGAHW_DECLARE(ALICE_NTSC);
79 AMIGAHW_DECLARE(MAGIC_REKICK);
80 AMIGAHW_DECLARE(PCMCIA);
81 AMIGAHW_DECLARE(ZORRO);
82 AMIGAHW_DECLARE(ZORRO3);
83 };
84
85 extern struct amiga_hw_present amiga_hw_present;
86
87 struct CUSTOM {
88 unsigned short bltddat;
89 unsigned short dmaconr;
90 unsigned short vposr;
91 unsigned short vhposr;
92 unsigned short dskdatr;
93 unsigned short joy0dat;
94 unsigned short joy1dat;
95 unsigned short clxdat;
96 unsigned short adkconr;
97 unsigned short pot0dat;
98 unsigned short pot1dat;
99 unsigned short potgor;
100 unsigned short serdatr;
101 unsigned short dskbytr;
102 unsigned short intenar;
103 unsigned short intreqr;
104 unsigned char *dskptr;
105 unsigned short dsklen;
106 unsigned short dskdat;
107 unsigned short refptr;
108 unsigned short vposw;
109 unsigned short vhposw;
110 unsigned short copcon;
111 unsigned short serdat;
112 unsigned short serper;
113 unsigned short potgo;
114 unsigned short joytest;
115 unsigned short strequ;
116 unsigned short strvbl;
117 unsigned short strhor;
118 unsigned short strlong;
119 unsigned short bltcon0;
120 unsigned short bltcon1;
121 unsigned short bltafwm;
122 unsigned short bltalwm;
123 unsigned char *bltcpt;
124 unsigned char *bltbpt;
125 unsigned char *bltapt;
126 unsigned char *bltdpt;
127 unsigned short bltsize;
128 unsigned char pad2d;
129 unsigned char bltcon0l;
130 unsigned short bltsizv;
131 unsigned short bltsizh;
132 unsigned short bltcmod;
133 unsigned short bltbmod;
134 unsigned short bltamod;
135 unsigned short bltdmod;
136 unsigned short spare2[4];
137 unsigned short bltcdat;
138 unsigned short bltbdat;
139 unsigned short bltadat;
140 unsigned short spare3[3];
141 unsigned short deniseid;
142 unsigned short dsksync;
143 unsigned short *cop1lc;
144 unsigned short *cop2lc;
145 unsigned short copjmp1;
146 unsigned short copjmp2;
147 unsigned short copins;
148 unsigned short diwstrt;
149 unsigned short diwstop;
150 unsigned short ddfstrt;
151 unsigned short ddfstop;
152 unsigned short dmacon;
153 unsigned short clxcon;
154 unsigned short intena;
155 unsigned short intreq;
156 unsigned short adkcon;
157 struct {
158 unsigned short *audlc;
159 unsigned short audlen;
160 unsigned short audper;
161 unsigned short audvol;
162 unsigned short auddat;
163 unsigned short audspare[2];
164 } aud[4];
165 unsigned char *bplpt[8];
166 unsigned short bplcon0;
167 unsigned short bplcon1;
168 unsigned short bplcon2;
169 unsigned short bplcon3;
170 unsigned short bpl1mod;
171 unsigned short bpl2mod;
172 unsigned short bplcon4;
173 unsigned short clxcon2;
174 unsigned short bpldat[8];
175 unsigned char *sprpt[8];
176 struct {
177 unsigned short pos;
178 unsigned short ctl;
179 unsigned short dataa;
180 unsigned short datab;
181 } spr[8];
182 unsigned short color[32];
183 unsigned short htotal;
184 unsigned short hsstop;
185 unsigned short hbstrt;
186 unsigned short hbstop;
187 unsigned short vtotal;
188 unsigned short vsstop;
189 unsigned short vbstrt;
190 unsigned short vbstop;
191 unsigned short sprhstrt;
192 unsigned short sprhstop;
193 unsigned short bplhstrt;
194 unsigned short bplhstop;
195 unsigned short hhposw;
196 unsigned short hhposr;
197 unsigned short beamcon0;
198 unsigned short hsstrt;
199 unsigned short vsstrt;
200 unsigned short hcenter;
201 unsigned short diwhigh;
202 unsigned short spare4[11];
203 unsigned short fmode;
204 };
205
206
207
208
209 #define DMAF_SETCLR (0x8000)
210 #define DMAF_AUD0 (0x0001)
211 #define DMAF_AUD1 (0x0002)
212 #define DMAF_AUD2 (0x0004)
213 #define DMAF_AUD3 (0x0008)
214 #define DMAF_DISK (0x0010)
215 #define DMAF_SPRITE (0x0020)
216 #define DMAF_BLITTER (0x0040)
217 #define DMAF_COPPER (0x0080)
218 #define DMAF_RASTER (0x0100)
219 #define DMAF_MASTER (0x0200)
220 #define DMAF_BLITHOG (0x0400)
221 #define DMAF_BLTNZERO (0x2000)
222 #define DMAF_BLTDONE (0x4000)
223 #define DMAF_ALL (0x01FF)
224
225 struct CIA {
226 unsigned char pra; char pad0[0xff];
227 unsigned char prb; char pad1[0xff];
228 unsigned char ddra; char pad2[0xff];
229 unsigned char ddrb; char pad3[0xff];
230 unsigned char talo; char pad4[0xff];
231 unsigned char tahi; char pad5[0xff];
232 unsigned char tblo; char pad6[0xff];
233 unsigned char tbhi; char pad7[0xff];
234 unsigned char todlo; char pad8[0xff];
235 unsigned char todmid; char pad9[0xff];
236 unsigned char todhi; char pada[0x1ff];
237 unsigned char sdr; char padb[0xff];
238 unsigned char icr; char padc[0xff];
239 unsigned char cra; char padd[0xff];
240 unsigned char crb; char pade[0xff];
241 };
242
243 #define zTwoBase (0x80000000)
244 #define ZTWO_PADDR(x) (((unsigned long)(x))-zTwoBase)
245 #define ZTWO_VADDR(x) ((void __iomem *)(((unsigned long)(x))+zTwoBase))
246
247 #define CUSTOM_PHYSADDR (0xdff000)
248 #define amiga_custom ((*(volatile struct CUSTOM *)(zTwoBase+CUSTOM_PHYSADDR)))
249
250 #define CIAA_PHYSADDR (0xbfe001)
251 #define CIAB_PHYSADDR (0xbfd000)
252 #define ciaa ((*(volatile struct CIA *)(zTwoBase + CIAA_PHYSADDR)))
253 #define ciab ((*(volatile struct CIA *)(zTwoBase + CIAB_PHYSADDR)))
254
255 #define CHIP_PHYSADDR (0x000000)
256
257 void amiga_chip_init (void);
258 void *amiga_chip_alloc(unsigned long size, const char *name);
259 void *amiga_chip_alloc_res(unsigned long size, struct resource *res);
260 void amiga_chip_free(void *ptr);
261 unsigned long amiga_chip_avail( void );
262 extern volatile unsigned short amiga_audio_min_period;
263
264 static inline void amifb_video_off(void)
265 {
266 if (amiga_chipset == CS_ECS || amiga_chipset == CS_AGA) {
267
268 amiga_custom.htotal = 113;
269 amiga_custom.vtotal = 223;
270 amiga_custom.beamcon0 = 0x4390;
271
272 amiga_custom.hsstrt = amiga_custom.hsstop = 116;
273 amiga_custom.vsstrt = amiga_custom.vsstop = 226;
274 amiga_audio_min_period = 57;
275 }
276 }
277
278 struct tod3000 {
279 unsigned int :28, second2:4;
280 unsigned int :28, second1:4;
281 unsigned int :28, minute2:4;
282 unsigned int :28, minute1:4;
283 unsigned int :28, hour2:4;
284 unsigned int :28, hour1:4;
285 unsigned int :28, weekday:4;
286 unsigned int :28, day2:4;
287 unsigned int :28, day1:4;
288 unsigned int :28, month2:4;
289 unsigned int :28, month1:4;
290 unsigned int :28, year2:4;
291 unsigned int :28, year1:4;
292 unsigned int :28, cntrl1:4;
293 unsigned int :28, cntrl2:4;
294 unsigned int :28, cntrl3:4;
295 };
296 #define TOD3000_CNTRL1_HOLD 0
297 #define TOD3000_CNTRL1_FREE 9
298 #define tod_3000 ((*(volatile struct tod3000 *)(zTwoBase+0xDC0000)))
299
300 struct tod2000 {
301 unsigned int :28, second2:4;
302 unsigned int :28, second1:4;
303 unsigned int :28, minute2:4;
304 unsigned int :28, minute1:4;
305 unsigned int :28, hour2:4;
306 unsigned int :28, hour1:4;
307 unsigned int :28, day2:4;
308 unsigned int :28, day1:4;
309 unsigned int :28, month2:4;
310 unsigned int :28, month1:4;
311 unsigned int :28, year2:4;
312 unsigned int :28, year1:4;
313 unsigned int :28, weekday:4;
314 unsigned int :28, cntrl1:4;
315 unsigned int :28, cntrl2:4;
316 unsigned int :28, cntrl3:4;
317 };
318
319 #define TOD2000_CNTRL1_HOLD (1<<0)
320 #define TOD2000_CNTRL1_BUSY (1<<1)
321 #define TOD2000_CNTRL3_24HMODE (1<<2)
322 #define TOD2000_HOUR1_PM (1<<2)
323 #define tod_2000 ((*(volatile struct tod2000 *)(zTwoBase+0xDC0000)))
324
325 #endif