summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/tc/tc_bus_io.c
blob: 5bd03d0254ed7d639bcce7e2901bf15da7812ad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
/*	$NetBSD: tc_bus_io.c,v 1.1.4.1 1996/06/13 17:41:51 cgd Exp $	*/

/*
 * Copyright (c) 1996 Carnegie-Mellon University.
 * All rights reserved.
 *
 * Author: Chris G. Demetriou
 * 
 * Permission to use, copy, modify and distribute this software and
 * its documentation is hereby granted, provided that both the copyright
 * notice and this permission notice appear in all copies of the
 * software, derivative works or modified versions, and any portions
 * thereof, and that both notices appear in supporting documentation.
 * 
 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 
 * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 
 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
 * 
 * Carnegie Mellon requests users of this software to return to
 *
 *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
 *  School of Computer Science
 *  Carnegie Mellon University
 *  Pittsburgh PA 15213-3890
 *
 * any improvements or extensions that they make and grant Carnegie the
 * rights to redistribute these changes.
 */

/*
 * TurboChannel "bus I/O" functions:
 * These functions make no sense for TC, and just panic.
 */

#include <sys/param.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
#include <sys/device.h>
#include <vm/vm.h>

#include <machine/bus.h>

int		tc_io_map __P((void *, bus_io_addr_t, bus_io_size_t,
		    bus_io_handle_t *));
void		tc_io_unmap __P((void *, bus_io_handle_t,
		    bus_io_size_t));
int		tc_io_subregion __P((void *, bus_io_handle_t, bus_io_size_t,
		    bus_io_size_t, bus_io_handle_t *));
u_int8_t	tc_io_read_1 __P((void *, bus_io_handle_t,
		    bus_io_size_t));
u_int16_t	tc_io_read_2 __P((void *, bus_io_handle_t,
		    bus_io_size_t));
u_int32_t	tc_io_read_4 __P((void *, bus_io_handle_t,
		    bus_io_size_t));
u_int64_t	tc_io_read_8 __P((void *, bus_io_handle_t,
		    bus_io_size_t));
void		tc_io_read_multi_1 __P((void *, bus_io_handle_t,
		    bus_io_size_t, u_int8_t *, bus_io_size_t));
void		tc_io_read_multi_2 __P((void *, bus_io_handle_t,
		    bus_io_size_t, u_int16_t *, bus_io_size_t));
void		tc_io_read_multi_4 __P((void *, bus_io_handle_t,
		    bus_io_size_t, u_int32_t *, bus_io_size_t));
void		tc_io_read_multi_8 __P((void *, bus_io_handle_t,
		    bus_io_size_t, u_int64_t *, bus_io_size_t));
void		tc_io_write_1 __P((void *, bus_io_handle_t,
		    bus_io_size_t, u_int8_t));
void		tc_io_write_2 __P((void *, bus_io_handle_t,
		    bus_io_size_t, u_int16_t));
void		tc_io_write_4 __P((void *, bus_io_handle_t,
		    bus_io_size_t, u_int32_t));
void		tc_io_write_8 __P((void *, bus_io_handle_t,
		    bus_io_size_t, u_int64_t));
void		tc_io_write_multi_1 __P((void *, bus_io_handle_t,
		    bus_io_size_t, const u_int8_t *, bus_io_size_t));
void		tc_io_write_multi_2 __P((void *, bus_io_handle_t,
		    bus_io_size_t, const u_int16_t *, bus_io_size_t));
void		tc_io_write_multi_4 __P((void *, bus_io_handle_t,
		    bus_io_size_t, const u_int32_t *, bus_io_size_t));
void		tc_io_write_multi_8 __P((void *, bus_io_handle_t,
		    bus_io_size_t, const u_int64_t *, bus_io_size_t));

