| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
 | 2 |  **************************************************************************** | 
 | 3 |  *** | 
 | 4 |  ***   This header was automatically generated from a Linux kernel header | 
 | 5 |  ***   of the same name, to make information necessary for userspace to | 
 | 6 |  ***   call into the kernel available to libc.  It contains only constants, | 
 | 7 |  ***   structures, and macros generated from the original header, and thus, | 
 | 8 |  ***   contains no copyrightable information. | 
 | 9 |  *** | 
 | 10 |  ***   To edit the content of this header, modify the corresponding | 
 | 11 |  ***   source file (e.g. under external/kernel-headers/original/) then | 
 | 12 |  ***   run bionic/libc/kernel/tools/update_all.py | 
 | 13 |  *** | 
 | 14 |  ***   Any manual change here will be lost the next time this script will | 
 | 15 |  ***   be run. You've been warned! | 
 | 16 |  *** | 
 | 17 |  **************************************************************************** | 
 | 18 |  ****************************************************************************/ | 
 | 19 | #ifndef _UAPI_SCC_H | 
 | 20 | #define _UAPI_SCC_H | 
| Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 21 | #include <linux/sockios.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 22 | #define PA0HZP 0x00 | 
 | 23 | #define EAGLE 0x01 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 24 | #define PC100 0x02 | 
 | 25 | #define PRIMUS 0x04 | 
 | 26 | #define DRSI 0x08 | 
 | 27 | #define BAYCOM 0x10 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | enum SCC_ioctl_cmds { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 |   SIOCSCCRESERVED = SIOCDEVPRIVATE, | 
 | 30 |   SIOCSCCCFG, | 
 | 31 |   SIOCSCCINI, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 32 |   SIOCSCCCHANINI, | 
 | 33 |   SIOCSCCSMEM, | 
 | 34 |   SIOCSCCGKISS, | 
 | 35 |   SIOCSCCSKISS, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 |   SIOCSCCGSTAT, | 
 | 37 |   SIOCSCCCAL | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | }; | 
 | 39 | enum L1_params { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 |   PARAM_DATA, | 
 | 41 |   PARAM_TXDELAY, | 
 | 42 |   PARAM_PERSIST, | 
 | 43 |   PARAM_SLOTTIME, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 44 |   PARAM_TXTAIL, | 
 | 45 |   PARAM_FULLDUP, | 
 | 46 |   PARAM_SOFTDCD, | 
 | 47 |   PARAM_MUTE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 48 |   PARAM_DTR, | 
 | 49 |   PARAM_RTS, | 
 | 50 |   PARAM_SPEED, | 
 | 51 |   PARAM_ENDDELAY, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 |   PARAM_GROUP, | 
 | 53 |   PARAM_IDLE, | 
 | 54 |   PARAM_MIN, | 
 | 55 |   PARAM_MAXKEY, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 |   PARAM_WAIT, | 
 | 57 |   PARAM_MAXDEFER, | 
 | 58 |   PARAM_TX, | 
 | 59 |   PARAM_HWEVENT = 31, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 |   PARAM_RETURN = 255 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | }; | 
 | 62 | enum FULLDUP_modes { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 |   KISS_DUPLEX_HALF, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 64 |   KISS_DUPLEX_FULL, | 
 | 65 |   KISS_DUPLEX_LINK, | 
 | 66 |   KISS_DUPLEX_OPTIMA | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | #define TIMER_OFF 65535U | 
 | 69 | #define NO_SUCH_PARAM 65534U | 
 | 70 | enum HWEVENT_opts { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 |   HWEV_DCD_ON, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 72 |   HWEV_DCD_OFF, | 
 | 73 |   HWEV_ALL_SENT | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | }; | 
 | 75 | #define RXGROUP 0100 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 76 | #define TXGROUP 0200 | 
 | 77 | enum CLOCK_sources { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 78 |   CLK_DPLL, | 
 | 79 |   CLK_EXTERNAL, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 80 |   CLK_DIVIDER, | 
 | 81 |   CLK_BRG | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | }; | 
 | 83 | enum TX_state { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 84 |   TXS_IDLE, | 
 | 85 |   TXS_BUSY, | 
 | 86 |   TXS_ACTIVE, | 
 | 87 |   TXS_NEWFRAME, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 88 |   TXS_IDLE2, | 
 | 89 |   TXS_WAIT, | 
 | 90 |   TXS_TIMEOUT | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 92 | typedef unsigned long io_port; | 
 | 93 | struct scc_stat { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 94 |   long rxints; | 
 | 95 |   long txints; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 96 |   long exints; | 
 | 97 |   long spints; | 
 | 98 |   long txframes; | 
 | 99 |   long rxframes; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 |   long rxerrs; | 
 | 101 |   long txerrs; | 
 | 102 |   unsigned int nospace; | 
 | 103 |   unsigned int rx_over; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 104 |   unsigned int tx_under; | 
 | 105 |   unsigned int tx_state; | 
 | 106 |   int tx_queued; | 
 | 107 |   unsigned int maxqueue; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 108 |   unsigned int bufsize; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 109 | }; | 
 | 110 | struct scc_modem { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 111 |   long speed; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 112 |   char clocksrc; | 
 | 113 |   char nrz; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 114 | }; | 
 | 115 | struct scc_kiss_cmd { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 116 |   int command; | 
 | 117 |   unsigned param; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 118 | }; | 
 | 119 | struct scc_hw_config { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 120 |   io_port data_a; | 
 | 121 |   io_port ctrl_a; | 
 | 122 |   io_port data_b; | 
 | 123 |   io_port ctrl_b; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 124 |   io_port vector_latch; | 
 | 125 |   io_port special; | 
 | 126 |   int irq; | 
 | 127 |   long clock; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 128 |   char option; | 
 | 129 |   char brand; | 
 | 130 |   char escc; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 132 | struct scc_mem_config { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 133 |   unsigned int dummy; | 
 | 134 |   unsigned int bufsize; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 135 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 136 | struct scc_calibrate { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 137 |   unsigned int time; | 
 | 138 |   unsigned char pattern; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 139 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 140 | #endif |