com_hpcio.c revision 1.2.4.2 1 1.2.4.2 nathanw /* $NetBSD: com_hpcio.c,v 1.2.4.2 2002/01/11 23:38:23 nathanw Exp $ */
2 1.2.4.2 nathanw
3 1.2.4.2 nathanw /*-
4 1.2.4.2 nathanw * Copyright (c) 2002 TAKEMRUA Shin. All rights reserved.
5 1.2.4.2 nathanw *
6 1.2.4.2 nathanw * Redistribution and use in source and binary forms, with or without
7 1.2.4.2 nathanw * modification, are permitted provided that the following conditions
8 1.2.4.2 nathanw * are met:
9 1.2.4.2 nathanw * 1. Redistributions of source code must retain the above copyright
10 1.2.4.2 nathanw * notice, this list of conditions and the following disclaimer.
11 1.2.4.2 nathanw * 2. Redistributions in binary form must reproduce the above copyright
12 1.2.4.2 nathanw * notice, this list of conditions and the following disclaimer in the
13 1.2.4.2 nathanw * documentation and/or other materials provided with the distribution.
14 1.2.4.2 nathanw * 3. Neither the name of the project nor the names of its contributors
15 1.2.4.2 nathanw * may be used to endorse or promote products derived from this software
16 1.2.4.2 nathanw * without specific prior written permission.
17 1.2.4.2 nathanw *
18 1.2.4.2 nathanw * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 1.2.4.2 nathanw * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 1.2.4.2 nathanw * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 1.2.4.2 nathanw * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 1.2.4.2 nathanw * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 1.2.4.2 nathanw * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 1.2.4.2 nathanw * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 1.2.4.2 nathanw * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 1.2.4.2 nathanw * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 1.2.4.2 nathanw * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 1.2.4.2 nathanw * SUCH DAMAGE.
29 1.2.4.2 nathanw *
30 1.2.4.2 nathanw */
31 1.2.4.2 nathanw
32 1.2.4.2 nathanw #include "opt_kgdb.h"
33 1.2.4.2 nathanw
34 1.2.4.2 nathanw #include <sys/param.h>
35 1.2.4.2 nathanw #include <sys/systm.h>
36 1.2.4.2 nathanw #include <sys/device.h>
37 1.2.4.2 nathanw #include <sys/reboot.h>
38 1.2.4.2 nathanw #include <sys/termios.h>
39 1.2.4.2 nathanw
40 1.2.4.2 nathanw #include <machine/intr.h>
41 1.2.4.2 nathanw #include <machine/bus.h>
42 1.2.4.2 nathanw #include <machine/platid.h>
43 1.2.4.2 nathanw #include <machine/platid_mask.h>
44 1.2.4.2 nathanw
45 1.2.4.2 nathanw #include <hpcmips/dev/com_hpciovar.h>
46 1.2.4.2 nathanw
47 1.2.4.2 nathanw #include <dev/hpc/hpciovar.h>
48 1.2.4.2 nathanw #include <dev/ic/comvar.h>
49 1.2.4.2 nathanw #include <dev/ic/comreg.h>
50 1.2.4.2 nathanw
51 1.2.4.2 nathanw #include "locators.h"
52 1.2.4.2 nathanw
53 1.2.4.2 nathanw #define COM_HPCIODEBUG
54 1.2.4.2 nathanw #ifdef COM_HPCIODEBUG
55 1.2.4.2 nathanw int com_hpcio_debug = 0;
56 1.2.4.2 nathanw #define DPRINTF(arg...) do { if (com_hpcio_debug) printf(arg); } while (0)
57 1.2.4.2 nathanw #else
58 1.2.4.2 nathanw #define DPRINTF(arg...) do {} while (0)
59 1.2.4.2 nathanw #endif
60 1.2.4.2 nathanw
61 1.2.4.2 nathanw #define COM_HPCIO_BYTE_ALIGNMENT 0
62 1.2.4.2 nathanw #define COM_HPCIO_HALFWORD_ALIGNMENT 1
63 1.2.4.2 nathanw
64 1.2.4.2 nathanw struct com_hpcio_softc {
65 1.2.4.2 nathanw struct com_softc hsc_com;
66 1.2.4.2 nathanw struct bus_space_tag hsc_iot;
67 1.2.4.2 nathanw struct hpcio_chip *hsc_hc;
68 1.2.4.2 nathanw };
69 1.2.4.2 nathanw static struct bus_space_tag com_hpcio_cniotx;
70 1.2.4.2 nathanw static bus_space_tag_t com_hpcio_cniot = &com_hpcio_cniotx;
71 1.2.4.2 nathanw static int com_hpcio_cniobase;
72 1.2.4.2 nathanw
73 1.2.4.2 nathanw static int com_hpcio_probe(struct device *, struct cfdata *, void *);
74 1.2.4.2 nathanw static void com_hpcio_attach(struct device *, struct device *, void *);
75 1.2.4.2 nathanw static int com_hpcio_common_probe(bus_space_tag_t, int, int *);
76 1.2.4.2 nathanw void com_hpcio_iot_init(bus_space_tag_t iot, bus_space_tag_t base);
77 1.2.4.2 nathanw bus_space_protos(bs_notimpl);
78 1.2.4.2 nathanw bus_space_protos(bs_through);
79 1.2.4.2 nathanw bus_space_protos(com_hpcio);
80 1.2.4.2 nathanw
81 1.2.4.2 nathanw struct cfattach com_hpcio_ca = {
82 1.2.4.2 nathanw sizeof(struct com_hpcio_softc), com_hpcio_probe, com_hpcio_attach
83 1.2.4.2 nathanw };
84 1.2.4.2 nathanw
85 1.2.4.2 nathanw struct bus_space_ops com_hpcio_bs_ops = {
86 1.2.4.2 nathanw /* mapping/unmapping */
87 1.2.4.2 nathanw bs_through_bs_map,
88 1.2.4.2 nathanw bs_through_bs_unmap,
89 1.2.4.2 nathanw bs_through_bs_subregion,
90 1.2.4.2 nathanw
91 1.2.4.2 nathanw /* allocation/deallocation */
92 1.2.4.2 nathanw bs_through_bs_alloc,
93 1.2.4.2 nathanw bs_through_bs_free,
94 1.2.4.2 nathanw
95 1.2.4.2 nathanw /* get kernel virtual address */
96 1.2.4.2 nathanw bs_through_bs_vaddr, /* there is no linear mapping */
97 1.2.4.2 nathanw
98 1.2.4.2 nathanw /* Mmap bus space for user */
99 1.2.4.2 nathanw bs_through_bs_mmap,
100 1.2.4.2 nathanw
101 1.2.4.2 nathanw /* barrier */
102 1.2.4.2 nathanw bs_through_bs_barrier,
103 1.2.4.2 nathanw
104 1.2.4.2 nathanw /* read (single) */
105 1.2.4.2 nathanw com_hpcio_bs_r_1,
106 1.2.4.2 nathanw bs_notimpl_bs_r_2,
107 1.2.4.2 nathanw bs_notimpl_bs_r_4,
108 1.2.4.2 nathanw bs_notimpl_bs_r_8,
109 1.2.4.2 nathanw
110 1.2.4.2 nathanw /* read multiple */
111 1.2.4.2 nathanw bs_notimpl_bs_rm_1,
112 1.2.4.2 nathanw bs_notimpl_bs_rm_2,
113 1.2.4.2 nathanw bs_notimpl_bs_rm_4,
114 1.2.4.2 nathanw bs_notimpl_bs_rm_8,
115 1.2.4.2 nathanw
116 1.2.4.2 nathanw /* read region */
117 1.2.4.2 nathanw bs_notimpl_bs_rr_1,
118 1.2.4.2 nathanw bs_notimpl_bs_rr_2,
119 1.2.4.2 nathanw bs_notimpl_bs_rr_4,
120 1.2.4.2 nathanw bs_notimpl_bs_rr_8,
121 1.2.4.2 nathanw
122 1.2.4.2 nathanw /* write (single) */
123 1.2.4.2 nathanw com_hpcio_bs_w_1,
124 1.2.4.2 nathanw bs_notimpl_bs_w_2,
125 1.2.4.2 nathanw bs_notimpl_bs_w_4,
126 1.2.4.2 nathanw bs_notimpl_bs_w_8,
127 1.2.4.2 nathanw
128 1.2.4.2 nathanw /* write multiple */
129 1.2.4.2 nathanw com_hpcio_bs_wm_1,
130 1.2.4.2 nathanw bs_notimpl_bs_wm_2,
131 1.2.4.2 nathanw bs_notimpl_bs_wm_4,
132 1.2.4.2 nathanw bs_notimpl_bs_wm_8,
133 1.2.4.2 nathanw
134 1.2.4.2 nathanw /* write region */
135 1.2.4.2 nathanw bs_notimpl_bs_wr_1,
136 1.2.4.2 nathanw bs_notimpl_bs_wr_2,
137 1.2.4.2 nathanw bs_notimpl_bs_wr_4,
138 1.2.4.2 nathanw bs_notimpl_bs_wr_8,
139 1.2.4.2 nathanw
140 1.2.4.2 nathanw #ifdef BUS_SPACE_HAS_REAL_STREAM_METHODS
141 1.2.4.2 nathanw /* read stream (single) */
142 1.2.4.2 nathanw bs_notimpl_bs_rs_1,
143 1.2.4.2 nathanw bs_notimpl_bs_rs_2,
144 1.2.4.2 nathanw bs_notimpl_bs_rs_4,
145 1.2.4.2 nathanw bs_notimpl_bs_rs_8,
146 1.2.4.2 nathanw
147 1.2.4.2 nathanw /* read multiple stream */
148 1.2.4.2 nathanw bs_notimpl_bs_rms_1,
149 1.2.4.2 nathanw bs_notimpl_bs_rms_2,
150 1.2.4.2 nathanw bs_notimpl_bs_rms_4,
151 1.2.4.2 nathanw bs_notimpl_bs_rms_8,
152 1.2.4.2 nathanw
153 1.2.4.2 nathanw /* read region stream */
154 1.2.4.2 nathanw bs_notimpl_bs_rrs_1,
155 1.2.4.2 nathanw bs_notimpl_bs_rrs_2,
156 1.2.4.2 nathanw bs_notimpl_bs_rrs_4,
157 1.2.4.2 nathanw bs_notimpl_bs_rrs_8,
158 1.2.4.2 nathanw
159 1.2.4.2 nathanw /* write stream (single) */
160 1.2.4.2 nathanw bs_notimpl_bs_ws_1,
161 1.2.4.2 nathanw bs_notimpl_bs_ws_2,
162 1.2.4.2 nathanw bs_notimpl_bs_ws_4,
163 1.2.4.2 nathanw bs_notimpl_bs_ws_8,
164 1.2.4.2 nathanw
165 1.2.4.2 nathanw /* write multiple stream */
166 1.2.4.2 nathanw bs_notimpl_bs_wms_1,
167 1.2.4.2 nathanw bs_notimpl_bs_wms_2,
168 1.2.4.2 nathanw bs_notimpl_bs_wms_4,
169 1.2.4.2 nathanw bs_notimpl_bs_wms_8,
170 1.2.4.2 nathanw
171 1.2.4.2 nathanw /* write region stream */
172 1.2.4.2 nathanw bs_notimpl_bs_wrs_1,
173 1.2.4.2 nathanw bs_notimpl_bs_wrs_2,
174 1.2.4.2 nathanw bs_notimpl_bs_wrs_4,
175 1.2.4.2 nathanw bs_notimpl_bs_wrs_8,
176 1.2.4.2 nathanw #endif /* BUS_SPACE_HAS_REAL_STREAM_METHODS */
177 1.2.4.2 nathanw
178 1.2.4.2 nathanw /* set multi */
179 1.2.4.2 nathanw bs_notimpl_bs_sm_1,
180 1.2.4.2 nathanw bs_notimpl_bs_sm_2,
181 1.2.4.2 nathanw bs_notimpl_bs_sm_4,
182 1.2.4.2 nathanw bs_notimpl_bs_sm_8,
183 1.2.4.2 nathanw
184 1.2.4.2 nathanw /* set region */
185 1.2.4.2 nathanw bs_notimpl_bs_sr_1,
186 1.2.4.2 nathanw bs_notimpl_bs_sr_2,
187 1.2.4.2 nathanw bs_notimpl_bs_sr_4,
188 1.2.4.2 nathanw bs_notimpl_bs_sr_8,
189 1.2.4.2 nathanw
190 1.2.4.2 nathanw /* copy */
191 1.2.4.2 nathanw bs_notimpl_bs_c_1,
192 1.2.4.2 nathanw bs_notimpl_bs_c_2,
193 1.2.4.2 nathanw bs_notimpl_bs_c_4,
194 1.2.4.2 nathanw bs_notimpl_bs_c_8,
195 1.2.4.2 nathanw };
196 1.2.4.2 nathanw
197 1.2.4.2 nathanw int
198 1.2.4.2 nathanw com_hpcio_cndb_attach(bus_space_tag_t iot, int iobase, int rate,
199 1.2.4.2 nathanw int frequency, tcflag_t cflag, int kgdb)
200 1.2.4.2 nathanw {
201 1.2.4.2 nathanw int alignment;
202 1.2.4.2 nathanw
203 1.2.4.2 nathanw DPRINTF("com_hpcio_cndb_attach()\n");
204 1.2.4.2 nathanw if (!com_hpcio_common_probe(iot, iobase, &alignment)) {
205 1.2.4.2 nathanw DPRINTF("com_hpcio_cndb_attach(): probe failed\n");
206 1.2.4.2 nathanw return (ENOTTY);
207 1.2.4.2 nathanw }
208 1.2.4.2 nathanw if (alignment == COM_HPCIO_HALFWORD_ALIGNMENT) {
209 1.2.4.2 nathanw DPRINTF("com_hpcio_cndb_attach(): half word aligned\n");
210 1.2.4.2 nathanw com_hpcio_iot_init(&com_hpcio_cniotx, iot);
211 1.2.4.2 nathanw com_hpcio_cniot = &com_hpcio_cniotx;
212 1.2.4.2 nathanw } else {
213 1.2.4.2 nathanw com_hpcio_cniot = iot;
214 1.2.4.2 nathanw }
215 1.2.4.2 nathanw com_hpcio_cniobase = iobase;
216 1.2.4.2 nathanw DPRINTF("com_hpcio_cndb_attach(): probe succeeded\n");
217 1.2.4.2 nathanw #ifdef KGDB
218 1.2.4.2 nathanw if (kgdb)
219 1.2.4.2 nathanw return (com_kgdb_attach(com_hpcio_cniot, iobase, rate,
220 1.2.4.2 nathanw frequency, cflag));
221 1.2.4.2 nathanw else
222 1.2.4.2 nathanw #endif
223 1.2.4.2 nathanw return (comcnattach(com_hpcio_cniot, iobase, rate,
224 1.2.4.2 nathanw frequency, cflag));
225 1.2.4.2 nathanw }
226 1.2.4.2 nathanw
227 1.2.4.2 nathanw static int
228 1.2.4.2 nathanw com_hpcio_common_probe(bus_space_tag_t iot, int iobase, int *alignment)
229 1.2.4.2 nathanw {
230 1.2.4.2 nathanw bus_space_handle_t ioh;
231 1.2.4.2 nathanw static struct bus_space_tag tmpiot;
232 1.2.4.2 nathanw int rv;
233 1.2.4.2 nathanw
234 1.2.4.2 nathanw /*
235 1.2.4.2 nathanw * try byte aligned register
236 1.2.4.2 nathanw */
237 1.2.4.2 nathanw *alignment = COM_HPCIO_BYTE_ALIGNMENT;
238 1.2.4.2 nathanw if (bus_space_map(iot, iobase, 1, 0, &ioh))
239 1.2.4.2 nathanw return 0;
240 1.2.4.2 nathanw rv = comprobe1(iot, ioh);
241 1.2.4.2 nathanw bus_space_unmap(iot, ioh, 1);
242 1.2.4.2 nathanw
243 1.2.4.2 nathanw if (rv != 0)
244 1.2.4.2 nathanw return (rv);
245 1.2.4.2 nathanw
246 1.2.4.2 nathanw /*
247 1.2.4.2 nathanw * try half word aligned register
248 1.2.4.2 nathanw */
249 1.2.4.2 nathanw *alignment = COM_HPCIO_HALFWORD_ALIGNMENT;
250 1.2.4.2 nathanw com_hpcio_iot_init(&tmpiot, iot);
251 1.2.4.2 nathanw if (bus_space_map(&tmpiot, iobase, 1, 0, &ioh))
252 1.2.4.2 nathanw return 0;
253 1.2.4.2 nathanw rv = comprobe1(&tmpiot, ioh);
254 1.2.4.2 nathanw bus_space_unmap(&tmpiot, ioh, 1);
255 1.2.4.2 nathanw
256 1.2.4.2 nathanw return (rv);
257 1.2.4.2 nathanw }
258 1.2.4.2 nathanw
259 1.2.4.2 nathanw static int
260 1.2.4.2 nathanw com_hpcio_probe(struct device *parent, struct cfdata *cf, void *aux)
261 1.2.4.2 nathanw {
262 1.2.4.2 nathanw struct hpcio_attach_args *haa = aux;
263 1.2.4.2 nathanw bus_space_tag_t iot = haa->haa_iot;
264 1.2.4.2 nathanw int addr, alignment;
265 1.2.4.2 nathanw
266 1.2.4.2 nathanw if (cf->cf_loc[HPCIOIFCF_PLATFORM] != HPCIOIFCF_PLATFORM_DEFAULT) {
267 1.2.4.2 nathanw platid_mask_t mask;
268 1.2.4.2 nathanw
269 1.2.4.2 nathanw mask = PLATID_DEREF(cf->cf_loc[HPCIOIFCF_PLATFORM]);
270 1.2.4.2 nathanw if (!platid_match(&platid, &mask))
271 1.2.4.2 nathanw return (0); /* platform id didn't match */
272 1.2.4.2 nathanw }
273 1.2.4.2 nathanw
274 1.2.4.2 nathanw if ((addr = cf->cf_loc[HPCIOIFCF_ADDR]) == HPCIOIFCF_ADDR_DEFAULT)
275 1.2.4.2 nathanw return (0); /* address wasn't specified */
276 1.2.4.2 nathanw
277 1.2.4.2 nathanw return com_hpcio_common_probe(iot, addr, &alignment);
278 1.2.4.2 nathanw }
279 1.2.4.2 nathanw
280 1.2.4.2 nathanw
281 1.2.4.2 nathanw static void
282 1.2.4.2 nathanw com_hpcio_attach(struct device *parent, struct device *self, void *aux)
283 1.2.4.2 nathanw {
284 1.2.4.2 nathanw struct com_hpcio_softc *hsc = (void *)self;
285 1.2.4.2 nathanw struct com_softc *sc = &hsc->hsc_com;
286 1.2.4.2 nathanw struct hpcio_attach_args *haa = aux;
287 1.2.4.2 nathanw bus_space_tag_t iot;
288 1.2.4.2 nathanw bus_space_handle_t ioh;
289 1.2.4.2 nathanw int addr, port, mode, alignment, *loc;
290 1.2.4.2 nathanw
291 1.2.4.2 nathanw loc = sc->sc_dev.dv_cfdata->cf_loc;
292 1.2.4.2 nathanw addr = loc[HPCIOIFCF_ADDR];
293 1.2.4.2 nathanw printf(" addr %x", addr);
294 1.2.4.2 nathanw if ((com_hpcio_cniot == haa->haa_iot ||
295 1.2.4.2 nathanw com_hpcio_cniot->bs_base == haa->haa_iot) &&
296 1.2.4.2 nathanw com_hpcio_cniobase == addr &&
297 1.2.4.2 nathanw com_is_console(com_hpcio_cniot, addr, 0)) {
298 1.2.4.2 nathanw iot = com_hpcio_cniot;
299 1.2.4.2 nathanw if (com_hpcio_cniot->bs_base == haa->haa_iot)
300 1.2.4.2 nathanw printf(", half word aligned");
301 1.2.4.2 nathanw } else {
302 1.2.4.2 nathanw com_hpcio_common_probe(haa->haa_iot, addr, &alignment);
303 1.2.4.2 nathanw if (alignment == COM_HPCIO_HALFWORD_ALIGNMENT) {
304 1.2.4.2 nathanw printf(", half word aligned");
305 1.2.4.2 nathanw iot = &hsc->hsc_iot;
306 1.2.4.2 nathanw com_hpcio_iot_init(iot, haa->haa_iot);
307 1.2.4.2 nathanw } else {
308 1.2.4.2 nathanw iot = haa->haa_iot;
309 1.2.4.2 nathanw }
310 1.2.4.2 nathanw }
311 1.2.4.2 nathanw if (bus_space_map(iot, addr, 1, 0, &ioh)) {
312 1.2.4.2 nathanw printf(": can't map bus space\n");
313 1.2.4.2 nathanw return;
314 1.2.4.2 nathanw }
315 1.2.4.2 nathanw sc->sc_iobase = addr;
316 1.2.4.2 nathanw sc->sc_iot = iot;
317 1.2.4.2 nathanw sc->sc_ioh = ioh;
318 1.2.4.2 nathanw
319 1.2.4.2 nathanw sc->enable = NULL;
320 1.2.4.2 nathanw sc->disable = NULL;
321 1.2.4.2 nathanw
322 1.2.4.2 nathanw sc->sc_frequency = COM_FREQ;
323 1.2.4.2 nathanw com_attach_subr(sc);
324 1.2.4.2 nathanw
325 1.2.4.2 nathanw hsc->hsc_hc = (*haa->haa_getchip)(haa->haa_sc, loc[HPCIOIFCF_IOCHIP]);
326 1.2.4.2 nathanw port = loc[HPCIOIFCF_PORT];
327 1.2.4.2 nathanw mode = HPCIO_INTR_LEVEL | HPCIO_INTR_HIGH;
328 1.2.4.2 nathanw hpcio_intr_establish(hsc->hsc_hc, port, mode, comintr, sc);
329 1.2.4.2 nathanw }
330 1.2.4.2 nathanw
331 1.2.4.2 nathanw /*
332 1.2.4.2 nathanw * bus stuff (registershalf word aligned)
333 1.2.4.2 nathanw */
334 1.2.4.2 nathanw void
335 1.2.4.2 nathanw com_hpcio_iot_init(bus_space_tag_t iot, bus_space_tag_t base)
336 1.2.4.2 nathanw {
337 1.2.4.2 nathanw
338 1.2.4.2 nathanw iot->bs_base = base;
339 1.2.4.2 nathanw iot->bs_ops = com_hpcio_bs_ops; /* structure assignment */
340 1.2.4.2 nathanw iot->bs_ops.bs_r_1 = com_hpcio_bs_r_1;
341 1.2.4.2 nathanw iot->bs_ops.bs_w_1 = com_hpcio_bs_w_1;
342 1.2.4.2 nathanw iot->bs_ops.bs_wm_1 = com_hpcio_bs_wm_1;
343 1.2.4.2 nathanw }
344 1.2.4.2 nathanw
345 1.2.4.2 nathanw u_int8_t
346 1.2.4.2 nathanw com_hpcio_bs_r_1(bus_space_tag_t t, bus_space_handle_t bsh,
347 1.2.4.2 nathanw bus_size_t offset)
348 1.2.4.2 nathanw {
349 1.2.4.2 nathanw return bus_space_read_1(t->bs_base, bsh, offset * 2);
350 1.2.4.2 nathanw }
351 1.2.4.2 nathanw
352 1.2.4.2 nathanw void
353 1.2.4.2 nathanw com_hpcio_bs_w_1(bus_space_tag_t t, bus_space_handle_t bsh,
354 1.2.4.2 nathanw bus_size_t offset, u_int8_t value)
355 1.2.4.2 nathanw {
356 1.2.4.2 nathanw bus_space_write_1(t->bs_base, bsh, offset * 2, value);
357 1.2.4.2 nathanw }
358 1.2.4.2 nathanw
359 1.2.4.2 nathanw void
360 1.2.4.2 nathanw com_hpcio_bs_wm_1(bus_space_tag_t t, bus_space_handle_t bsh,
361 1.2.4.2 nathanw bus_size_t offset, const u_int8_t *addr, bus_size_t count)
362 1.2.4.2 nathanw {
363 1.2.4.2 nathanw bus_space_write_multi_1(t->bs_base, bsh, offset * 2, addr, count);
364 1.2.4.2 nathanw }
365