blob: a018777dd0de8db908cff46d4b10257bb62d5ce5 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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_LINUX_FD_H
20#define _UAPI_LINUX_FD_H
21#include <linux/ioctl.h>
22#include <linux/compiler.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct floppy_struct {
25 unsigned int size,
26 sect,
27 head,
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 track,
30 stretch;
31#define FD_STRETCH 1
32#define FD_SWAPSIDES 2
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define FD_ZEROBASED 4
35#define FD_SECTBASEMASK 0x3FC
36#define FD_MKSECTBASE(s) (((s) ^ 1) << 2)
37#define FD_SECTBASE(floppy) ((((floppy)->stretch & FD_SECTBASEMASK) >> 2) ^ 1)
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 unsigned char gap,
40 rate,
41#define FD_2M 0x4
42#define FD_SIZECODEMASK 0x38
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)
45#define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? 512 : 128 << FD_SIZECODE(floppy) )
46#define FD_PERP 0x40
47 spec1,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 fmt_gap;
50 const char * name;
51};
52#define FDCLRPRM _IO(2, 0x41)
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
55#define FDSETMEDIAPRM FDSETPRM
56#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
57#define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define FDDEFMEDIAPRM FDDEFPRM
60#define FDGETMEDIAPRM FDGETPRM
61#define FDMSGON _IO(2,0x45)
62#define FDMSGOFF _IO(2,0x46)
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define FD_FILL_BYTE 0xF6
65struct format_descr {
66 unsigned int device,head,track;
67};
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define FDFMTBEG _IO(2,0x47)
70#define FDFMTTRK _IOW(2,0x48, struct format_descr)
71#define FDFMTEND _IO(2,0x49)
72struct floppy_max_errors {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 unsigned int
75 abort,
76 read_track,
77 reset,
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 recal,
80 reporting;
81};
82#define FDSETEMSGTRESH _IO(2,0x4a)
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define FDFLUSH _IO(2,0x4b)
85#define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors)
86#define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors)
87typedef char floppy_drive_name[16];
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name)
90struct floppy_drive_params {
91 signed char cmos;
92 unsigned long max_dtr;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 unsigned long hlt;
95 unsigned long hut;
96 unsigned long srt;
97 unsigned long spinup;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 unsigned long spindown;
100 unsigned char spindown_offset;
101 unsigned char select_delay;
102 unsigned char rps;
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 unsigned char tracks;
105 unsigned long timeout;
106 unsigned char interleave_sect;
107 struct floppy_max_errors max_errors;
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 char flags;
110#define FTD_MSG 0x10
111#define FD_BROKEN_DCL 0x20
112#define FD_DEBUG 0x02
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define FD_SILENT_DCL_CLEAR 0x4
115#define FD_INVERTED_DCL 0x80
116 char read_track;
117 short autodetect[8];
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 int checkfreq;
120 int native_format;
121};
122enum {
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 FD_NEED_TWADDLE_BIT,
125 FD_VERIFY_BIT,
126 FD_DISK_NEWCHANGE_BIT,
127 FD_UNUSED_BIT,
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 FD_DISK_CHANGED_BIT,
130 FD_DISK_WRITABLE_BIT
131};
132#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params)
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params)
135struct floppy_drive_struct {
136 unsigned long flags;
137#define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT)
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#define FD_VERIFY (1 << FD_VERIFY_BIT)
140#define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT)
141#define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT)
142#define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT)
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 unsigned long spinup_date;
145 unsigned long select_date;
146 unsigned long first_read_date;
147 short probed_format;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 short track;
150 short maxblock;
151 short maxtrack;
152 int generation;
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 int keep_data;
155 int fd_ref;
156 int fd_device;
157 unsigned long last_checked;
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 char *dmabuf;
160 int bufblocks;
161};
162#define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct)
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164#define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct)
165enum reset_mode {
166 FD_RESET_IF_NEEDED,
167 FD_RESET_IF_RAWCMD,
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169 FD_RESET_ALWAYS
170};
171#define FDRESET _IO(2, 0x54)
172struct floppy_fdc_state {
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174 int spec1;
175 int spec2;
176 int dtr;
177 unsigned char version;
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
179 unsigned char dor;
180 unsigned long address;
181 unsigned int rawcmd:2;
182 unsigned int reset:1;
183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
184 unsigned int need_configure:1;
185 unsigned int perp_mode:2;
186 unsigned int has_fifo:1;
187 unsigned int driver_version;
188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
189#define FD_DRIVER_VERSION 0x100
190 unsigned char track[4];
191};
192#define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state)
193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
194struct floppy_write_errors {
195 unsigned int write_errors;
196 unsigned long first_error_sector;
197 int first_error_generation;
198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
199 unsigned long last_error_sector;
200 int last_error_generation;
201 unsigned int badness;
202};
203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
204#define FDWERRORCLR _IO(2, 0x56)
205#define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors)
206#define FDHAVEBATCHEDRAWCMD
207struct floppy_raw_cmd {
208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
209 unsigned int flags;
210#define FD_RAW_READ 1
211#define FD_RAW_WRITE 2
212#define FD_RAW_NO_MOTOR 4
213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
214#define FD_RAW_DISK_CHANGE 4
215#define FD_RAW_INTR 8
216#define FD_RAW_SPIN 0x10
217#define FD_RAW_NO_MOTOR_AFTER 0x20
218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
219#define FD_RAW_NEED_DISK 0x40
220#define FD_RAW_NEED_SEEK 0x80
221#define FD_RAW_MORE 0x100
222#define FD_RAW_STOP_IF_FAILURE 0x200
223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
224#define FD_RAW_STOP_IF_SUCCESS 0x400
225#define FD_RAW_SOFTFAILURE 0x800
226#define FD_RAW_FAILURE 0x10000
227#define FD_RAW_HARDFAILURE 0x20000
228/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
229 void __user *data;
230 char *kernel_data;
231 struct floppy_raw_cmd *next;
232 long length;
233/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
234 long phys_length;
235 int buffer_length;
236 unsigned char rate;
237 unsigned char cmd_count;
238/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
239 unsigned char cmd[16];
240 unsigned char reply_count;
241 unsigned char reply[16];
242 int track;
243/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
244 int resultcode;
245 int reserved1;
246 int reserved2;
247};
248/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
249#define FDRAWCMD _IO(2, 0x58)
250#define FDTWADDLE _IO(2, 0x59)
251#define FDEJECT _IO(2, 0x5a)
252#endif
253/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */