kernel: Fix for compiling drm into the kernel.
[dragonfly.git] / sys / platform / pc64 / include / comstats.h
CommitLineData
855a0bf0
AHJ
1/*****************************************************************************/
2
3/*
4 * comstats.h -- Serial Port Stats.
5 *
6 * Copyright (c) 1994-1996 Greg Ungerer (gerg@stallion.oz.au).
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by Greg Ungerer.
20 * 4. Neither the name of the author nor the names of any co-contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * $FreeBSD: src/sys/i386/include/comstats.h,v 1.5 1999/08/28 00:44:09 peter Exp $
37 * $DragonFly: src/sys/platform/pc32/include/comstats.h,v 1.4 2008/05/18 03:02:53 pavalos Exp $
38 */
39
40#ifndef _COMSTATS_H_
41#define _COMSTATS_H_
42
43#include <sys/ioccom.h>
44
45/*
46 * Serial port stats structure. The structure itself is UART
47 * independent, but some fields may be UART/driver specific (for
48 * example state).
49 */
50
51typedef struct {
52 unsigned long brd;
53 unsigned long panel;
54 unsigned long port;
55 unsigned long hwid;
56 unsigned long type;
57 unsigned long txtotal;
58 unsigned long rxtotal;
59 unsigned long txbuffered;
60 unsigned long rxbuffered;
61 unsigned long rxoverrun;
62 unsigned long rxparity;
63 unsigned long rxframing;
64 unsigned long rxlost;
65 unsigned long txbreaks;
66 unsigned long rxbreaks;
67 unsigned long txxon;
68 unsigned long txxoff;
69 unsigned long rxxon;
70 unsigned long rxxoff;
71 unsigned long txctson;
72 unsigned long txctsoff;
73 unsigned long rxrtson;
74 unsigned long rxrtsoff;
75 unsigned long modem;
76 unsigned long state;
77 unsigned long flags;
78 unsigned long ttystate;
79 unsigned long cflags;
80 unsigned long iflags;
81 unsigned long oflags;
82 unsigned long lflags;
83 unsigned long signals;
84} comstats_t;
85
86
87/*
88 * Board stats structure. Returns useful info about the board.
89 */
90
91#define COM_MAXPANELS 8
92
93typedef struct {
94 unsigned long panel;
95 unsigned long type;
96 unsigned long hwid;
97 unsigned long nrports;
98} companel_t;
99
100typedef struct {
101 unsigned long brd;
102 unsigned long type;
103 unsigned long hwid;
104 unsigned long state;
105 unsigned long ioaddr;
106 unsigned long ioaddr2;
107 unsigned long memaddr;
108 unsigned long irq;
109 unsigned long nrpanels;
110 unsigned long nrports;
111 companel_t panels[COM_MAXPANELS];
112} combrd_t;
113
114
115/*
116 * Define the ioctl operations for stats stuff.
117 */
118#define COM_GETPORTSTATS _IOWR('c', 30, comstats_t)
119#define COM_CLRPORTSTATS _IOWR('c', 31, comstats_t)
120#define COM_GETBRDSTATS _IOWR('c', 32, combrd_t)
121
122/*****************************************************************************/
123
124#endif