| 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 _LINUX_FDREG_H | 
|  | 20 | #define _LINUX_FDREG_H | 
| Christopher Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 21 | #define FD_SRA 0 | 
|  | 22 | #define FD_SRB 1 | 
|  | 23 | #define FD_DOR 2 | 
|  | 24 | #define FD_TDR 3 | 
|  | 25 | #define FD_DSR 4 | 
| Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 26 | #define FD_STATUS 4 | 
|  | 27 | #define FD_DATA 5 | 
| Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 28 | #define FD_DIR 7 | 
|  | 29 | #define FD_DCR 7 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 30 | #define STATUS_BUSYMASK 0x0F | 
|  | 31 | #define STATUS_BUSY 0x10 | 
|  | 32 | #define STATUS_DMA 0x20 | 
|  | 33 | #define STATUS_DIR 0x40 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #define STATUS_READY 0x80 | 
|  | 35 | #define ST0_DS 0x03 | 
|  | 36 | #define ST0_HA 0x04 | 
|  | 37 | #define ST0_NR 0x08 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | #define ST0_ECE 0x10 | 
|  | 39 | #define ST0_SE 0x20 | 
|  | 40 | #define ST0_INTR 0xC0 | 
|  | 41 | #define ST1_MAM 0x01 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | #define ST1_WP 0x02 | 
|  | 43 | #define ST1_ND 0x04 | 
|  | 44 | #define ST1_OR 0x10 | 
|  | 45 | #define ST1_CRC 0x20 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 46 | #define ST1_EOC 0x80 | 
|  | 47 | #define ST2_MAM 0x01 | 
|  | 48 | #define ST2_BC 0x02 | 
|  | 49 | #define ST2_SNS 0x04 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | #define ST2_SEH 0x08 | 
|  | 51 | #define ST2_WC 0x10 | 
|  | 52 | #define ST2_CRC 0x20 | 
|  | 53 | #define ST2_CM 0x40 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 54 | #define ST3_HA 0x04 | 
|  | 55 | #define ST3_DS 0x08 | 
|  | 56 | #define ST3_TZ 0x10 | 
|  | 57 | #define ST3_RY 0x20 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 58 | #define ST3_WP 0x40 | 
|  | 59 | #define ST3_FT 0x80 | 
|  | 60 | #define FD_RECALIBRATE 0x07 | 
|  | 61 | #define FD_SEEK 0x0F | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | #define FD_READ 0xE6 | 
|  | 63 | #define FD_WRITE 0xC5 | 
|  | 64 | #define FD_SENSEI 0x08 | 
|  | 65 | #define FD_SPECIFY 0x03 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 66 | #define FD_FORMAT 0x4D | 
|  | 67 | #define FD_VERSION 0x10 | 
|  | 68 | #define FD_CONFIGURE 0x13 | 
|  | 69 | #define FD_PERPENDICULAR 0x12 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | #define FD_GETSTATUS 0x04 | 
|  | 71 | #define FD_DUMPREGS 0x0E | 
|  | 72 | #define FD_READID 0xEA | 
|  | 73 | #define FD_UNLOCK 0x14 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | #define FD_LOCK 0x94 | 
|  | 75 | #define FD_RSEEK_OUT 0x8f | 
|  | 76 | #define FD_RSEEK_IN 0xcf | 
|  | 77 | #define FD_PARTID 0x18 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 78 | #define FD_SAVE 0x2e | 
|  | 79 | #define FD_DRIVESPEC 0x8e | 
|  | 80 | #define FD_RESTORE 0x4e | 
|  | 81 | #define FD_POWERDOWN 0x27 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | #define FD_FORMAT_N_WRITE 0xef | 
|  | 83 | #define FD_OPTION 0x33 | 
|  | 84 | #define DMA_READ 0x46 | 
|  | 85 | #define DMA_WRITE 0x4A | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 86 | #define FDC_NONE 0x00 | 
|  | 87 | #define FDC_UNKNOWN 0x10 | 
|  | 88 | #define FDC_8272A 0x20 | 
|  | 89 | #define FDC_765ED 0x30 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 90 | #define FDC_82072 0x40 | 
|  | 91 | #define FDC_82072A 0x45 | 
|  | 92 | #define FDC_82077_ORIG 0x51 | 
|  | 93 | #define FDC_82077 0x52 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 94 | #define FDC_82078_UNKN 0x5f | 
|  | 95 | #define FDC_82078 0x60 | 
|  | 96 | #define FDC_82078_1 0x61 | 
|  | 97 | #define FDC_S82078B 0x62 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | #define FDC_87306 0x63 | 
|  | 99 | #define FD_RESET_DELAY 20 | 
|  | 100 | #endif |