ioplanarvar.h revision 1.1 1 1.1 garbled /*-
2 1.1 garbled * Copyright (c) 2007 The NetBSD Foundation, Inc.
3 1.1 garbled * All rights reserved.
4 1.1 garbled *
5 1.1 garbled * This code is derived from software contributed to The NetBSD Foundation
6 1.1 garbled * by Tim Rightnour
7 1.1 garbled *
8 1.1 garbled * Redistribution and use in source and binary forms, with or without
9 1.1 garbled * modification, are permitted provided that the following conditions
10 1.1 garbled * are met:
11 1.1 garbled * 1. Redistributions of source code must retain the above copyright
12 1.1 garbled * notice, this list of conditions and the following disclaimer.
13 1.1 garbled * 2. Redistributions in binary form must reproduce the above copyright
14 1.1 garbled * notice, this list of conditions and the following disclaimer in the
15 1.1 garbled * documentation and/or other materials provided with the distribution.
16 1.1 garbled * 3. All advertising materials mentioning features or use of this software
17 1.1 garbled * must display the following acknowledgement:
18 1.1 garbled * This product includes software developed by the NetBSD
19 1.1 garbled * Foundation, Inc. and its contributors.
20 1.1 garbled * 4. Neither the name of The NetBSD Foundation nor the names of its
21 1.1 garbled * contributors may be used to endorse or promote products derived
22 1.1 garbled * from this software without specific prior written permission.
23 1.1 garbled *
24 1.1 garbled * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
25 1.1 garbled * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 1.1 garbled * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 1.1 garbled * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
28 1.1 garbled * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 1.1 garbled * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 1.1 garbled * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 1.1 garbled * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 1.1 garbled * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 1.1 garbled * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 1.1 garbled * POSSIBILITY OF SUCH DAMAGE.
35 1.1 garbled */
36 1.1 garbled
37 1.1 garbled #ifndef _RS6000_IOPLANAR_H_
38 1.1 garbled #define _RS6000_IOPLANAR_H_
39 1.1 garbled
40 1.1 garbled #include <machine/bus.h>
41 1.1 garbled #include <machine/mca_machdep.h>
42 1.1 garbled
43 1.1 garbled /*
44 1.1 garbled * Driver attach args
45 1.1 garbled */
46 1.1 garbled struct ioplanar_dev_attach_args {
47 1.1 garbled bus_space_tag_t idaa_iot; /* I/O space tag */
48 1.1 garbled bus_space_tag_t idaa_memt; /* MEM space tag */
49 1.1 garbled mca_chipset_tag_t idaa_mc;
50 1.1 garbled bus_dma_tag_t idaa_dmat; /* DMA tag */
51 1.1 garbled
52 1.1 garbled uint16_t idaa_devid; /* devid of the ioplanar */
53 1.1 garbled int idaa_device; /* devnum from below defines */
54 1.1 garbled };
55 1.1 garbled
56 1.1 garbled /* Master bus */
57 1.1 garbled struct ioplanar_softc {
58 1.1 garbled struct device sc_dev;
59 1.1 garbled mca_chipset_tag_t sc_ic;
60 1.1 garbled bus_space_tag_t sc_iot;
61 1.1 garbled bus_space_tag_t sc_memt;
62 1.1 garbled bus_dma_tag_t sc_dmat;
63 1.1 garbled uint16_t sc_devid; /* devid of the ioplanar */
64 1.1 garbled };
65 1.1 garbled
66 1.1 garbled /*
67 1.1 garbled * These are the defines for the various devices we might find on an
68 1.1 garbled * ioplanar. Because this is not a real bus, we have to basically tell
69 1.1 garbled * autoconf what we are looking for specifically, so it can find it. Each
70 1.1 garbled * ioplanar has a specific set of devices that live on it, and those will
71 1.1 garbled * appear in a table.
72 1.1 garbled */
73 1.1 garbled
74 1.1 garbled #define IOP_COM0 1
75 1.1 garbled #define IOP_COM1 2
76 1.1 garbled #define IOP_COM0_2 3
77 1.1 garbled #define IOP_COM1_2 4
78 1.1 garbled #define IOP_COM0_3 5
79 1.1 garbled #define IOP_COM1_3 6
80 1.1 garbled #define IOP_COM2_3 7
81 1.1 garbled #define IOP_MOUSE 10
82 1.1 garbled #define IOP_KBD 11
83 1.1 garbled #define IOP_TABLET 12
84 1.1 garbled #define IOP_KBD_2 13
85 1.1 garbled #define IOP_TABLET_2 14
86 1.1 garbled #define IOP_LPD 20
87 1.1 garbled #define IOP_LPD_2 21
88 1.1 garbled #define IOP_FDC 30
89 1.1 garbled #define IOP_FDC_2 31
90 1.1 garbled #define IOP_FDC_3 32
91 1.1 garbled
92 1.1 garbled /*
93 1.1 garbled * The RS6000 defines a set of minimum IO configuration ports. These are
94 1.1 garbled * basic services like serial, parallel, scsi, etc. Per the definition, all
95 1.1 garbled * machines must respond on these ports for these services.
96 1.1 garbled */
97 1.1 garbled
98 1.1 garbled #define RSI_COM0 0x30
99 1.1 garbled #define RSI_COM0_LEN 8
100 1.1 garbled #define RSI_COM1 0x38
101 1.1 garbled #define RSI_COM1_LEN 8
102 1.1 garbled #define RSI_COM_DMA 0x40
103 1.1 garbled #define RSI_COM_DMA_LEN 1
104 1.1 garbled #define RSI_MOUSE 0x48
105 1.1 garbled #define RSI_MOUSE_LEN 8
106 1.1 garbled #define RSI_KBD 0x50
107 1.1 garbled #define RSI_KBD_LEN 10
108 1.1 garbled #define RSI_FLOPPY 0x60
109 1.1 garbled #define RSI_FLOPPY_LEN 9
110 1.1 garbled #define RSI_TABLET 0x70
111 1.1 garbled #define RSI_TABLEN_LEN 8
112 1.1 garbled #define RSI_PARALLEL 0x78
113 1.1 garbled #define RSI_PARALLEL_LEN 7
114 1.1 garbled #define RSI_SCSI 0x7f
115 1.1 garbled #define RSI_SCSI_LEN 96
116 1.1 garbled #define RSI_LAN 0xf0
117 1.1 garbled #define RSI_LAN_LEN 11
118 1.1 garbled
119 1.1 garbled #endif /* _RS6000_IOPLANAR_H_ */
120