Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: fdreg.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
#ifndef _LINUX_FDREG_H
[1] Fix | Delete
#define _LINUX_FDREG_H
[2] Fix | Delete
/*
[3] Fix | Delete
* This file contains some defines for the floppy disk controller.
[4] Fix | Delete
* Various sources. Mostly "IBM Microcomputers: A Programmers
[5] Fix | Delete
* Handbook", Sanches and Canton.
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
#ifdef FDPATCHES
[9] Fix | Delete
#define FD_IOPORT fdc_state[fdc].address
[10] Fix | Delete
#else
[11] Fix | Delete
/* It would be a lot saner just to force fdc_state[fdc].address to always
[12] Fix | Delete
be set ! FIXME */
[13] Fix | Delete
#define FD_IOPORT 0x3f0
[14] Fix | Delete
#endif
[15] Fix | Delete
[16] Fix | Delete
/* Fd controller regs. S&C, about page 340 */
[17] Fix | Delete
#define FD_STATUS (4 + FD_IOPORT )
[18] Fix | Delete
#define FD_DATA (5 + FD_IOPORT )
[19] Fix | Delete
[20] Fix | Delete
/* Digital Output Register */
[21] Fix | Delete
#define FD_DOR (2 + FD_IOPORT )
[22] Fix | Delete
[23] Fix | Delete
/* Digital Input Register (read) */
[24] Fix | Delete
#define FD_DIR (7 + FD_IOPORT )
[25] Fix | Delete
[26] Fix | Delete
/* Diskette Control Register (write)*/
[27] Fix | Delete
#define FD_DCR (7 + FD_IOPORT )
[28] Fix | Delete
[29] Fix | Delete
/* Bits of main status register */
[30] Fix | Delete
#define STATUS_BUSYMASK 0x0F /* drive busy mask */
[31] Fix | Delete
#define STATUS_BUSY 0x10 /* FDC busy */
[32] Fix | Delete
#define STATUS_DMA 0x20 /* 0- DMA mode */
[33] Fix | Delete
#define STATUS_DIR 0x40 /* 0- cpu->fdc */
[34] Fix | Delete
#define STATUS_READY 0x80 /* Data reg ready */
[35] Fix | Delete
[36] Fix | Delete
/* Bits of FD_ST0 */
[37] Fix | Delete
#define ST0_DS 0x03 /* drive select mask */
[38] Fix | Delete
#define ST0_HA 0x04 /* Head (Address) */
[39] Fix | Delete
#define ST0_NR 0x08 /* Not Ready */
[40] Fix | Delete
#define ST0_ECE 0x10 /* Equipment check error */
[41] Fix | Delete
#define ST0_SE 0x20 /* Seek end */
[42] Fix | Delete
#define ST0_INTR 0xC0 /* Interrupt code mask */
[43] Fix | Delete
[44] Fix | Delete
/* Bits of FD_ST1 */
[45] Fix | Delete
#define ST1_MAM 0x01 /* Missing Address Mark */
[46] Fix | Delete
#define ST1_WP 0x02 /* Write Protect */
[47] Fix | Delete
#define ST1_ND 0x04 /* No Data - unreadable */
[48] Fix | Delete
#define ST1_OR 0x10 /* OverRun */
[49] Fix | Delete
#define ST1_CRC 0x20 /* CRC error in data or addr */
[50] Fix | Delete
#define ST1_EOC 0x80 /* End Of Cylinder */
[51] Fix | Delete
[52] Fix | Delete
/* Bits of FD_ST2 */
[53] Fix | Delete
#define ST2_MAM 0x01 /* Missing Address Mark (again) */
[54] Fix | Delete
#define ST2_BC 0x02 /* Bad Cylinder */
[55] Fix | Delete
#define ST2_SNS 0x04 /* Scan Not Satisfied */
[56] Fix | Delete
#define ST2_SEH 0x08 /* Scan Equal Hit */
[57] Fix | Delete
#define ST2_WC 0x10 /* Wrong Cylinder */
[58] Fix | Delete
#define ST2_CRC 0x20 /* CRC error in data field */
[59] Fix | Delete
#define ST2_CM 0x40 /* Control Mark = deleted */
[60] Fix | Delete
[61] Fix | Delete
/* Bits of FD_ST3 */
[62] Fix | Delete
#define ST3_HA 0x04 /* Head (Address) */
[63] Fix | Delete
#define ST3_DS 0x08 /* drive is double-sided */
[64] Fix | Delete
#define ST3_TZ 0x10 /* Track Zero signal (1=track 0) */
[65] Fix | Delete
#define ST3_RY 0x20 /* drive is ready */
[66] Fix | Delete
#define ST3_WP 0x40 /* Write Protect */
[67] Fix | Delete
#define ST3_FT 0x80 /* Drive Fault */
[68] Fix | Delete
[69] Fix | Delete
/* Values for FD_COMMAND */
[70] Fix | Delete
#define FD_RECALIBRATE 0x07 /* move to track 0 */
[71] Fix | Delete
#define FD_SEEK 0x0F /* seek track */
[72] Fix | Delete
#define FD_READ 0xE6 /* read with MT, MFM, SKip deleted */
[73] Fix | Delete
#define FD_WRITE 0xC5 /* write with MT, MFM */
[74] Fix | Delete
#define FD_SENSEI 0x08 /* Sense Interrupt Status */
[75] Fix | Delete
#define FD_SPECIFY 0x03 /* specify HUT etc */
[76] Fix | Delete
#define FD_FORMAT 0x4D /* format one track */
[77] Fix | Delete
#define FD_VERSION 0x10 /* get version code */
[78] Fix | Delete
#define FD_CONFIGURE 0x13 /* configure FIFO operation */
[79] Fix | Delete
#define FD_PERPENDICULAR 0x12 /* perpendicular r/w mode */
[80] Fix | Delete
#define FD_GETSTATUS 0x04 /* read ST3 */
[81] Fix | Delete
#define FD_DUMPREGS 0x0E /* dump the contents of the fdc regs */
[82] Fix | Delete
#define FD_READID 0xEA /* prints the header of a sector */
[83] Fix | Delete
#define FD_UNLOCK 0x14 /* Fifo config unlock */
[84] Fix | Delete
#define FD_LOCK 0x94 /* Fifo config lock */
[85] Fix | Delete
#define FD_RSEEK_OUT 0x8f /* seek out (i.e. to lower tracks) */
[86] Fix | Delete
#define FD_RSEEK_IN 0xcf /* seek in (i.e. to higher tracks) */
[87] Fix | Delete
[88] Fix | Delete
/* the following commands are new in the 82078. They are not used in the
[89] Fix | Delete
* floppy driver, except the first three. These commands may be useful for apps
[90] Fix | Delete
* which use the FDRAWCMD interface. For doc, get the 82078 spec sheets at
[91] Fix | Delete
* http://www.intel.com/design/archives/periphrl/docs/29046803.htm */
[92] Fix | Delete
[93] Fix | Delete
#define FD_PARTID 0x18 /* part id ("extended" version cmd) */
[94] Fix | Delete
#define FD_SAVE 0x2e /* save fdc regs for later restore */
[95] Fix | Delete
#define FD_DRIVESPEC 0x8e /* drive specification: Access to the
[96] Fix | Delete
* 2 Mbps data transfer rate for tape
[97] Fix | Delete
* drives */
[98] Fix | Delete
[99] Fix | Delete
#define FD_RESTORE 0x4e /* later restore */
[100] Fix | Delete
#define FD_POWERDOWN 0x27 /* configure FDC's powersave features */
[101] Fix | Delete
#define FD_FORMAT_N_WRITE 0xef /* format and write in one go. */
[102] Fix | Delete
#define FD_OPTION 0x33 /* ISO format (which is a clean way to
[103] Fix | Delete
* pack more sectors on a track) */
[104] Fix | Delete
[105] Fix | Delete
/* DMA commands */
[106] Fix | Delete
#define DMA_READ 0x46
[107] Fix | Delete
#define DMA_WRITE 0x4A
[108] Fix | Delete
[109] Fix | Delete
/* FDC version return types */
[110] Fix | Delete
#define FDC_NONE 0x00
[111] Fix | Delete
#define FDC_UNKNOWN 0x10 /* DO NOT USE THIS TYPE EXCEPT IF IDENTIFICATION
[112] Fix | Delete
FAILS EARLY */
[113] Fix | Delete
#define FDC_8272A 0x20 /* Intel 8272a, NEC 765 */
[114] Fix | Delete
#define FDC_765ED 0x30 /* Non-Intel 1MB-compatible FDC, can't detect */
[115] Fix | Delete
#define FDC_82072 0x40 /* Intel 82072; 8272a + FIFO + DUMPREGS */
[116] Fix | Delete
#define FDC_82072A 0x45 /* 82072A (on Sparcs) */
[117] Fix | Delete
#define FDC_82077_ORIG 0x51 /* Original version of 82077AA, sans LOCK */
[118] Fix | Delete
#define FDC_82077 0x52 /* 82077AA-1 */
[119] Fix | Delete
#define FDC_82078_UNKN 0x5f /* Unknown 82078 variant */
[120] Fix | Delete
#define FDC_82078 0x60 /* 44pin 82078 or 64pin 82078SL */
[121] Fix | Delete
#define FDC_82078_1 0x61 /* 82078-1 (2Mbps fdc) */
[122] Fix | Delete
#define FDC_S82078B 0x62 /* S82078B (first seen on Adaptec AVA-2825 VLB
[123] Fix | Delete
* SCSI/EIDE/Floppy controller) */
[124] Fix | Delete
#define FDC_87306 0x63 /* National Semiconductor PC 87306 */
[125] Fix | Delete
[126] Fix | Delete
/*
[127] Fix | Delete
* Beware: the fdc type list is roughly sorted by increasing features.
[128] Fix | Delete
* Presence of features is tested by comparing the FDC version id with the
[129] Fix | Delete
* "oldest" version that has the needed feature.
[130] Fix | Delete
* If during FDC detection, an obscure test fails late in the sequence, don't
[131] Fix | Delete
* assign FDC_UNKNOWN. Else the FDC will be treated as a dumb 8272a, or worse.
[132] Fix | Delete
* This is especially true if the tests are unneeded.
[133] Fix | Delete
*/
[134] Fix | Delete
[135] Fix | Delete
#define FD_RESET_DELAY 20
[136] Fix | Delete
#endif
[137] Fix | Delete
[138] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function