Annotation of sys/arch/mac68k/include/iop.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: iop.h,v 1.1 2006/01/22 13:53:16 miod Exp $ */
2: /* $NetBSD: iopreg.h,v 1.7 2005/12/11 12:18:03 christos Exp $ */
3:
4: /*
5: * Copyright (c) 2000 Allen Briggs.
6: * All rights reserved.
7: *
8: * Redistribution and use in source and binary forms, with or without
9: * modification, are permitted provided that the following conditions
10: * are met:
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: * 2. Redistributions in binary form must reproduce the above copyright
14: * notice, this list of conditions and the following disclaimer in the
15: * documentation and/or other materials provided with the distribution.
16: * 3. The name of the author may not be used to endorse or promote products
17: * derived from this software without specific prior written permission.
18: *
19: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29: */
30:
31: #define SCC_IOP 0
32: #define ISM_IOP 1
33:
34: #define IOP_CS_BYPASS 0x01
35: #define IOP_CS_AUTOINC 0x02
36: #define IOP_CS_RUN 0x04
37: #define IOP_CS_IRQ 0x08
38: #define IOP_CS_INT0 0x10
39: #define IOP_CS_INT1 0x20
40: #define IOP_CS_HWINT 0x40
41: #define IOP_CS_DMAINACT 0x80
42:
43: #define IOP_RESET (IOP_CS_DMAINACT | IOP_CS_AUTOINC)
44: #define IOP_BYPASS \
45: (IOP_CS_BYPASS | IOP_CS_AUTOINC | IOP_CS_RUN | IOP_CS_DMAINACT)
46: #define IOP_INTERRUPT (IOP_CS_INT0 | IOP_CS_INT1)
47:
48: typedef struct {
49: volatile u_char ram_hi;
50: u_char pad0;
51: volatile u_char ram_lo;
52: u_char pad1;
53: volatile u_char control_status;
54: u_char pad2[3];
55: volatile u_char data;
56: u_char pad3[23];
57: union {
58: struct {
59: volatile u_char sccb_cmd;
60: u_char pad0;
61: volatile u_char scca_cmd;
62: u_char pad1;
63: volatile u_char sccb_data;
64: u_char pad2;
65: volatile u_char scca_data;
66: u_char pad3;
67: } scc;
68: struct {
69: volatile u_char wdata;
70: u_char pad0;
71: /* etc... */
72: } iwm;
73: } bypass;
74: } IOPHW;
75:
76: void iop_serial_compatible(void);
CVSweb