void
tc_bus_io_init(bc, iov)
	bus_chipset_tag_t bc;
	void *iov;
{

	bc->bc_i_v = iov;

	bc->bc_i_map = tc_io_map;
	bc->bc_i_unmap = tc_io_unmap;
	bc->bc_i_subregion = tc_io_subregion;

	bc->bc_ir1 = tc_io_read_1;
	bc->bc_ir2 = tc_io_read_2;
	bc->bc_ir4 = tc_io_read_4;
	bc->bc_ir8 = tc_io_read_8;

	bc->bc_irm1 = tc_io_read_multi_1;
	bc->bc_irm2 = tc_io_read_multi_2;
	bc->bc_irm4 = tc_io_read_multi_4;
	bc->bc_irm8 = tc_io_read_multi_8;

	bc->bc_iw1 = tc_io_write_1;
	bc->bc_iw2 = tc_io_write_2;
	bc->bc_iw4 = tc_io_write_4;
	bc->bc_iw8 = tc_io_write_8;

	bc->bc_iwm1 = tc_io_write_multi_1;
	bc->bc_iwm2 = tc_io_write_multi_2;
	bc->bc_iwm4 = tc_io_write_multi_4;
	bc->bc_iwm8 = tc_io_write_multi_8;
}

static const char *tc_bus_io_panicstr = "tc_io_%s nonsensical; unimplemented";

int
tc_io_map(v, ioaddr, iosize, iohp)
	void *v;
	bus_io_addr_t ioaddr;
	bus_io_size_t iosize;
	bus_io_handle_t *iohp;
{

	panic(tc_bus_io_panicstr, "map");
}

void
tc_io_unmap(v, ioh, iosize)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t iosize;
{

	panic(tc_bus_io_panicstr, "unmap");
}

int
tc_io_subregion(v, ioh, offset, size, nioh)
	void *v;
	bus_io_handle_t ioh, *nioh;
	bus_io_size_t offset, size;
{

	panic(tc_bus_io_panicstr, "subregion");
}

u_int8_t
tc_io_read_1(v, ioh, off)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off;
{

	panic(tc_bus_io_panicstr, "read_1");
}

u_int16_t
tc_io_read_2(v, ioh, off)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off;
{

	panic(tc_bus_io_panicstr, "read_2");
}

u_int32_t
tc_io_read_4(v, ioh, off)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off;
{

	panic(tc_bus_io_panicstr, "read_4");
}

u_int64_t
tc_io_read_8(v, ioh, off)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off;
{

	panic(tc_bus_io_panicstr, "read_8");
}

void
tc_io_read_multi_1(v, ioh, off, addr, count)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off, count;
	u_int8_t *addr;
{

	panic(tc_bus_io_panicstr, "read_multi_1");
}

void
tc_io_read_multi_2(v, ioh, off, addr, count)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off, count;
	u_int16_t *addr;
{

	panic(tc_bus_io_panicstr, "read_multi_2");
}

void
tc_io_read_multi_4(v, ioh, off, addr, count)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off, count;
	u_int32_t *addr;
{

	panic(tc_bus_io_panicstr, "read_multi_4");
}

void
tc_io_read_multi_8(v, ioh, off, addr, count)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off, count;
	u_int64_t *addr;
{

	panic(tc_bus_io_panicstr, "read_multi_8");
}

void
tc_io_write_1(v, ioh, off, val)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off;
	u_int8_t val;
{

	panic(tc_bus_io_panicstr, "write_1");
}

void
tc_io_write_2(v, ioh, off, val)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off;
	u_int16_t val;
{

	panic(tc_bus_io_panicstr, "write_2");
}

void
tc_io_write_4(v, ioh, off, val)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off;
	u_int32_t val;
{

	panic(tc_bus_io_panicstr, "write_4");
}

void
tc_io_write_8(v, ioh, off, val)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off;
	u_int64_t val;
{

	panic(tc_bus_io_panicstr, "write_8");
}

void
tc_io_write_multi_1(v, ioh, off, addr, count)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off, count;
	const u_int8_t *addr;
{

	panic(tc_bus_io_panicstr, "write_multi_1");
}

void
tc_io_write_multi_2(v, ioh, off, addr, count)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off, count;
	const u_int16_t *addr;
{

	panic(tc_bus_io_panicstr, "write_multi_2");
}

void
tc_io_write_multi_4(v, ioh, off, addr, count)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off, count;
	const u_int32_t *addr;
{

	panic(tc_bus_io_panicstr, "write_multi_4");
}

void
tc_io_write_multi_8(v, ioh, off, addr, count)
	void *v;
	bus_io_handle_t ioh;
	bus_io_size_t off, count;
	const u_int64_t *addr;
{

	panic(tc_bus_io_panicstr, "write_multi_8");
}