2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
40 enum ATATimingProtocol
42 kATATimingPIO
= (1 << 0),
43 kATATimingDMA
= (1 << 1),
44 kATATimingUltraDMA33
= (1 << 2),
45 kATATimingUltraDMA66
= (1 << 3),
53 kATAProtocolSetRegs
= (1 << 0),
54 kATAProtocolPIO
= (1 << 1),
55 kATAProtocolDMA
= (1 << 2),
56 kATAProtocolDMAQueued
= (1 << 3),
57 kATAProtocolDMAQueuedRelease
= (1 << 4),
59 kATAProtocolATAPIPIO
= (1 << 16),
60 kATAProtocolATAPIDMA
= (1 << 17),
65 typedef struct ATATiming
67 enum ATATimingProtocol timingProtocol
;
69 UInt32 featureSetting
;
89 kATAReturnNotSupported
,
93 kATAReturnInterruptTimeout
,
94 kATAReturnStatusError
,
95 kATAReturnProtocolError
,
100 #define ATARegtoMask(reg) (1<<(reg))
102 typedef struct ATATaskfile
104 enum ATAProtocol protocol
;
114 UInt32 ataRegs
[kMaxATARegs
];
121 kATACmdFlagTimingChanged
= 0x00000001,
124 typedef struct ATACDBInfo
140 typedef struct ATAResults
144 UInt32 bytesTransferred
;
146 enum ATAReturnCode adapterStatus
;
148 Boolean requestSenseDone
;
149 UInt32 requestSenseLength
;
151 UInt32 ataRegs
[kMaxATARegs
];