Import 2.1.116pre2
[davej-history.git] / include / asm-m68k / machw.h
blob90ff6b62771a1ddee1f8d71ea495f4a29167f120
1 /*
2 ** linux/machw.h -- This header defines some macros and pointers for
3 ** the various Macintosh custom hardware registers.
4 **
5 ** Copyright 1997 by Michael Schmitz
6 **
7 ** This file is subject to the terms and conditions of the GNU General Public
8 ** License. See the file COPYING in the main directory of this archive
9 ** for more details.
13 #ifndef _ASM_MACHW_H_
14 #define _ASM_MACHW_H_
16 #include <linux/types.h>
18 /* Mac SCSI Controller 5380 */
20 #define MAC_5380_BAS (0x50F10000) /* This is definitely wrong!! */
21 struct MAC_5380 {
22 u_char scsi_data;
23 u_char char_dummy1;
24 u_char scsi_icr;
25 u_char char_dummy2;
26 u_char scsi_mode;
27 u_char char_dummy3;
28 u_char scsi_tcr;
29 u_char char_dummy4;
30 u_char scsi_idstat;
31 u_char char_dummy5;
32 u_char scsi_dmastat;
33 u_char char_dummy6;
34 u_char scsi_targrcv;
35 u_char char_dummy7;
36 u_char scsi_inircv;
38 #define mac_scsi ((*(volatile struct MAC_5380 *)MAC_5380_BAS))
41 ** SCC Z8530
44 #define MAC_SCC_BAS (0x50F04000)
45 struct MAC_SCC
47 u_char cha_a_ctrl;
48 u_char char_dummy1;
49 u_char cha_a_data;
50 u_char char_dummy2;
51 u_char cha_b_ctrl;
52 u_char char_dummy3;
53 u_char cha_b_data;
55 # define mac_scc ((*(volatile struct SCC*)MAC_SCC_BAS))
58 ** VIA 6522
61 #define VIA1_BAS (0x50F00000)
62 #define VIA2_BAS (0x50F02000)
63 #define VIA2_BAS_IIci (0x50F26000)
64 struct VIA
66 u_char buf_b;
67 u_char dummy1[0x199];
68 u_char buf_a;
69 u_char dummy2[0x199];
70 u_char dir_b;
71 u_char dummy3[0x199];
72 u_char dir_a;
73 u_char dummy4[0x199];
74 u_char timer1_cl;
75 u_char dummy5[0x199];
76 u_char timer1_ch;
77 u_char dummy6[0x199];
78 u_char timer1_ll;
79 u_char dummy7[0x199];
80 u_char timer1_lh;
81 u_char dummy8[0x199];
82 u_char timer2_cl;
83 u_char dummy9[0x199];
84 u_char timer2_ch;
85 u_char dummy10[0x199];
86 u_char sr;
87 u_char dummy11[0x199];
88 u_char acr;
89 u_char dummy12[0x199];
90 u_char pcr;
91 u_char dummy13[0x199];
92 u_char int_fl;
93 u_char dummy14[0x199];
94 u_char int_en;
95 u_char dummy15[0x199];
96 u_char anr;
97 u_char dummy16[0x199];
100 # define via_1 ((*(volatile struct VIA *)VIA1_BAS))
101 # define via_2 ((*(volatile struct VIA *)VIA2_BAS))
102 # define via1_regp ((volatile unsigned char *)VIA1_BAS)
105 * OSS/RBV base address
108 #define OSS_BAS 0x50f1a000
109 #define PSC_BAS 0x50f31000
111 /* move to oss.h?? */
112 #define nIFR 0x203
113 #define oIFR 0x202
116 /* hardware stuff */
118 #define MACHW_DECLARE(name) unsigned name : 1
119 #define MACHW_SET(name) (mac_hw_present.name = 1)
120 #define MACHW_PRESENT(name) (mac_hw_present.name)
122 struct {
123 /* video hardware */
124 /* sound hardware */
125 /* disk storage interfaces */
126 MACHW_DECLARE(MAC_SCSI_80); /* Directly mapped NCR5380 */
127 MACHW_DECLARE(MAC_SCSI_96); /* 53c9[46] */
128 MACHW_DECLARE(MAC_SCSI_96_2); /* 2nd 53c9[46] Q900 and Q950 */
129 MACHW_DECLARE(IDE); /* IDE Interface */
130 /* other I/O hardware */
131 MACHW_DECLARE(SCC); /* Serial Communications Contr. */
132 /* DMA */
133 MACHW_DECLARE(SCSI_DMA); /* DMA for the NCR5380 */
134 /* real time clocks */
135 MACHW_DECLARE(RTC_CLK); /* clock chip */
136 /* supporting hardware */
137 MACHW_DECLARE(VIA1); /* Versatile Interface Ad. 1 */
138 MACHW_DECLARE(VIA2); /* Versatile Interface Ad. 2 */
139 MACHW_DECLARE(RBV); /* Versatile Interface Ad. 2+ */
140 /* NUBUS */
141 MACHW_DECLARE(NUBUS); /* NUBUS */
142 } mac_hw_present;
144 /* extern struct mac_hw_present mac_hw_present; */
146 #endif /* linux/machw.h */