/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1991-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_SER_ASYNC_H
#define _SYS_SER_ASYNC_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Initial port setup parameters for async lines
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* The following macro can be used to generate the baud rate generator's
* time constants. The parameters are the input clock to the BRG (eg,
* 5000000 for 5MHz) and the desired baud rate. This macro assumes that
* the clock needed is 16x the desired baud rate.
*/
/ (int)(BaudRate)) + 1)
/*
* this macro needs a constant Hertz, but we can now have a hires_tick.
* ztdelay in zs_async.c converts to a true delay based on hz so we
* can use 100 for Hertz here.
*/
#define I_IFLAGS 0
/*
* Ring buffer and async line management definitions for CPU lines:
*/
#ifdef _KERNEL
#ifndef _ASM
/*
*/
/*
* These flags are shared with mcp_async.c and should be kept in sync.
*/
/* from chip */
/* receiver interrupt occurs */
/*
*/
struct asyncline {
/*
* The following fields are protected by the zs_excl_hi lock.
* Some, such as za_flowc, are set only at the base level and
* cleared (without the lock) only by the interrupt level.
*/
/*
* Each character stuffed into the ring has two bytes associated
* with it. The first byte is used to indicate special conditions
* and the second byte is the actual data. The ring buffer
* needs to be defined as ushort_t to accomodate this.
*/
int za_kick_rcv_count;
/* receive: standby message blocks */
/* complete messages to be sent up */
int za_rdone_wptr;
int za_rdone_rptr;
int za_bad_count_int;
#ifdef ZSA_DEBUG
int za_wr;
int za_rd;
#endif
/*
* ZS exclusive stuff.
*/
union {
struct {
} _z;
} za_uover;
short za_grace_flow_control;
/*
* MCP exclusive stuff.
* These should all be protected by a high priority lock.
*/
/*
* NTP PPS exclusive stuff.
*/
};
#endif /* _ASM */
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* !_SYS_SER_ASYNC_H */