1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_ZSDEV_H 28*7c478bd9Sstevel@tonic-gate #define _SYS_ZSDEV_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate /* 33*7c478bd9Sstevel@tonic-gate * Onboard serial ports. 34*7c478bd9Sstevel@tonic-gate * Device dependent software definitions. 35*7c478bd9Sstevel@tonic-gate * All interfaces described in this file are private to the Sun 'zs' driver 36*7c478bd9Sstevel@tonic-gate * implementation and may change at any time without notice. 37*7c478bd9Sstevel@tonic-gate */ 38*7c478bd9Sstevel@tonic-gate 39*7c478bd9Sstevel@tonic-gate 40*7c478bd9Sstevel@tonic-gate /* 41*7c478bd9Sstevel@tonic-gate * Chip, buffer, and register definitions for Z8530 SCC 42*7c478bd9Sstevel@tonic-gate */ 43*7c478bd9Sstevel@tonic-gate 44*7c478bd9Sstevel@tonic-gate #include <sys/spl.h> 45*7c478bd9Sstevel@tonic-gate #include <sys/ksynch.h> 46*7c478bd9Sstevel@tonic-gate #include <sys/dditypes.h> 47*7c478bd9Sstevel@tonic-gate #include <sys/ser_zscc.h> 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate #ifdef _MACHDEP 50*7c478bd9Sstevel@tonic-gate #include <sys/zsmach.h> 51*7c478bd9Sstevel@tonic-gate #endif 52*7c478bd9Sstevel@tonic-gate 53*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 54*7c478bd9Sstevel@tonic-gate extern "C" { 55*7c478bd9Sstevel@tonic-gate #endif 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate #ifndef _MACHDEP 58*7c478bd9Sstevel@tonic-gate #define ZSDELAY() 59*7c478bd9Sstevel@tonic-gate #define ZSFLUSH() 60*7c478bd9Sstevel@tonic-gate #define ZSNEXTPOLL(zscurr) 61*7c478bd9Sstevel@tonic-gate #endif 62*7c478bd9Sstevel@tonic-gate 63*7c478bd9Sstevel@tonic-gate /* 64*7c478bd9Sstevel@tonic-gate * OUTLINE defines the high-order flag bit in the minor device number that 65*7c478bd9Sstevel@tonic-gate * controls use of a tty line for dialin and dialout simultaneously. 66*7c478bd9Sstevel@tonic-gate */ 67*7c478bd9Sstevel@tonic-gate #define OUTLINE ((minor_t)1 << (NBITSMINOR32 - 1)) 68*7c478bd9Sstevel@tonic-gate #define UNIT(x) (getminor(x) & ~OUTLINE) 69*7c478bd9Sstevel@tonic-gate 70*7c478bd9Sstevel@tonic-gate #define ZSWR1_INIT (ZSWR1_SIE|ZSWR1_TIE|ZSWR1_RIE) 71*7c478bd9Sstevel@tonic-gate 72*7c478bd9Sstevel@tonic-gate extern int zs_usec_delay; 73*7c478bd9Sstevel@tonic-gate 74*7c478bd9Sstevel@tonic-gate 75*7c478bd9Sstevel@tonic-gate #define ZS_REG_SIZE (2 * sizeof (struct zscc_device)) 76*7c478bd9Sstevel@tonic-gate 77*7c478bd9Sstevel@tonic-gate #define PCLK (19660800/4) /* basic clock rate for UARTs */ 78*7c478bd9Sstevel@tonic-gate 79*7c478bd9Sstevel@tonic-gate #define SDLCFLAG 0x7E 80*7c478bd9Sstevel@tonic-gate 81*7c478bd9Sstevel@tonic-gate #define ZS_ON (ZSWR5_DTR|ZSWR5_RTS) 82*7c478bd9Sstevel@tonic-gate #define ZS_OFF 0 83*7c478bd9Sstevel@tonic-gate 84*7c478bd9Sstevel@tonic-gate /* 85*7c478bd9Sstevel@tonic-gate * Modem control commands. 86*7c478bd9Sstevel@tonic-gate */ 87*7c478bd9Sstevel@tonic-gate #define DMSET 0 88*7c478bd9Sstevel@tonic-gate #define DMBIS 1 89*7c478bd9Sstevel@tonic-gate #define DMBIC 2 90*7c478bd9Sstevel@tonic-gate #define DMGET 3 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate /* 93*7c478bd9Sstevel@tonic-gate * Macros to access a port 94*7c478bd9Sstevel@tonic-gate */ 95*7c478bd9Sstevel@tonic-gate #define SCC_WRITEA(reg, val) { \ 96*7c478bd9Sstevel@tonic-gate ((struct zscc_device *) \ 97*7c478bd9Sstevel@tonic-gate ((uintptr_t)zs->zs_addr | ZSOFF))->zscc_control = reg; \ 98*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 99*7c478bd9Sstevel@tonic-gate ((struct zscc_device *) \ 100*7c478bd9Sstevel@tonic-gate ((uintptr_t)zs->zs_addr | ZSOFF))->zscc_control = val; \ 101*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 102*7c478bd9Sstevel@tonic-gate zs->zs_wreg[reg] = val; \ 103*7c478bd9Sstevel@tonic-gate } 104*7c478bd9Sstevel@tonic-gate #define SCC_WRITEB(reg, val) { \ 105*7c478bd9Sstevel@tonic-gate ((struct zscc_device *) \ 106*7c478bd9Sstevel@tonic-gate ((uintptr_t)zs->zs_addr & ~ZSOFF))->zscc_control = reg; \ 107*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 108*7c478bd9Sstevel@tonic-gate ((struct zscc_device *) \ 109*7c478bd9Sstevel@tonic-gate ((uintptr_t)zs->zs_addr & ~ZSOFF))->zscc_control = val; \ 110*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 111*7c478bd9Sstevel@tonic-gate zs->zs_wreg[reg] = val; \ 112*7c478bd9Sstevel@tonic-gate } 113*7c478bd9Sstevel@tonic-gate #define SCC_WRITE(reg, val) { \ 114*7c478bd9Sstevel@tonic-gate zs->zs_addr->zscc_control = reg; \ 115*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 116*7c478bd9Sstevel@tonic-gate zs->zs_addr->zscc_control = val; \ 117*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 118*7c478bd9Sstevel@tonic-gate zs->zs_wreg[reg] = val; \ 119*7c478bd9Sstevel@tonic-gate } 120*7c478bd9Sstevel@tonic-gate 121*7c478bd9Sstevel@tonic-gate #define SCC_READA(reg, var) { \ 122*7c478bd9Sstevel@tonic-gate ((struct zscc_device *) \ 123*7c478bd9Sstevel@tonic-gate ((uintptr_t)zs->zs_addr | ZSOFF))->zscc_control = reg; \ 124*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 125*7c478bd9Sstevel@tonic-gate var = ((struct zscc_device *) \ 126*7c478bd9Sstevel@tonic-gate ((uintptr_t)zs->zs_addr | ZSOFF))->zscc_control; \ 127*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 128*7c478bd9Sstevel@tonic-gate } 129*7c478bd9Sstevel@tonic-gate #define SCC_READB(reg, var) { \ 130*7c478bd9Sstevel@tonic-gate ((struct zscc_device *) \ 131*7c478bd9Sstevel@tonic-gate ((uintptr_t)zs->zs_addr & ~ZSOFF))->zscc_control = reg; \ 132*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 133*7c478bd9Sstevel@tonic-gate var = ((struct zscc_device *) \ 134*7c478bd9Sstevel@tonic-gate ((uintptr_t)zs->zs_addr & ~ZSOFF))->zscc_control; \ 135*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 136*7c478bd9Sstevel@tonic-gate } 137*7c478bd9Sstevel@tonic-gate #define SCC_READ(reg, var) { \ 138*7c478bd9Sstevel@tonic-gate register struct zscc_device *tmp; \ 139*7c478bd9Sstevel@tonic-gate tmp = zs->zs_addr; \ 140*7c478bd9Sstevel@tonic-gate tmp->zscc_control = reg; \ 141*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 142*7c478bd9Sstevel@tonic-gate var = tmp->zscc_control; \ 143*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 144*7c478bd9Sstevel@tonic-gate } 145*7c478bd9Sstevel@tonic-gate 146*7c478bd9Sstevel@tonic-gate #define SCC_BIS(reg, val) { \ 147*7c478bd9Sstevel@tonic-gate zs->zs_addr->zscc_control = reg; \ 148*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 149*7c478bd9Sstevel@tonic-gate zs->zs_addr->zscc_control = zs->zs_wreg[reg] |= val; \ 150*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 151*7c478bd9Sstevel@tonic-gate } 152*7c478bd9Sstevel@tonic-gate 153*7c478bd9Sstevel@tonic-gate #define SCC_BIC(reg, val) { \ 154*7c478bd9Sstevel@tonic-gate zs->zs_addr->zscc_control = reg; \ 155*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 156*7c478bd9Sstevel@tonic-gate zs->zs_addr->zscc_control = zs->zs_wreg[reg] &= ~val; \ 157*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 158*7c478bd9Sstevel@tonic-gate } 159*7c478bd9Sstevel@tonic-gate 160*7c478bd9Sstevel@tonic-gate 161*7c478bd9Sstevel@tonic-gate #define SCC_WRITE0(val) { \ 162*7c478bd9Sstevel@tonic-gate zs->zs_addr->zscc_control = val; \ 163*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 164*7c478bd9Sstevel@tonic-gate ZSFLUSH(); \ 165*7c478bd9Sstevel@tonic-gate } 166*7c478bd9Sstevel@tonic-gate 167*7c478bd9Sstevel@tonic-gate #define SCC_WRITEDATA(val) { \ 168*7c478bd9Sstevel@tonic-gate zs->zs_addr->zscc_data = val; \ 169*7c478bd9Sstevel@tonic-gate ZSDELAY(); \ 170*7c478bd9Sstevel@tonic-gate ZSFLUSH(); \ 171*7c478bd9Sstevel@tonic-gate } 172*7c478bd9Sstevel@tonic-gate #define SCC_READ0() zs->zs_addr->zscc_control 173*7c478bd9Sstevel@tonic-gate #define SCC_READDATA() zs->zs_addr->zscc_data 174*7c478bd9Sstevel@tonic-gate 175*7c478bd9Sstevel@tonic-gate 176*7c478bd9Sstevel@tonic-gate /* 177*7c478bd9Sstevel@tonic-gate * Protocol specific entry points for driver routines. 178*7c478bd9Sstevel@tonic-gate */ 179*7c478bd9Sstevel@tonic-gate struct zsops { 180*7c478bd9Sstevel@tonic-gate void (*zsop_txint)(); /* xmit buffer empty */ 181*7c478bd9Sstevel@tonic-gate void (*zsop_xsint)(); /* external/status */ 182*7c478bd9Sstevel@tonic-gate void (*zsop_rxint)(); /* receive char available */ 183*7c478bd9Sstevel@tonic-gate void (*zsop_srint)(); /* special receive condition */ 184*7c478bd9Sstevel@tonic-gate int (*zsop_softint)(); /* second stage interrupt handler */ 185*7c478bd9Sstevel@tonic-gate int (*zsop_suspend)(); /* suspend driver */ 186*7c478bd9Sstevel@tonic-gate int (*zsop_resume)(); /* resume driver */ 187*7c478bd9Sstevel@tonic-gate }; 188*7c478bd9Sstevel@tonic-gate 189*7c478bd9Sstevel@tonic-gate /* 190*7c478bd9Sstevel@tonic-gate * Hardware channel common data. One structure per port. 191*7c478bd9Sstevel@tonic-gate * Each of the fields in this structure is required to be protected by a 192*7c478bd9Sstevel@tonic-gate * mutex lock at the highest priority at which it can be altered. 193*7c478bd9Sstevel@tonic-gate * The zs_flags, zs_wreg and zs_next fields can be altered by interrupt 194*7c478bd9Sstevel@tonic-gate * handling code that runs at ZS_PL_HI (IPL 12), so they must be protected 195*7c478bd9Sstevel@tonic-gate * by the mutex whose handle is stored in zs_excl_hi. All others can be 196*7c478bd9Sstevel@tonic-gate * protected by the zs_excl mutex, which is lower priority and adaptive. 197*7c478bd9Sstevel@tonic-gate */ 198*7c478bd9Sstevel@tonic-gate #define ZS_MAX_PRIV_STR 800 /* int */ 199*7c478bd9Sstevel@tonic-gate struct zscom { 200*7c478bd9Sstevel@tonic-gate void (*zs_txint)(); /* SCC interrupt vector routines */ 201*7c478bd9Sstevel@tonic-gate unsigned char *zs_wr_cur; 202*7c478bd9Sstevel@tonic-gate unsigned char *zs_wr_lim; 203*7c478bd9Sstevel@tonic-gate void (*zs_rxint)(); /* SCC interrupt vector routines */ 204*7c478bd9Sstevel@tonic-gate unsigned char *zs_rd_cur; 205*7c478bd9Sstevel@tonic-gate unsigned char *zs_rd_lim; 206*7c478bd9Sstevel@tonic-gate struct zscc_device *zs_addr; /* address of second half of chip */ 207*7c478bd9Sstevel@tonic-gate void (*zs_xsint)(); /* SCC interrupt vector routines */ 208*7c478bd9Sstevel@tonic-gate void (*zs_srint)(); /* SCC interrupt vector routines */ 209*7c478bd9Sstevel@tonic-gate int (*zs_suspend)(); /* routine to suspend driver */ 210*7c478bd9Sstevel@tonic-gate int (*zs_resume)(); /* routine to resume driver */ 211*7c478bd9Sstevel@tonic-gate uchar_t zs_wreg[16]; /* shadow of write registers */ 212*7c478bd9Sstevel@tonic-gate caddr_t zs_priv; /* protocol private data */ 213*7c478bd9Sstevel@tonic-gate struct zsops *zs_ops; /* basic operations vectors */ 214*7c478bd9Sstevel@tonic-gate dev_info_t *zs_dip; /* dev_info */ 215*7c478bd9Sstevel@tonic-gate dev_info_t *zs_hdlc_dip; /* zsh dev_info */ 216*7c478bd9Sstevel@tonic-gate time_t zs_dtrlow; /* time dtr went low */ 217*7c478bd9Sstevel@tonic-gate short zs_unit; /* which channel (0:NZSLINE) */ 218*7c478bd9Sstevel@tonic-gate /* 219*7c478bd9Sstevel@tonic-gate * The zs_wreg, zs_next and zs_flags fields 220*7c478bd9Sstevel@tonic-gate * are protected by zs_excl_hi. 221*7c478bd9Sstevel@tonic-gate */ 222*7c478bd9Sstevel@tonic-gate uchar_t zs_suspended; /* True, if suspended */ 223*7c478bd9Sstevel@tonic-gate struct zs_prog *zs_prog_save; /* H/W state, saved for CPR */ 224*7c478bd9Sstevel@tonic-gate struct zscom *zs_next; /* next in the circularly linked list */ 225*7c478bd9Sstevel@tonic-gate struct zscom *zs_back; /* back in the circularly linked list */ 226*7c478bd9Sstevel@tonic-gate 227*7c478bd9Sstevel@tonic-gate kmutex_t *zs_excl_hi; /* zs spinlock mutex */ 228*7c478bd9Sstevel@tonic-gate kmutex_t *zs_excl; /* zs adaptive mutex */ 229*7c478bd9Sstevel@tonic-gate kmutex_t *zs_ocexcl; /* zs adaptive mutex for open/close */ 230*7c478bd9Sstevel@tonic-gate kcondvar_t zs_flags_cv; /* condition variable for flags */ 231*7c478bd9Sstevel@tonic-gate ulong_t zs_priv_str[ZS_MAX_PRIV_STR]; 232*7c478bd9Sstevel@tonic-gate uint_t zs_flags; /* ZS_* flags below */ 233*7c478bd9Sstevel@tonic-gate kstat_t *intrstats; /* interrupt statistics */ 234*7c478bd9Sstevel@tonic-gate timeout_id_t zs_timer; /* close timer */ 235*7c478bd9Sstevel@tonic-gate }; 236*7c478bd9Sstevel@tonic-gate 237*7c478bd9Sstevel@tonic-gate /* 238*7c478bd9Sstevel@tonic-gate * Definition for zs_flags field 239*7c478bd9Sstevel@tonic-gate * 240*7c478bd9Sstevel@tonic-gate * ZS_CLOSED is for synchronizing with za_soft_active an za_kick_active. 241*7c478bd9Sstevel@tonic-gate */ 242*7c478bd9Sstevel@tonic-gate #define ZS_NEEDSOFT 0x00000001 243*7c478bd9Sstevel@tonic-gate #define ZS_PROGRESS 0x00000002 244*7c478bd9Sstevel@tonic-gate #define ZS_CLOSING 0x00000004 /* close has started */ 245*7c478bd9Sstevel@tonic-gate #define ZS_CLOSED 0x00000008 /* close is done; stop other activity */ 246*7c478bd9Sstevel@tonic-gate 247*7c478bd9Sstevel@tonic-gate #ifdef _KERNEL 248*7c478bd9Sstevel@tonic-gate #define ZS_H_LOG_MAX 0x8000 249*7c478bd9Sstevel@tonic-gate /* 250*7c478bd9Sstevel@tonic-gate * ZSSETSOFT macro to pend a level 3 interrupt if one isn't already pending. 251*7c478bd9Sstevel@tonic-gate */ 252*7c478bd9Sstevel@tonic-gate 253*7c478bd9Sstevel@tonic-gate extern kmutex_t zs_soft_lock; /* ptr to lock for zssoftpend */ 254*7c478bd9Sstevel@tonic-gate extern int zssoftpend; /* secondary interrupt pending */ 255*7c478bd9Sstevel@tonic-gate 256*7c478bd9Sstevel@tonic-gate extern ddi_softintr_t zs_softintr_id; 257*7c478bd9Sstevel@tonic-gate #define ZSSETSOFT(zs) { \ 258*7c478bd9Sstevel@tonic-gate zs->zs_flags |= ZS_NEEDSOFT; \ 259*7c478bd9Sstevel@tonic-gate if (!zssoftpend) { \ 260*7c478bd9Sstevel@tonic-gate zssoftpend = 1; \ 261*7c478bd9Sstevel@tonic-gate ddi_trigger_softintr(zs_softintr_id); \ 262*7c478bd9Sstevel@tonic-gate } \ 263*7c478bd9Sstevel@tonic-gate } 264*7c478bd9Sstevel@tonic-gate 265*7c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 266*7c478bd9Sstevel@tonic-gate 267*7c478bd9Sstevel@tonic-gate /* 268*7c478bd9Sstevel@tonic-gate * Lock priority definitions. 269*7c478bd9Sstevel@tonic-gate * XXX: These should be obtained from configuration data, eventually. 270*7c478bd9Sstevel@tonic-gate */ 271*7c478bd9Sstevel@tonic-gate #define ZS_PL ipltospl(SPL3) /* translates to SPARC IPL 6 */ 272*7c478bd9Sstevel@tonic-gate #define ZS_PL_HI ipltospl(SPLTTY) /* translates to SPARC IPL 12 */ 273*7c478bd9Sstevel@tonic-gate 274*7c478bd9Sstevel@tonic-gate /* 275*7c478bd9Sstevel@tonic-gate * Definitions for generic SCC programming routine 276*7c478bd9Sstevel@tonic-gate */ 277*7c478bd9Sstevel@tonic-gate struct zs_prog { 278*7c478bd9Sstevel@tonic-gate struct zscom *zs; /* common data for this channel */ 279*7c478bd9Sstevel@tonic-gate uchar_t flags; /* see definitions below */ 280*7c478bd9Sstevel@tonic-gate uchar_t wr4; /* misc parameters and modes */ 281*7c478bd9Sstevel@tonic-gate uchar_t wr11; /* clock mode control */ 282*7c478bd9Sstevel@tonic-gate uchar_t wr12; /* BRG time constant Lo byte */ 283*7c478bd9Sstevel@tonic-gate uchar_t wr13; /* BRG time constant Hi byte */ 284*7c478bd9Sstevel@tonic-gate uchar_t wr3; /* receiver parameters and control */ 285*7c478bd9Sstevel@tonic-gate uchar_t wr5; /* transmitter parameters and control */ 286*7c478bd9Sstevel@tonic-gate uchar_t wr15; /* external status interrupt control */ 287*7c478bd9Sstevel@tonic-gate }; 288*7c478bd9Sstevel@tonic-gate 289*7c478bd9Sstevel@tonic-gate /* 290*7c478bd9Sstevel@tonic-gate * Definitions for zs_prog flags field 291*7c478bd9Sstevel@tonic-gate */ 292*7c478bd9Sstevel@tonic-gate #define ZSP_SYNC 01 /* 0 = async line; 1 = synchronous */ 293*7c478bd9Sstevel@tonic-gate #define ZSP_NRZI 02 /* 0 = NRZ encoding; 1 = NRZI */ 294*7c478bd9Sstevel@tonic-gate #define ZSP_PLL 04 /* request use of PLL clock source */ 295*7c478bd9Sstevel@tonic-gate #define ZSP_LOOP 010 /* request interal loopback mode */ 296*7c478bd9Sstevel@tonic-gate #define ZSP_PARITY_SPECIAL 020 /* parity error causes ext status int */ 297*7c478bd9Sstevel@tonic-gate #define ZSP_ECHO 040 /* request auto echo mode */ 298*7c478bd9Sstevel@tonic-gate 299*7c478bd9Sstevel@tonic-gate extern void zsa_init(struct zscom *zs); 300*7c478bd9Sstevel@tonic-gate extern int zsmctl(struct zscom *zs, int bits, int how); 301*7c478bd9Sstevel@tonic-gate extern void zs_program(struct zs_prog *zspp); 302*7c478bd9Sstevel@tonic-gate extern void zsopinit(struct zscom *zs, struct zsops *zso); 303*7c478bd9Sstevel@tonic-gate extern void setzssoft(void); 304*7c478bd9Sstevel@tonic-gate extern dev_info_t *zs_get_dev_info(dev_t dev, int otyp); 305*7c478bd9Sstevel@tonic-gate 306*7c478bd9Sstevel@tonic-gate extern char *zssoftCAR; 307*7c478bd9Sstevel@tonic-gate extern int nzs; 308*7c478bd9Sstevel@tonic-gate extern struct zscom *zscom; 309*7c478bd9Sstevel@tonic-gate extern struct zs_prog *zs_prog; 310*7c478bd9Sstevel@tonic-gate extern kmutex_t zs_curr_lock; /* lock protecting zscurr use for clone */ 311*7c478bd9Sstevel@tonic-gate extern struct zsops zsops_null; 312*7c478bd9Sstevel@tonic-gate extern int zs_drain_check; 313*7c478bd9Sstevel@tonic-gate 314*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 315*7c478bd9Sstevel@tonic-gate } 316*7c478bd9Sstevel@tonic-gate #endif 317*7c478bd9Sstevel@tonic-gate 318*7c478bd9Sstevel@tonic-gate #endif /* !_SYS_ZSDEV_H */ 319