1 /* $NetBSD: zs_ioasic.c,v 1.39 2009/04/18 14:58:04 tsutsui Exp $ */
4 * Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Gordon W. Ross, Ken Hornstein, and by Jason R. Thorpe of the
9 * Numerical Aerospace Simulation Facility, NASA Ames Research Center.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
34 * Zilog Z8530 Dual UART driver (machine-dependent part). This driver
35 * handles Z8530 chips attached to the DECstation/Alpha IOASIC. Modified
36 * for NetBSD/alpha by Ken Hornstein and Jason R. Thorpe. NetBSD/pmax
37 * adaption by Mattias Drochner. Merge work by Tohru Nishimura.
39 * Runs two serial lines per chip using slave drivers.
40 * Plain tty/async lines use the zstty slave.
43 #include <sys/cdefs.h>
44 __KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.39 2009/04/18 14:58:04 tsutsui Exp $");
50 #include <sys/param.h>
51 #include <sys/systm.h>
53 #include <sys/device.h>
54 #include <sys/malloc.h>
56 #include <sys/ioctl.h>
57 #include <sys/kernel.h>
61 #include <sys/syslog.h>
64 #include <machine/autoconf.h>
65 #include <machine/z8530var.h>
68 #include <dev/ic/z8530reg.h>
70 #include <dev/tc/tcvar.h>
71 #include <dev/tc/ioasicreg.h>
72 #include <dev/tc/ioasicvar.h>
74 #include <dev/tc/zs_ioasicvar.h>
76 #if defined(__alpha__) || defined(alpha)
77 #include <machine/rpb.h>
80 #include <pmax/pmax/pmaxtype.h>
84 * Helpers for console support.
86 static void zs_ioasic_cninit(tc_addr_t
, tc_offset_t
, int);
87 static int zs_ioasic_cngetc(dev_t
);
88 static void zs_ioasic_cnputc(dev_t
, int);
89 static void zs_ioasic_cnpollc(dev_t
, int);
91 struct consdev zs_ioasic_cons
= {
92 NULL
, NULL
, zs_ioasic_cngetc
, zs_ioasic_cnputc
,
93 zs_ioasic_cnpollc
, NULL
, NULL
, NULL
, NODEV
, CN_NORMAL
,
96 static tc_offset_t zs_ioasic_console_offset
;
97 static int zs_ioasic_console_channel
;
98 static int zs_ioasic_console
;
99 static struct zs_chanstate zs_ioasic_conschanstate_store
;
101 static int zs_ioasic_isconsole(tc_offset_t
, int);
102 static void zs_putc(struct zs_chanstate
*, int);
105 * Some warts needed by z8530tty.c
107 int zs_def_cflag
= (TTYDEF_CFLAG
& ~(CSIZE
| PARENB
)) | CS8
;
110 * ZS chips are feeded a 7.372 MHz clock.
112 #define PCLK (9600 * 768) /* PCLK pin input clock rate */
114 /* The layout of this is hardware-dependent (padding, order). */
116 #if defined(__alpha__) || defined(alpha)
117 volatile u_int zc_csr
; /* ctrl,status, and indirect access */
119 volatile u_int zc_data
; /* data */
123 volatile uint16_t zc_csr
; /* ctrl,status, and indirect access */
125 volatile uint16_t zc_data
; /* data */
131 /* Yes, they are backwards. */
132 struct zshan zs_chan_b
;
133 struct zshan zs_chan_a
;
136 static const u_char zs_ioasic_init_reg
[16] = {
137 0, /* 0: CMD (reset, etc.) */
138 0, /* 1: No interrupts yet. */
140 ZSWR3_RX_8
| ZSWR3_RX_ENABLE
,
141 ZSWR4_CLK_X16
| ZSWR4_ONESB
,
142 ZSWR5_TX_8
| ZSWR5_TX_ENABLE
,
143 0, /* 6: TXSYNC/SYNCLO */
144 0, /* 7: RXSYNC/SYNCHI */
145 0, /* 8: alias for data port */
146 ZSWR9_MASTER_IE
| ZSWR9_VECTOR_INCL_STAT
,
147 0, /*10: Misc. TX/RX control bits */
148 ZSWR11_TXCLK_BAUD
| ZSWR11_RXCLK_BAUD
,
149 22, /*12: BAUDLO (default=9600) */
150 0, /*13: BAUDHI (default=9600) */
151 ZSWR14_BAUD_ENA
| ZSWR14_BAUD_FROM_PCLK
,
155 static struct zshan
*
156 zs_ioasic_get_chan_addr(tc_addr_t zsaddr
, int channel
)
158 struct zsdevice
*addr
;
161 #if defined(__alpha__) || defined(alpha)
162 addr
= (struct zsdevice
*)TC_DENSE_TO_SPARSE(zsaddr
);
165 addr
= (struct zsdevice
*)MIPS_PHYS_TO_KSEG1(zsaddr
);
169 zc
= &addr
->zs_chan_a
;
171 zc
= &addr
->zs_chan_b
;
177 /****************************************************************
179 ****************************************************************/
181 /* Definition of the driver for autoconfig. */
182 static int zs_ioasic_match(device_t
, cfdata_t
, void *);
183 static void zs_ioasic_attach(device_t
, device_t
, void *);
184 static int zs_ioasic_print(void *, const char *name
);
185 static int zs_ioasic_submatch(device_t
, cfdata_t
,
186 const int *, void *);
188 CFATTACH_DECL_NEW(zsc_ioasic
, sizeof(struct zsc_softc
),
189 zs_ioasic_match
, zs_ioasic_attach
, NULL
, NULL
);
191 /* Interrupt handlers. */
192 static int zs_ioasic_hardintr(void *);
193 static void zs_ioasic_softintr(void *);
196 * Is the zs chip present?
199 zs_ioasic_match(device_t parent
, cfdata_t cf
, void *aux
)
201 struct ioasicdev_attach_args
*d
= aux
;
205 * Make sure that we're looking for the right kind of device.
207 if (strncmp(d
->iada_modname
, "z8530 ", TC_ROM_LLEN
) != 0 &&
208 strncmp(d
->iada_modname
, "scc", TC_ROM_LLEN
) != 0)
212 * Find out the device address, and check it for validity.
214 zs_addr
= TC_DENSE_TO_SPARSE((tc_addr_t
)d
->iada_addr
);
215 if (tc_badaddr(zs_addr
))
225 zs_ioasic_attach(device_t parent
, device_t self
, void *aux
)
227 struct zsc_softc
*zs
= device_private(self
);
228 struct zsc_attach_args zs_args
;
229 struct zs_chanstate
*cs
;
230 struct ioasicdev_attach_args
*d
= aux
;
234 int locs
[ZSCCF_NLOCS
];
240 * Initialize software state for each channel.
242 for (channel
= 0; channel
< 2; channel
++) {
243 zs_args
.channel
= channel
;
246 if (zs_ioasic_isconsole(d
->iada_offset
, channel
)) {
247 cs
= &zs_ioasic_conschanstate_store
;
248 zs_args
.hwflags
|= ZS_HWFLAG_CONSOLE
;
250 cs
= malloc(sizeof(struct zs_chanstate
),
251 M_DEVBUF
, M_NOWAIT
|M_ZERO
);
253 zc
= zs_ioasic_get_chan_addr(d
->iada_addr
, channel
);
254 cs
->cs_reg_csr
= (volatile void *)&zc
->zc_csr
;
256 memcpy(cs
->cs_creg
, zs_ioasic_init_reg
, 16);
257 memcpy(cs
->cs_preg
, zs_ioasic_init_reg
, 16);
259 cs
->cs_defcflag
= zs_def_cflag
;
260 cs
->cs_defspeed
= 9600; /* XXX */
261 (void)zs_set_modes(cs
, cs
->cs_defcflag
);
264 zs
->zsc_cs
[channel
] = cs
;
265 zs
->zsc_addroffset
= d
->iada_offset
; /* cookie only */
266 cs
->cs_channel
= channel
;
267 cs
->cs_ops
= &zsops_null
;
268 cs
->cs_brg_clk
= PCLK
/ 16;
271 * DCD and CTS interrupts are only meaningful on
272 * SCC 0/B, and RTS and DTR only on B of SCC 0 & 1.
274 * XXX This is sorta gross.
276 if (d
->iada_offset
== 0x00100000 && channel
== 1) {
277 cs
->cs_creg
[15] |= ZSWR15_DCD_IE
;
278 cs
->cs_preg
[15] |= ZSWR15_DCD_IE
;
279 zflg
= ZIP_FLAGS_DCDCTS
;
283 zflg
|= ZIP_FLAGS_DTRRTS
;
284 cs
->cs_private
= (void *)zflg
;
287 * Clear the master interrupt enable.
288 * The INTENA is common to both channels,
289 * so just do it on the A channel.
292 zs_write_reg(cs
, 9, 0);
296 * Set up the flow/modem control channel pointer to
297 * deal with the weird wiring on the TC Alpha and
301 cs
->cs_ctl_chan
= zs
->zsc_cs
[0];
303 cs
->cs_ctl_chan
= NULL
;
305 locs
[ZSCCF_CHANNEL
] = channel
;
308 * Look for a child driver for this channel.
309 * The child attach will setup the hardware.
311 if (config_found_sm_loc(self
, "zsc", locs
, (void *)&zs_args
,
312 zs_ioasic_print
, zs_ioasic_submatch
) == NULL
) {
313 /* No sub-driver. Just reset it. */
314 uint8_t reset
= (channel
== 0) ?
315 ZSWR9_A_RESET
: ZSWR9_B_RESET
;
317 zs_write_reg(cs
, 9, reset
);
323 * Set up the ioasic interrupt handler.
325 ioasic_intr_establish(parent
, d
->iada_cookie
, TC_IPL_TTY
,
326 zs_ioasic_hardintr
, zs
);
327 zs
->zsc_sih
= softint_establish(SOFTINT_SERIAL
,
328 zs_ioasic_softintr
, zs
);
329 if (zs
->zsc_sih
== NULL
)
330 panic("%s: unable to register softintr", __func__
);
333 * Set the master interrupt enable and interrupt vector. The
334 * Sun does this only on one channel. The old Alpha SCC driver
335 * did it on both. We'll do it on both.
338 /* interrupt vector */
339 zs_write_reg(zs
->zsc_cs
[0], 2, zs_ioasic_init_reg
[2]);
340 zs_write_reg(zs
->zsc_cs
[1], 2, zs_ioasic_init_reg
[2]);
342 /* master interrupt control (enable) */
343 zs_write_reg(zs
->zsc_cs
[0], 9, zs_ioasic_init_reg
[9]);
344 zs_write_reg(zs
->zsc_cs
[1], 9, zs_ioasic_init_reg
[9]);
345 #if defined(__alpha__) || defined(alpha)
346 /* ioasic interrupt enable */
347 *(volatile u_int
*)(ioasic_base
+ IOASIC_IMSK
) |=
348 IOASIC_INTR_SCC_1
| IOASIC_INTR_SCC_0
;
355 zs_ioasic_print(void *aux
, const char *name
)
357 struct zsc_attach_args
*args
= aux
;
360 aprint_normal("%s:", name
);
362 if (args
->channel
!= -1)
363 aprint_normal(" channel %d", args
->channel
);
369 zs_ioasic_submatch(device_t parent
, cfdata_t cf
, const int *locs
, void *aux
)
371 struct zsc_softc
*zs
= device_private(parent
);
372 struct zsc_attach_args
*pa
= aux
;
373 const char *defname
= "";
375 if (cf
->cf_loc
[ZSCCF_CHANNEL
] != ZSCCF_CHANNEL_DEFAULT
&&
376 cf
->cf_loc
[ZSCCF_CHANNEL
] != locs
[ZSCCF_CHANNEL
])
379 if (cf
->cf_loc
[ZSCCF_CHANNEL
] == ZSCCF_CHANNEL_DEFAULT
) {
380 if (pa
->channel
== 0) {
382 if (systype
== DS_MAXINE
)
385 if (zs
->zsc_addroffset
== 0x100000)
390 else if (zs
->zsc_addroffset
== 0x100000)
393 else if (systype
== DS_MAXINE
)
396 #if defined(__alpha__) || defined(alpha)
397 else if (cputype
== ST_DEC_3000_300
)
401 defname
= "zstty"; /* 3min/3max+, DEC3000/500 */
403 if (strcmp(cf
->cf_name
, defname
))
406 return (config_match(parent
, cf
, aux
));
410 * Hardware interrupt handler.
413 zs_ioasic_hardintr(void *arg
)
415 struct zsc_softc
*zsc
= arg
;
418 * Call the upper-level MI hardware interrupt handler.
423 * Check to see if we need to schedule any software-level
424 * processing interrupts.
426 if (zsc
->zsc_cs
[0]->cs_softreq
| zsc
->zsc_cs
[1]->cs_softreq
)
427 softint_schedule(zsc
->zsc_sih
);
433 * Software-level interrupt (character processing, lower priority).
436 zs_ioasic_softintr(void *arg
)
438 struct zsc_softc
*zsc
= arg
;
442 (void)zsc_intr_soft(zsc
);
447 * MD functions for setting the baud rate and control modes.
450 zs_set_speed(struct zs_chanstate
*cs
, int bps
/*bits per second*/)
452 int tconst
, real_bps
;
458 if (cs
->cs_brg_clk
== 0)
459 panic("zs_set_speed");
462 tconst
= BPS_TO_TCONST(cs
->cs_brg_clk
, bps
);
466 /* Convert back to make sure we can do it. */
467 real_bps
= TCONST_TO_BPS(cs
->cs_brg_clk
, tconst
);
469 /* XXX - Allow some tolerance here? */
473 cs
->cs_preg
[12] = tconst
;
474 cs
->cs_preg
[13] = tconst
>> 8;
476 /* Caller will stuff the pending registers. */
481 zs_set_modes(struct zs_chanstate
*cs
, int cflag
)
483 u_long privflags
= (u_long
)cs
->cs_private
;
487 * Output hardware flow control on the chip is horrendous:
488 * if carrier detect drops, the receiver is disabled, and if
489 * CTS drops, the transmitter is stoped IN MID CHARACTER!
490 * Therefore, NEVER set the HFC bit, and instead use the
491 * status interrupt to detect CTS changes.
494 if ((cflag
& (CLOCAL
| MDMBUF
)) != 0)
497 cs
->cs_rr0_dcd
= ZSRR0_DCD
;
498 if ((cflag
& CRTSCTS
) != 0) {
499 cs
->cs_wr5_dtr
= ZSWR5_DTR
;
500 cs
->cs_wr5_rts
= ZSWR5_RTS
;
501 cs
->cs_rr0_cts
= ZSRR0_CTS
;
502 } else if ((cflag
& CDTRCTS
) != 0) {
504 cs
->cs_wr5_rts
= ZSWR5_DTR
;
505 cs
->cs_rr0_cts
= ZSRR0_CTS
;
506 } else if ((cflag
& MDMBUF
) != 0) {
508 cs
->cs_wr5_rts
= ZSWR5_DTR
;
509 cs
->cs_rr0_cts
= ZSRR0_DCD
;
511 cs
->cs_wr5_dtr
= ZSWR5_DTR
| ZSWR5_RTS
;
516 if ((privflags
& ZIP_FLAGS_DCDCTS
) == 0) {
517 cs
->cs_rr0_dcd
&= ~(ZSRR0_CTS
|ZSRR0_DCD
);
518 cs
->cs_rr0_cts
&= ~(ZSRR0_CTS
|ZSRR0_DCD
);
520 if ((privflags
& ZIP_FLAGS_DTRRTS
) == 0) {
521 cs
->cs_wr5_dtr
&= ~(ZSWR5_RTS
|ZSWR5_DTR
);
522 cs
->cs_wr5_rts
&= ~(ZSWR5_RTS
|ZSWR5_DTR
);
526 /* Caller will stuff the pending registers. */
531 * Functions to read and write individual registers in a channel.
532 * The ZS chip requires a 1.6 uSec. recovery time between accesses,
533 * and the Alpha TC hardware does NOT take care of this for you.
534 * The delay is now handled inside the chip access functions.
535 * These could be inlines, but with the delay, speed is moot.
543 zs_read_reg(struct zs_chanstate
*cs
, u_int reg
)
545 volatile struct zshan
*zc
= (volatile void *)cs
->cs_reg_csr
;
548 zc
->zc_csr
= reg
<< 8;
551 val
= (zc
->zc_csr
>> 8) & 0xff;
558 zs_write_reg(struct zs_chanstate
*cs
, u_int reg
, u_int val
)
560 volatile struct zshan
*zc
= (volatile void *)cs
->cs_reg_csr
;
562 zc
->zc_csr
= reg
<< 8;
565 zc
->zc_csr
= val
<< 8;
571 zs_read_csr(struct zs_chanstate
*cs
)
573 volatile struct zshan
*zc
= (volatile void *)cs
->cs_reg_csr
;
576 val
= (zc
->zc_csr
>> 8) & 0xff;
583 zs_write_csr(struct zs_chanstate
*cs
, u_int val
)
585 volatile struct zshan
*zc
= (volatile void *)cs
->cs_reg_csr
;
587 zc
->zc_csr
= val
<< 8;
593 zs_read_data(struct zs_chanstate
*cs
)
595 volatile struct zshan
*zc
= (volatile void *)cs
->cs_reg_csr
;
598 val
= (zc
->zc_data
) >> 8 & 0xff;
605 zs_write_data(struct zs_chanstate
*cs
, u_int val
)
607 volatile struct zshan
*zc
= (volatile void *)cs
->cs_reg_csr
;
609 zc
->zc_data
= val
<< 8;
614 /****************************************************************
615 * Console support functions
616 ****************************************************************/
619 * Handle user request to enter kernel debugger.
622 zs_abort(struct zs_chanstate
*cs
)
626 /* Wait for end of break. */
627 /* XXX - Limit the wait? */
629 rr0
= zs_read_csr(cs
);
630 } while (rr0
& ZSRR0_BREAK
);
637 printf("zs_abort: ignoring break on console\n");
645 zs_getc(struct zs_chanstate
*cs
)
651 /* Wait for a character to arrive. */
653 rr0
= zs_read_csr(cs
);
654 } while ((rr0
& ZSRR0_RX_READY
) == 0);
656 c
= zs_read_data(cs
);
660 * This is used by the kd driver to read scan codes,
661 * so don't translate '\r' ==> '\n' here...
667 * Polled output char.
670 zs_putc(struct zs_chanstate
*cs
, int c
)
676 /* Wait for transmitter to become ready. */
678 rr0
= zs_read_csr(cs
);
679 } while ((rr0
& ZSRR0_TX_READY
) == 0);
681 zs_write_data(cs
, c
);
683 /* Wait for the character to be transmitted. */
685 rr0
= zs_read_csr(cs
);
686 } while ((rr0
& ZSRR0_TX_READY
) == 0);
690 /*****************************************************************/
693 * zs_ioasic_cninit --
694 * Initialize the serial channel for either a keyboard or
698 zs_ioasic_cninit(tc_addr_t ioasic_addr
, tc_offset_t zs_offset
, int channel
)
700 struct zs_chanstate
*cs
;
706 * Initialize the console finder helpers.
708 zs_ioasic_console_offset
= zs_offset
;
709 zs_ioasic_console_channel
= channel
;
710 zs_ioasic_console
= 1;
713 * Pointer to channel state.
715 cs
= &zs_ioasic_conschanstate_store
;
718 * Compute the physical address of the chip, "map" it via
719 * K0SEG, and then get the address of the actual channel.
721 #if defined(__alpha__) || defined(alpha)
722 zs_addr
= ALPHA_PHYS_TO_K0SEG(ioasic_addr
+ zs_offset
);
725 zs_addr
= MIPS_PHYS_TO_KSEG1(ioasic_addr
+ zs_offset
);
727 zc
= zs_ioasic_get_chan_addr(zs_addr
, channel
);
729 /* Setup temporary chanstate. */
730 cs
->cs_reg_csr
= (volatile void *)&zc
->zc_csr
;
732 cs
->cs_channel
= channel
;
733 cs
->cs_ops
= &zsops_null
;
734 cs
->cs_brg_clk
= PCLK
/ 16;
736 /* Initialize the pending registers. */
737 memcpy(cs
->cs_preg
, zs_ioasic_init_reg
, 16);
738 /* cs->cs_preg[5] |= (ZSWR5_DTR | ZSWR5_RTS); */
741 * DCD and CTS interrupts are only meaningful on
742 * SCC 0/B, and RTS and DTR only on B of SCC 0 & 1.
744 * XXX This is sorta gross.
746 if (zs_offset
== 0x00100000 && channel
== 1)
747 zflg
= ZIP_FLAGS_DCDCTS
;
751 zflg
|= ZIP_FLAGS_DTRRTS
;
752 cs
->cs_private
= (void *)zflg
;
754 /* Clear the master interrupt enable. */
755 zs_write_reg(cs
, 9, 0);
757 /* Reset the whole SCC chip. */
758 zs_write_reg(cs
, 9, ZSWR9_HARD_RESET
);
760 /* Copy "pending" to "current" and H/W. */
761 zs_loadchannelregs(cs
);
765 * zs_ioasic_cnattach --
766 * Initialize and attach a serial console.
769 zs_ioasic_cnattach(tc_addr_t ioasic_addr
, tc_offset_t zs_offset
, int channel
)
771 struct zs_chanstate
*cs
= &zs_ioasic_conschanstate_store
;
772 extern const struct cdevsw zstty_cdevsw
;
774 zs_ioasic_cninit(ioasic_addr
, zs_offset
, channel
);
776 cs
->cs_defspeed
= 9600;
777 cs
->cs_defcflag
= (TTYDEF_CFLAG
& ~(CSIZE
| PARENB
)) | CS8
;
779 /* Point the console at the SCC. */
780 cn_tab
= &zs_ioasic_cons
;
781 cn_tab
->cn_pri
= CN_REMOTE
;
782 cn_tab
->cn_dev
= makedev(cdevsw_lookup_major(&zstty_cdevsw
),
783 (zs_offset
== 0x100000) ? 0 : 1);
787 * zs_ioasic_lk201_cnattach --
788 * Initialize and attach a keyboard.
791 zs_ioasic_lk201_cnattach(tc_addr_t ioasic_addr
, tc_offset_t zs_offset
,
795 struct zs_chanstate
*cs
= &zs_ioasic_conschanstate_store
;
797 zs_ioasic_cninit(ioasic_addr
, zs_offset
, channel
);
799 cs
->cs_defspeed
= 4800;
800 cs
->cs_defcflag
= (TTYDEF_CFLAG
& ~(CSIZE
| PARENB
)) | CS8
;
801 return (zskbd_cnattach(cs
));
808 zs_ioasic_isconsole(tc_offset_t offset
, int channel
)
811 if (zs_ioasic_console
&&
812 offset
== zs_ioasic_console_offset
&&
813 channel
== zs_ioasic_console_channel
)
820 * Polled console input putchar.
823 zs_ioasic_cngetc(dev_t dev
)
826 return (zs_getc(&zs_ioasic_conschanstate_store
));
830 * Polled console output putchar.
833 zs_ioasic_cnputc(dev_t dev
, int c
)
836 zs_putc(&zs_ioasic_conschanstate_store
, c
);
840 * Set polling/no polling on console.
843 zs_ioasic_cnpollc(dev_t dev
, int onoff
)