blob: 5280a59eeaa9b1383d6536054be137440349d288 [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 _LINUX_FDREG_H
20#define _LINUX_FDREG_H
21#ifdef FDPATCHES
22#define FD_IOPORT fdc_state[fdc].address
Ben Cheng655a7c02013-10-16 16:09:24 -070023#else
24#define FD_IOPORT 0x3f0
25#endif
Tao Baod7db5942015-01-28 10:07:51 -080026#define FD_STATUS (4 + FD_IOPORT)
Tao Baod7db5942015-01-28 10:07:51 -080027#define FD_DATA (5 + FD_IOPORT)
28#define FD_DOR (2 + FD_IOPORT)
29#define FD_DIR (7 + FD_IOPORT)
30#define FD_DCR (7 + FD_IOPORT)
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define STATUS_BUSYMASK 0x0F
32#define STATUS_BUSY 0x10
33#define STATUS_DMA 0x20
34#define STATUS_DIR 0x40
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define STATUS_READY 0x80
36#define ST0_DS 0x03
37#define ST0_HA 0x04
38#define ST0_NR 0x08
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define ST0_ECE 0x10
40#define ST0_SE 0x20
41#define ST0_INTR 0xC0
42#define ST1_MAM 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define ST1_WP 0x02
44#define ST1_ND 0x04
45#define ST1_OR 0x10
46#define ST1_CRC 0x20
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define ST1_EOC 0x80
48#define ST2_MAM 0x01
49#define ST2_BC 0x02
50#define ST2_SNS 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define ST2_SEH 0x08
52#define ST2_WC 0x10
53#define ST2_CRC 0x20
54#define ST2_CM 0x40
Ben Cheng655a7c02013-10-16 16:09:24 -070055#define ST3_HA 0x04
56#define ST3_DS 0x08
57#define ST3_TZ 0x10
58#define ST3_RY 0x20
Ben Cheng655a7c02013-10-16 16:09:24 -070059#define ST3_WP 0x40
60#define ST3_FT 0x80
61#define FD_RECALIBRATE 0x07
62#define FD_SEEK 0x0F
Ben Cheng655a7c02013-10-16 16:09:24 -070063#define FD_READ 0xE6
64#define FD_WRITE 0xC5
65#define FD_SENSEI 0x08
66#define FD_SPECIFY 0x03
Ben Cheng655a7c02013-10-16 16:09:24 -070067#define FD_FORMAT 0x4D
68#define FD_VERSION 0x10
69#define FD_CONFIGURE 0x13
70#define FD_PERPENDICULAR 0x12
Ben Cheng655a7c02013-10-16 16:09:24 -070071#define FD_GETSTATUS 0x04
72#define FD_DUMPREGS 0x0E
73#define FD_READID 0xEA
74#define FD_UNLOCK 0x14
Ben Cheng655a7c02013-10-16 16:09:24 -070075#define FD_LOCK 0x94
76#define FD_RSEEK_OUT 0x8f
77#define FD_RSEEK_IN 0xcf
78#define FD_PARTID 0x18
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define FD_SAVE 0x2e
80#define FD_DRIVESPEC 0x8e
81#define FD_RESTORE 0x4e
82#define FD_POWERDOWN 0x27
Ben Cheng655a7c02013-10-16 16:09:24 -070083#define FD_FORMAT_N_WRITE 0xef
84#define FD_OPTION 0x33
85#define DMA_READ 0x46
86#define DMA_WRITE 0x4A
Ben Cheng655a7c02013-10-16 16:09:24 -070087#define FDC_NONE 0x00
88#define FDC_UNKNOWN 0x10
89#define FDC_8272A 0x20
90#define FDC_765ED 0x30
Ben Cheng655a7c02013-10-16 16:09:24 -070091#define FDC_82072 0x40
92#define FDC_82072A 0x45
93#define FDC_82077_ORIG 0x51
94#define FDC_82077 0x52
Ben Cheng655a7c02013-10-16 16:09:24 -070095#define FDC_82078_UNKN 0x5f
96#define FDC_82078 0x60
97#define FDC_82078_1 0x61
98#define FDC_S82078B 0x62
Ben Cheng655a7c02013-10-16 16:09:24 -070099#define FDC_87306 0x63
100#define FD_RESET_DELAY 20
101#endif