1655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/****************************************************************************
2655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************
3655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
4655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   This header was automatically generated from a Linux kernel header
5655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   of the same name, to make information necessary for userspace to
6655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   call into the kernel available to libc.  It contains only constants,
7655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   structures, and macros generated from the original header, and thus,
8655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   contains no copyrightable information.
9655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
10655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   To edit the content of this header, modify the corresponding
11655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   source file (e.g. under external/kernel-headers/original/) then
12655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   run bionic/libc/kernel/tools/update_all.py
13655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
14655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   Any manual change here will be lost the next time this script will
15655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   be run. You've been warned!
16655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
17655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************
18655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************/
19655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#ifndef _UAPI_HDLCDRV_H
20655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _UAPI_HDLCDRV_H
21655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct hdlcdrv_params {
22d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int iobase;
23655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int irq;
25d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int dma;
26d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int dma2;
27d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int seriobase;
28655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int pariobase;
30d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int midiiobase;
31655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
32655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct hdlcdrv_channel_params {
33655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int tx_delay;
35d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int tx_tail;
36d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int slottime;
37d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int ppersist;
38655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int fulldup;
40655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
41655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct hdlcdrv_old_channel_state {
42d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int ptt;
43655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int dcd;
45d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int ptt_keyed;
46655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
47655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct hdlcdrv_channel_state {
48655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int ptt;
50d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int dcd;
51d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int ptt_keyed;
52d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long tx_packets;
53655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long tx_errors;
55d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long rx_packets;
56d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  unsigned long rx_errors;
57655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
58655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct hdlcdrv_ioctl {
60d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int cmd;
61d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  union {
62d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct hdlcdrv_params mp;
63655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct hdlcdrv_channel_params cp;
65d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct hdlcdrv_channel_state cs;
66d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct hdlcdrv_old_channel_state ocs;
67d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    unsigned int calibrate;
68655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    unsigned char bits;
70d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    char modename[128];
71d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    char drivername[32];
72d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  } data;
73655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
75655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_GETMODEMPAR 0
76655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_SETMODEMPAR 1
77655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_MODEMPARMASK 2
78655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_GETCHANNELPAR 10
80655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_SETCHANNELPAR 11
81655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_OLDGETSTAT 20
82655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_CALIBRATE 21
83655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_GETSTAT 22
85655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_GETSAMPLES 30
86655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_GETBITS 31
87655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_GETMODE 40
88655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_SETMODE 41
90655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_MODELIST 42
91655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define HDLCDRVCTL_DRIVERNAME 43
92d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define HDLCDRV_PARMASK_IOBASE (1 << 0)
93655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define HDLCDRV_PARMASK_IRQ (1 << 1)
95d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define HDLCDRV_PARMASK_DMA (1 << 2)
96d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define HDLCDRV_PARMASK_DMA2 (1 << 3)
97d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define HDLCDRV_PARMASK_SERIOBASE (1 << 4)
98655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define HDLCDRV_PARMASK_PARIOBASE (1 << 5)
100d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define HDLCDRV_PARMASK_MIDIIOBASE (1 << 6)
101655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#endif
102