Lines Matching +full:ide +full:- +full:port

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2004-2005 HighPoint Technologies, Inc.
35 * IDE IO Register File
39 * IDE IO Port definition
42 USHORT Data; /* RW: Data port feature register */
44 UCHAR BlockNumber; /* RW: Sector number & LBA 0-7 */
45 UCHAR CylinderLow; /* RW: Cylinder low & LBA 8-15 */
46 UCHAR CylinderHigh; /* RW: Cylinder hign & LBA 16-23 */
47 UCHAR DriveSelect; /* RW: Drive/head & LBA 24-27 */
53 * IDE status definitions
59 #define IDE_STATUS_DSC 0x10 /* not defined in ATA-2 */
79 * IDE command definitions
94 #define IDE_COMMAND_SET_FEATURES 0xEF /* IDE set features command */
106 #define IDE_COMMAND_DMA_READ 0xc8 /* IDE DMA read command */
107 #define IDE_COMMAND_DMA_WRITE 0xca /* IDE DMA write command */
110 #define IDE_COMMAND_READ_DMA_QUEUE 0xc7 /* IDE read DMA queue command */
111 #define IDE_COMMAND_WRITE_DMA_QUEUE 0xcc /* IDE write DMA queue command */
112 #define IDE_COMMAND_SERVICE 0xA2 /* IDE service command command */
113 #define IDE_COMMAND_NOP 0x00 /* IDE NOP command */
156 * IDE Control Register File
160 UCHAR AlternateStatus; /* RW: device control port */
165 * IDE drive control definitions
194 USHORT VendorUnique1[3]; /* 0E 7-9 */
195 USHORT SerialNumber[10]; /* 14 10-19 */
199 USHORT FirmwareRevision[4]; /* 2E 23-26 */
200 USHORT ModelNumber[20]; /* 36 27-46 */
214 ULONG CurrentSectorCapacity; /* 72 57-58 */
216 ULONG UserAddressableSectors; /* 78 60-61 */
227 USHORT Reserved5[2]; /* 8A 69-70 */
234 USHORT Reserved6[9]; /* 98 77-85 */
238 USHORT Reserved7[11]; /* 89-99 */
239 ULONG Lba48BitLow; /* 101-100 */
240 ULONG Lba48BitHigh; /* 103-102 */
241 USHORT Reserved8[23]; /* 104-126 */
243 USHORT Reserved9[128]; /* 128-255 */
271 USHORT VendorUnique1[3]; /* 0E 7-9 */
272 USHORT SerialNumber[10]; /* 14 10-19 */
276 USHORT FirmwareRevision[4]; /* 2E 23-26 */
277 USHORT ModelNumber[20]; /* 36 27-46 */
291 ULONG CurrentSectorCapacity; /* 72 57-58 */
293 ULONG UserAddressableSectors; /* 60-61 */
304 USHORT Reserved5[2]; /* 69-70 */
309 /* USHORT Reserved6[14]; // 75-88 */
346 * IDE Macro
349 #define MAX_LBA_T ((LBA_T)-1)
355 #define mGetStatus(IOPort2) (UCHAR)InPort(&IOPort2->AlternateStatus)
356 #define mUnitControl(IOPort2, Value) OutPort(&IOPort2->AlternateStatus,(UCHAR)(Value))
358 #define mGetErrorCode(IOPort) (UCHAR)InPort((PUCHAR)&IOPort->Data+1)
359 #define mSetFeaturePort(IOPort,x) OutPort((PUCHAR)&IOPort->Data+1, x)
360 #define mSetBlockCount(IOPort,x) OutPort(&IOPort->BlockCount, x)
361 #define mGetBlockCount(IOPort) (UCHAR)InPort(&IOPort->BlockCount)
362 #define mGetInterruptReason(IOPort) (UCHAR)InPort(&IOPort->BlockCount)
363 #define mSetBlockNumber(IOPort,x) OutPort(&IOPort->BlockNumber, x)
364 #define mGetBlockNumber(IOPort) (UCHAR)InPort((PUCHAR)&IOPort->BlockNumber)
365 #define mGetByteLow(IOPort) (UCHAR)InPort(&IOPort->CylinderLow)
366 #define mSetCylinderLow(IOPort,x) OutPort(&IOPort->CylinderLow, x)
367 #define mGetByteHigh(IOPort) (UCHAR)InPort(&IOPort->CylinderHigh)
368 #define mSetCylinderHigh(IOPort,x) OutPort(&IOPort->CylinderHigh, x)
369 #define mGetBaseStatus(IOPort) (UCHAR)InPort(&IOPort->Command)
372 OutPort(&IOPort->DriveSelect, (UCHAR)(UnitId));\
373 OutPort(&IOPort->DriveSelect, (UCHAR)(UnitId));\
376 #define mSelectUnit(IOPort,UnitId) OutPort(&IOPort->DriveSelect, (UCHAR)(UnitId))
378 #define mGetUnitNumber(IOPort) InPort(&IOPort->DriveSelect)
379 #define mIssueCommand(IOPort,Cmd) OutPort(&IOPort->Command, (UCHAR)(Cmd))