Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/pcmcia/cis/cis_params.c
+++ new/usr/src/uts/common/pcmcia/cis/cis_params.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * Copyright (c) 1995-1999 by Sun Microsystems, Inc.
24 24 * All rights reserved.
25 25 */
26 26
27 -#pragma ident "%Z%%M% %I% %E% SMI"
28 -
29 27 #include <sys/types.h>
30 28 #include <sys/systm.h>
31 29 #include <sys/user.h>
32 30 #include <sys/buf.h>
33 31 #include <sys/file.h>
34 32 #include <sys/uio.h>
35 33 #include <sys/conf.h>
36 34 #include <sys/stat.h>
37 35 #include <sys/autoconf.h>
38 36 #include <sys/vtoc.h>
39 37 #include <sys/dkio.h>
40 38 #include <sys/ddi.h>
41 39 #include <sys/sunddi.h>
42 40 #include <sys/ddi_impldefs.h>
43 41 #include <sys/kstat.h>
44 42 #include <sys/kmem.h>
45 43 #include <sys/modctl.h>
46 44 #include <sys/kobj.h>
47 45
48 46 #include <sys/pctypes.h>
49 47 #include <pcmcia/sys/cs_types.h>
50 48 #include <pcmcia/sys/cis.h>
51 49 #include <pcmcia/sys/cis_handlers.h>
52 50
53 51 /*
54 52 *
55 53 * The following speed tables are used by cistpl_devspeed() to generate
56 54 * device speeds from tuple data.
57 55 *
58 56 * Define the device speed table. For a description of this table's contents,
59 57 * see PCMCIA Release 2.01 Card Metaformat pg. 5-14 table 5-12.
60 58 *
61 59 * All times in this table are in nS.
62 60 */
63 61 uint32_t cistpl_devspeed_table[CISTPL_DEVSPEED_MAX_TBL] = {
64 62 0, /* 0x00 - DSPEED_NULL */
65 63 250, /* 0x01 - DSPEED_250NS */
66 64 200, /* 0x02 - DSPEED_200NS */
67 65 150, /* 0x03 - DSPEED_150NS */
68 66 100, /* 0x04 - DSPEED_100NS */
69 67 0, /* 0x05 - reserved */
70 68 0, /* 0x06 - reserved */
71 69 0 /* 0x07 - use extended speed byte */
72 70 };
73 71
74 72 /*
75 73 * Define the power-of-10 table.
76 74 */
77 75 uint32_t cistpl_exspeed_tenfac[] = {
78 76 1, /* 10^0 */
79 77 10, /* 10^1 */
80 78 100, /* 10^2 */
81 79 1000, /* 10^3 */
82 80 10000, /* 10^4 */
83 81 100000, /* 10^5 */
84 82 1000000, /* 10^6 */
85 83 10000000 /* 10^7 */
86 84 };
87 85
88 86 /*
89 87 * The extended device speed code mantissa table.
90 88 *
91 89 * This table is described in PCMCIA Release 2.01 Card Metaformat
92 90 * pg. 5-15 table 5-13.
93 91 *
94 92 * The description of this table uses non-integer values. We multiply
95 93 * everything by 10 before it goes into the table, and the code
96 94 * will divide by 10 after it calculates the device speed.
97 95 */
98 96 uint32_t cistpl_devspeed_man[CISTPL_DEVSPEED_MAX_MAN] = {
99 97 0, /* no units */
100 98 10, /* no units */
101 99 12, /* no units */
102 100 13, /* no units */
103 101 15, /* no units */
104 102 20, /* no units */
105 103 25, /* no units */
106 104 30, /* no units */
107 105 35, /* no units */
108 106 40, /* no units */
109 107 45, /* no units */
110 108 50, /* no units */
111 109 55, /* no units */
112 110 60, /* no units */
113 111 70, /* no units */
114 112 80, /* no units */
115 113 };
116 114
117 115 /*
118 116 * The extended device speed code exponent table.
119 117 *
120 118 * This table is described in PCMCIA Release 2.01 Card Metaformat
121 119 * pg. 5-15 table 5-13.
122 120 *
123 121 * The description of this table uses various timing units. This
124 122 * table contains all times in nS.
125 123 */
126 124 uint32_t cistpl_devspeed_exp[CISTPL_DEVSPEED_MAX_EXP] = {
127 125 1, /* 1 nS */
128 126 10, /* 10 nS */
129 127 100, /* 100 nS */
130 128 1000, /* 1000 nS */
131 129 10000, /* 10000 nS */
132 130 100000, /* 100000 nS */
133 131 1000000, /* 1000000 nS */
134 132 10000000 /* 10000000 nS */
135 133 };
136 134
137 135 /*
138 136 * The power description mantissa table.
139 137 *
140 138 * This table is described in PCMCIA Release 2.01 Card Metaformat
141 139 * pg. 5-28 table 5-32.
142 140 *
143 141 * The description of this table uses non-integer values. We multiply
144 142 * everything by 10 before it goes into the table, and the code
145 143 * will divide by 10 after it calculates the device power.
146 144 */
147 145 uint32_t cistpl_pd_man[] = {
148 146 10, /* no units */
149 147 12, /* no units */
150 148 13, /* no units */
151 149 15, /* no units */
152 150 20, /* no units */
153 151 25, /* no units */
154 152 30, /* no units */
155 153 35, /* no units */
156 154 40, /* no units */
157 155 45, /* no units */
158 156 50, /* no units */
159 157 55, /* no units */
160 158 60, /* no units */
161 159 70, /* no units */
162 160 80, /* no units */
163 161 90, /* no units */
164 162 };
165 163
166 164 /*
167 165 * The power description exponent table.
168 166 *
169 167 * This table is described in PCMCIA Release 2.01 Card Metaformat
170 168 * pg. 5-28 table 5-32.
171 169 *
172 170 * The description of this table uses various voltage and current units.
173 171 * This table contains all currents in nanoAMPS and all voltages
174 172 * in microVOLTS.
175 173 *
176 174 * Note if you're doing a current table lookup, you need to multiply
177 175 * the lookup value by ten.
178 176 */
179 177 uint32_t cistpl_pd_exp[] = {
180 178 10, /* 10 microVOLTS, 100 nanoAMPS */
181 179 100, /* 100 microVOLTS, 1000 nanoAMPS */
182 180 1000, /* 1000 microVOLTS, 10000 nanoAMPS */
183 181 10000, /* 10000 microVOLTS, 100000 nanoAMPS */
184 182 100000, /* 100000 microVOLTS, 1000000 nanoAMPS */
185 183 1000000, /* 1000000 microVOLTS, 10000000 nanoAMPS */
186 184 10000000, /* 10000000 microVOLTS, 100000000 nanoAMPS */
187 185 100000000 /* 100000000 microVOLTS, 1000000000 nanoAMPS */
188 186 };
189 187
190 188 /*
191 189 * Fill out the structure pointers.
192 190 */
193 191 cistpl_devspeed_struct_t cistpl_devspeed_struct = {
194 192 cistpl_devspeed_table,
195 193 cistpl_exspeed_tenfac,
196 194 cistpl_devspeed_man,
197 195 cistpl_devspeed_exp,
198 196 };
199 197
200 198 cistpl_pd_struct_t cistpl_pd_struct = {
201 199 cistpl_pd_man,
202 200 cistpl_pd_exp,
203 201 };
204 202
205 203 /*
206 204 * Some handy lookup tables that should probably eventually be
207 205 * done away with.
208 206 *
209 207 * These are used mostly by the CISTPL_CFTABLE_ENTRY tuple handler.
210 208 */
211 209 uint32_t cistpl_cftable_io_size_table[] = {
212 210 0,
213 211 1,
214 212 2,
215 213 4,
216 214 };
217 215
218 216 uint32_t cistpl_cftable_shift_table[] = {
219 217 0,
220 218 8,
↓ open down ↓ |
182 lines elided |
↑ open up ↑ |
221 219 16,
222 220 24,
223 221 };
224 222
225 223 /*
226 224 * List of tuples in the global CIS to ignore if they show
227 225 * up in both the global and function-specific CIS lists.
228 226 * This list MUST end with CISTPL_NULL.
229 227 */
230 228 cistpl_ignore_list_t cistpl_ignore_list[] = {
231 - CISTPL_FUNCID,
232 - CISTPL_FUNCE,
233 - CISTPL_CONFIG,
234 - CISTPL_CFTABLE_ENTRY,
235 - CISTPL_NULL /* list must end with CISTPL_NULL */
229 + { CISTPL_FUNCID },
230 + { CISTPL_FUNCE },
231 + { CISTPL_CONFIG },
232 + { CISTPL_CFTABLE_ENTRY },
233 + { CISTPL_NULL } /* list must end with CISTPL_NULL */
236 234 };
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX