Change #define bit(a) 1 << (a)
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / AtapiPassThru / Dxe / AtapiPassThru.h
CommitLineData
ed72955c 1/** @file\r
2 Copyright (c) 2006, Intel Corporation \r
3 All rights reserved. This program and the accompanying materials \r
4 are licensed and made available under the terms and conditions of the BSD License \r
5 which accompanies this distribution. The full text of the license may be found at \r
6 http://opensource.org/licenses/bsd-license.php \r
878ddf1f 7\r
ed72955c 8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
878ddf1f 10\r
ed72955c 11 Module Name: AtapiPassThru.h\r
878ddf1f 12\r
ed72955c 13**/\r
878ddf1f 14\r
15#ifndef _APT_H\r
16#define _APT_H\r
17\r
18\r
f0ec738d 19#include <IndustryStandard/pci22.h>\r
878ddf1f 20\r
ed72955c 21///\r
22/// bit definition\r
23///\r
1723b2e2 24#define bit(a) (1 << (a))\r
878ddf1f 25\r
26#define MAX_TARGET_ID 4\r
ed72955c 27\r
878ddf1f 28//\r
29// IDE Registers\r
30//\r
31typedef union {\r
32 UINT16 Command; /* when write */\r
33 UINT16 Status; /* when read */\r
34} IDE_CMD_OR_STATUS;\r
35\r
36typedef union {\r
37 UINT16 Error; /* when read */\r
38 UINT16 Feature; /* when write */\r
39} IDE_ERROR_OR_FEATURE;\r
40\r
41typedef union {\r
42 UINT16 AltStatus; /* when read */\r
43 UINT16 DeviceControl; /* when write */\r
44} IDE_AltStatus_OR_DeviceControl;\r
45\r
ed72955c 46///\r
47/// IDE registers set\r
48///\r
878ddf1f 49typedef struct {\r
50 UINT16 Data;\r
51 IDE_ERROR_OR_FEATURE Reg1;\r
52 UINT16 SectorCount;\r
53 UINT16 SectorNumber;\r
54 UINT16 CylinderLsb;\r
55 UINT16 CylinderMsb;\r
56 UINT16 Head;\r
57 IDE_CMD_OR_STATUS Reg;\r
58\r
59 IDE_AltStatus_OR_DeviceControl Alt;\r
60 UINT16 DriveAddress;\r
61\r
62 UINT16 MasterSlave;\r
63} IDE_BASE_REGISTERS;\r
64\r
65#define ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE EFI_SIGNATURE_32 ('a', 's', 'p', 't')\r
66\r
67typedef struct {\r
68 UINTN Signature;\r
69\r
70 EFI_HANDLE Handle;\r
71 EFI_SCSI_PASS_THRU_PROTOCOL ScsiPassThru;\r
72 EFI_SCSI_PASS_THRU_MODE ScsiPassThruMode;\r
73 EFI_PCI_IO_PROTOCOL *PciIo;\r
74\r
75 //\r
76 // Local Data goes here\r
77 //\r
78 IDE_BASE_REGISTERS *IoPort;\r
79\r
80 CHAR16 ControllerName[100];\r
81 CHAR16 ChannelName[100];\r
82\r
83 UINT32 LatestTargetId;\r
84 UINT64 LatestLun;\r
85\r
86} ATAPI_SCSI_PASS_THRU_DEV;\r
87\r
88#define ATAPI_SCSI_PASS_THRU_DEV_FROM_THIS(a) \\r
89 CR (a, \\r
90 ATAPI_SCSI_PASS_THRU_DEV, \\r
91 ScsiPassThru, \\r
92 ATAPI_SCSI_PASS_THRU_DEV_SIGNATURE \\r
93 )\r
94\r
95//\r
96// Global Variables\r
97//\r
98extern EFI_DRIVER_BINDING_PROTOCOL gAtapiScsiPassThruDriverBinding;\r
99extern EFI_COMPONENT_NAME_PROTOCOL gAtapiScsiPassThruComponentName;\r
100\r
101//\r
102// ATAPI Command op code\r
103//\r
104#define OP_INQUIRY 0x12\r
105#define OP_LOAD_UNLOAD_CD 0xa6\r
106#define OP_MECHANISM_STATUS 0xbd\r
107#define OP_MODE_SELECT_10 0x55\r
108#define OP_MODE_SENSE_10 0x5a\r
109#define OP_PAUSE_RESUME 0x4b\r
110#define OP_PLAY_AUDIO_10 0x45\r
111#define OP_PLAY_AUDIO_MSF 0x47\r
112#define OP_PLAY_CD 0xbc\r
113#define OP_PLAY_CD_MSF 0xb4\r
114#define OP_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1e\r
115#define OP_READ_10 0x28\r
116#define OP_READ_12 0xa8\r
117#define OP_READ_CAPACITY 0x25\r
118#define OP_READ_CD 0xbe\r
119#define OP_READ_CD_MSF 0xb9\r
120#define OP_READ_HEADER 0x44\r
121#define OP_READ_SUB_CHANNEL 0x42\r
122#define OP_READ_TOC 0x43\r
123#define OP_REQUEST_SENSE 0x03\r
124#define OP_SCAN 0xba\r
125#define OP_SEEK_10 0x2b\r
126#define OP_SET_CD_SPEED 0xbb\r
127#define OP_STOPPLAY_SCAN 0x4e\r
128#define OP_START_STOP_UNIT 0x1b\r
129#define OP_TEST_UNIT_READY 0x00\r
130\r
131#define OP_FORMAT_UNIT 0x04\r
132#define OP_READ_FORMAT_CAPACITIES 0x23\r
133#define OP_VERIFY 0x2f\r
134#define OP_WRITE_10 0x2a\r
135#define OP_WRITE_12 0xaa\r
136#define OP_WRITE_AND_VERIFY 0x2e\r
137\r
138//\r
139// ATA Command\r
140//\r
141#define ATAPI_SOFT_RESET_CMD 0x08\r
142\r
143typedef enum {\r
144 DataIn = 0,\r
145 DataOut = 1,\r
146 NoData = 2,\r
147 End = 0xff\r
148} DATA_DIRECTION;\r
149\r
150typedef struct {\r
151 UINT8 OpCode;\r
152 DATA_DIRECTION Direction;\r
153} SCSI_COMMAND_SET;\r
154\r
155#define MAX_CHANNEL 2\r
156\r
157#define ValidCdbLength(Len) ((Len) == 6 || (Len) == 10 || (Len) == 12) ? 1 : 0\r
158\r
159//\r
160// IDE registers bit definitions\r
161//\r
162// ATA Err Reg bitmap\r
163//\r
ed72955c 164#define BBK_ERR bit (7) ///< Bad block detected\r
165#define UNC_ERR bit (6) ///< Uncorrectable Data\r
166#define MC_ERR bit (5) ///< Media Change\r
167#define IDNF_ERR bit (4) ///< ID Not Found\r
168#define MCR_ERR bit (3) ///< Media Change Requested\r
169#define ABRT_ERR bit (2) ///< Aborted Command\r
170#define TK0NF_ERR bit (1) ///< Track 0 Not Found\r
171#define AMNF_ERR bit (0) ///< Address Mark Not Found\r
878ddf1f 172\r
173//\r
174// ATAPI Err Reg bitmap\r
175//\r
176#define SENSE_KEY_ERR (bit (7) | bit (6) | bit (5) | bit (4))\r
ed72955c 177#define EOM_ERR bit (1) ///< End of Media Detected\r
178#define ILI_ERR bit (0) ///< Illegal Length Indication\r
878ddf1f 179\r
180//\r
181// Device/Head Reg\r
182//\r
183#define LBA_MODE bit (6)\r
184#define DEV bit (4)\r
185#define HS3 bit (3)\r
186#define HS2 bit (2)\r
187#define HS1 bit (1)\r
188#define HS0 bit (0)\r
189#define CHS_MODE (0)\r
190#define DRV0 (0)\r
191#define DRV1 (1)\r
192#define MST_DRV DRV0\r
193#define SLV_DRV DRV1\r
194\r
195//\r
196// Status Reg\r
197//\r
ed72955c 198#define BSY bit (7) ///< Controller Busy\r
199#define DRDY bit (6) ///< Drive Ready\r
200#define DWF bit (5) ///< Drive Write Fault\r
201#define DSC bit (4) ///< Disk Seek Complete\r
202#define DRQ bit (3) ///< Data Request\r
203#define CORR bit (2) ///< Corrected Data\r
204#define IDX bit (1) ///< Index\r
205#define ERR bit (0) ///< Error\r
206#define CHECK bit (0) ///< Check bit for ATAPI Status Reg\r
878ddf1f 207\r
208//\r
209// Device Control Reg\r
210//\r
ed72955c 211#define SRST bit (2) ///< Software Reset\r
212#define IEN_L bit (1) ///< Interrupt Enable\r
878ddf1f 213\r
214//\r
215// ATAPI Feature Register\r
216//\r
217#define OVERLAP bit (1)\r
218#define DMA bit (0)\r
219\r
220//\r
221// ATAPI Interrupt Reason Reson Reg (ATA Sector Count Register)\r
222//\r
223#define RELEASE bit (2)\r
224#define IO bit (1)\r
225#define CoD bit (0)\r
226\r
227#define PACKET_CMD 0xA0\r
228\r
229#define DEFAULT_CMD (0xa0)\r
230//\r
231// default content of device control register, disable INT\r
232//\r
233#define DEFAULT_CTL (0x0a)\r
234#define MAX_ATAPI_BYTE_COUNT (0xfffe)\r
235\r
236//\r
237// function prototype\r
238//\r
ed72955c 239/**\r
240 AtapiScsiPassThruDriverEntryPoint\r
241\r
242 @param ImageHandle\r
243 @param SystemTable\r
244\r
245 @todo Add function description\r
246 @todo ImageHandle - add argument description\r
247 @todo SystemTable - add argument description\r
248 @todo add return values\r
249--*/\r
878ddf1f 250EFI_STATUS\r
251EFIAPI\r
252AtapiScsiPassThruDriverEntryPoint (\r
253 IN EFI_HANDLE ImageHandle,\r
254 IN EFI_SYSTEM_TABLE *SystemTable\r
255 )\r
ed72955c 256;\r
878ddf1f 257\r
ed72955c 258/**\r
259 RegisterAtapiScsiPassThru\r
878ddf1f 260\r
ed72955c 261 @param This\r
262 @param Controller\r
263 @param PciIo\r
878ddf1f 264\r
ed72955c 265 @todo Add function description\r
266 @todo This add argument description\r
267 @todo Controller add argument description\r
268 @todo PciIo add argument description\r
269 @todo add return values\r
270**/\r
878ddf1f 271EFI_STATUS\r
272RegisterAtapiScsiPassThru (\r
273 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
274 IN EFI_HANDLE Controller,\r
275 IN EFI_PCI_IO_PROTOCOL *PciIo\r
276 )\r
878ddf1f 277;\r
278\r
ed72955c 279/**\r
280 AtapiScsiPassThruFunction\r
281\r
282 @param This\r
283 @param Target\r
284 @param Lun\r
285 @param Packet\r
286 @param Event\r
287\r
288 @todo Add function description\r
289 @todo This - add argument description\r
290 @todo Target - add argument description\r
291 @todo Lun - add argument description\r
292 @todo Packet - add argument description\r
293 @todo Event - add argument description\r
294 @todo add return values\r
295**/\r
878ddf1f 296EFI_STATUS\r
297EFIAPI\r
298AtapiScsiPassThruFunction (\r
299 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
300 IN UINT32 Target,\r
301 IN UINT64 Lun,\r
302 IN OUT EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,\r
303 IN EFI_EVENT Event OPTIONAL\r
304 )\r
ed72955c 305;\r
878ddf1f 306\r
ed72955c 307/**\r
308 AtapiScsiPassThruGetNextDevice\r
878ddf1f 309\r
310 TODO: Add function description\r
311\r
ed72955c 312 @param This TODO: add argument description\r
313 @param Target TODO: add argument description\r
314 @param Lun TODO: add argument description\r
878ddf1f 315\r
316 TODO: add return values\r
317\r
ed72955c 318**/\r
878ddf1f 319EFI_STATUS\r
320EFIAPI\r
321AtapiScsiPassThruGetNextDevice (\r
322 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
323 IN OUT UINT32 *Target,\r
324 IN OUT UINT64 *Lun\r
325 )\r
ed72955c 326;\r
878ddf1f 327\r
ed72955c 328/**\r
329 AtapiScsiPassThruBuildDevicePath\r
878ddf1f 330\r
331 TODO: Add function description\r
332\r
ed72955c 333 @param This TODO: add argument description\r
334 @param Target TODO: add argument description\r
335 @param Lun TODO: add argument description\r
336 @param DevicePath TODO: add argument description\r
878ddf1f 337\r
338 TODO: add return values\r
339\r
ed72955c 340**/\r
878ddf1f 341EFI_STATUS\r
342EFIAPI\r
343AtapiScsiPassThruBuildDevicePath (\r
344 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
345 IN UINT32 Target,\r
346 IN UINT64 Lun,\r
347 IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath\r
348 )\r
ed72955c 349;\r
878ddf1f 350\r
ed72955c 351/**\r
352 AtapiScsiPassThruGetTargetLun\r
878ddf1f 353\r
354 TODO: Add function description\r
355\r
ed72955c 356 @param This TODO: add argument description\r
357 @param DevicePath TODO: add argument description\r
358 @param Target TODO: add argument description\r
359 @param Lun TODO: add argument description\r
878ddf1f 360\r
361 TODO: add return values\r
362\r
ed72955c 363**/\r
878ddf1f 364EFI_STATUS\r
365EFIAPI\r
366AtapiScsiPassThruGetTargetLun (\r
367 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
368 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
369 OUT UINT32 *Target,\r
370 OUT UINT64 *Lun\r
371 )\r
ed72955c 372;\r
878ddf1f 373\r
ed72955c 374/**\r
375 AtapiScsiPassThruResetChannel\r
878ddf1f 376\r
377 TODO: Add function description\r
378\r
ed72955c 379 @param This TODO: add argument description\r
878ddf1f 380\r
381 TODO: add return values\r
382\r
ed72955c 383**/\r
878ddf1f 384EFI_STATUS\r
385EFIAPI\r
386AtapiScsiPassThruResetChannel (\r
387 IN EFI_SCSI_PASS_THRU_PROTOCOL *This\r
388 )\r
ed72955c 389;\r
878ddf1f 390\r
ed72955c 391/**\r
392 AtapiScsiPassThruResetTarget\r
878ddf1f 393\r
394 TODO: Add function description\r
395\r
ed72955c 396 @param This TODO: add argument description\r
397 @param Target TODO: add argument description\r
398 @param Lun TODO: add argument description\r
878ddf1f 399\r
400 TODO: add return values\r
401\r
ed72955c 402**/\r
878ddf1f 403EFI_STATUS\r
404EFIAPI\r
405AtapiScsiPassThruResetTarget (\r
406 IN EFI_SCSI_PASS_THRU_PROTOCOL *This,\r
407 IN UINT32 Target,\r
408 IN UINT64 Lun\r
409 )\r
ed72955c 410;\r
878ddf1f 411\r
ed72955c 412/**\r
413 CheckSCSIRequestPacket\r
878ddf1f 414\r
415 TODO: Add function description\r
416\r
ed72955c 417 @param Packet TODO: add argument description\r
878ddf1f 418\r
419 TODO: add return values\r
420\r
ed72955c 421**/\r
878ddf1f 422EFI_STATUS\r
423CheckSCSIRequestPacket (\r
424 EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r
425 )\r
ed72955c 426;\r
878ddf1f 427\r
ed72955c 428/**\r
429 SubmitBlockingIoCommand\r
878ddf1f 430\r
431 TODO: Add function description\r
432\r
ed72955c 433 @param AtapiScsiPrivate TODO: add argument description\r
434 @param Target TODO: add argument description\r
435 @param Packet TODO: add argument description\r
878ddf1f 436\r
437 TODO: add return values\r
438\r
ed72955c 439**/\r
878ddf1f 440EFI_STATUS\r
441SubmitBlockingIoCommand (\r
442 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
443 UINT32 Target,\r
444 EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r
445 )\r
ed72955c 446;\r
878ddf1f 447\r
ed72955c 448/**\r
449 IsCommandValid\r
878ddf1f 450\r
451 TODO: Add function description\r
452\r
ed72955c 453 @param Packet - TODO: add argument description\r
878ddf1f 454\r
ed72955c 455 @return TODO: add return values\r
878ddf1f 456\r
457--*/\r
878ddf1f 458BOOLEAN\r
459IsCommandValid (\r
460 EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet\r
461 )\r
ed72955c 462;\r
878ddf1f 463\r
ed72955c 464/**\r
465 RequestSenseCommand\r
878ddf1f 466\r
467 TODO: Add function description\r
468\r
ed72955c 469 @param AtapiScsiPrivate TODO: add argument description\r
470 @param Target TODO: add argument description\r
471 @param Timeout TODO: add argument description\r
472 @param SenseData TODO: add argument description\r
473 @param SenseDataLength TODO: add argument description\r
878ddf1f 474\r
475 TODO: add return values\r
476\r
ed72955c 477**/\r
878ddf1f 478EFI_STATUS\r
479RequestSenseCommand (\r
480 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
481 UINT32 Target,\r
482 UINT64 Timeout,\r
483 VOID *SenseData,\r
484 UINT8 *SenseDataLength\r
485 )\r
ed72955c 486;\r
878ddf1f 487\r
ed72955c 488/**\r
489 AtapiPacketCommand\r
878ddf1f 490\r
491 TODO: Add function description\r
492\r
ed72955c 493 @param AtapiScsiPrivate TODO: add argument description\r
494 @param Target TODO: add argument description\r
495 @param PacketCommand TODO: add argument description\r
496 @param Buffer TODO: add argument description\r
497 @param ByteCount TODO: add argument description\r
498 @param Direction TODO: add argument description\r
499 @param TimeOutInMicroSeconds TODO: add argument description\r
878ddf1f 500\r
501 TODO: add return values\r
502\r
ed72955c 503**/\r
878ddf1f 504EFI_STATUS\r
505AtapiPacketCommand (\r
506 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
507 UINT32 Target,\r
508 UINT8 *PacketCommand,\r
509 VOID *Buffer,\r
510 UINT32 *ByteCount,\r
511 DATA_DIRECTION Direction,\r
512 UINT64 TimeOutInMicroSeconds\r
513 )\r
ed72955c 514;\r
878ddf1f 515\r
878ddf1f 516\r
ed72955c 517/**\r
518 ReadPortB\r
878ddf1f 519\r
ed72955c 520 TODO: Add function description\r
878ddf1f 521\r
ed72955c 522 @param PciIo TODO: add argument description\r
523 @param Port TODO: add argument description\r
878ddf1f 524\r
525 TODO: add return values\r
526\r
ed72955c 527**/\r
878ddf1f 528UINT8\r
529ReadPortB (\r
530 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
531 IN UINT16 Port\r
532 )\r
ed72955c 533;\r
878ddf1f 534\r
878ddf1f 535\r
ed72955c 536/**\r
537 ReadPortW\r
878ddf1f 538\r
ed72955c 539 TODO: Add function description\r
878ddf1f 540\r
ed72955c 541 @param PciIo TODO: add argument description\r
542 @param Port TODO: add argument description\r
878ddf1f 543\r
544 TODO: add return values\r
545\r
ed72955c 546**/\r
878ddf1f 547UINT16\r
548ReadPortW (\r
549 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
550 IN UINT16 Port\r
551 )\r
ed72955c 552;\r
878ddf1f 553\r
878ddf1f 554\r
ed72955c 555/**\r
556 WritePortB\r
878ddf1f 557\r
ed72955c 558 TODO: Add function description\r
878ddf1f 559\r
ed72955c 560 @param PciIo TODO: add argument description\r
561 @param Port TODO: add argument description\r
562 @param Data TODO: add argument description\r
878ddf1f 563\r
564 TODO: add return values\r
565\r
ed72955c 566**/\r
878ddf1f 567VOID\r
568WritePortB (\r
569 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
570 IN UINT16 Port,\r
571 IN UINT8 Data\r
572 )\r
ed72955c 573;\r
878ddf1f 574\r
878ddf1f 575\r
ed72955c 576/**\r
577 WritePortW\r
878ddf1f 578\r
ed72955c 579 TODO: Add function description\r
878ddf1f 580\r
ed72955c 581 @param PciIo TODO: add argument description\r
582 @param Port TODO: add argument description\r
583 @param Data TODO: add argument description\r
878ddf1f 584\r
585 TODO: add return values\r
586\r
ed72955c 587**/\r
878ddf1f 588VOID\r
589WritePortW (\r
590 IN EFI_PCI_IO_PROTOCOL *PciIo,\r
591 IN UINT16 Port,\r
592 IN UINT16 Data\r
593 )\r
ed72955c 594;\r
878ddf1f 595\r
ed72955c 596/**\r
597 StatusDRQClear\r
878ddf1f 598\r
599 TODO: Add function description\r
600\r
ed72955c 601 @param AtapiScsiPrivate TODO: add argument description\r
602 @param TimeOutInMicroSeconds TODO: add argument description\r
878ddf1f 603\r
604 TODO: add return values\r
605\r
ed72955c 606**/\r
878ddf1f 607EFI_STATUS\r
608StatusDRQClear (\r
609 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
610 UINT64 TimeOutInMicroSeconds\r
611 )\r
ed72955c 612;\r
878ddf1f 613\r
ed72955c 614/**\r
615 AltStatusDRQClear\r
878ddf1f 616\r
617 TODO: Add function description\r
618\r
ed72955c 619 @param AtapiScsiPrivate TODO: add argument description\r
620 @param TimeOutInMicroSeconds TODO: add argument description\r
878ddf1f 621\r
622 TODO: add return values\r
623\r
ed72955c 624**/\r
878ddf1f 625EFI_STATUS\r
626AltStatusDRQClear (\r
627 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
628 UINT64 TimeOutInMicroSeconds\r
629 )\r
ed72955c 630;\r
878ddf1f 631\r
ed72955c 632/**\r
633 StatusDRQReady\r
878ddf1f 634\r
635 TODO: Add function description\r
636\r
ed72955c 637 @param AtapiScsiPrivate TODO: add argument description\r
638 @param TimeOutInMicroSeconds TODO: add argument description\r
878ddf1f 639\r
640 TODO: add return values\r
641\r
ed72955c 642**/\r
878ddf1f 643EFI_STATUS\r
644StatusDRQReady (\r
645 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
646 UINT64 TimeOutInMicroSeconds\r
647 )\r
ed72955c 648;\r
878ddf1f 649\r
ed72955c 650/**\r
651 AltStatusDRQReady\r
878ddf1f 652\r
653 TODO: Add function description\r
654\r
ed72955c 655 @param AtapiScsiPrivate TODO: add argument description\r
656 @param TimeOutInMicroSeconds TODO: add argument description\r
878ddf1f 657\r
658 TODO: add return values\r
659\r
ed72955c 660**/\r
878ddf1f 661EFI_STATUS\r
662AltStatusDRQReady (\r
663 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
664 UINT64 TimeOutInMicroSeconds\r
665 )\r
ed72955c 666;\r
878ddf1f 667\r
ed72955c 668/**\r
878ddf1f 669 TODO: Add function description\r
670\r
ed72955c 671 @param AtapiScsiPrivate TODO: add argument description\r
672 @param TimeoutInMicroSeconds TODO: add argument description\r
878ddf1f 673\r
674 TODO: add return values\r
675\r
ed72955c 676**/\r
878ddf1f 677EFI_STATUS\r
678StatusWaitForBSYClear (\r
679 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
680 UINT64 TimeoutInMicroSeconds\r
681 )\r
ed72955c 682;\r
878ddf1f 683\r
ed72955c 684/**\r
878ddf1f 685 TODO: Add function description\r
686\r
ed72955c 687 @param AtapiScsiPrivate TODO: add argument description\r
688 @param TimeoutInMicroSeconds TODO: add argument description\r
878ddf1f 689\r
690 TODO: add return values\r
691\r
ed72955c 692**/\r
878ddf1f 693EFI_STATUS\r
694AltStatusWaitForBSYClear (\r
695 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
696 UINT64 TimeoutInMicroSeconds\r
697 )\r
ed72955c 698;\r
878ddf1f 699\r
ed72955c 700/**\r
878ddf1f 701 TODO: Add function description\r
702\r
ed72955c 703 @param AtapiScsiPrivate TODO: add argument description\r
704 @param TimeoutInMicroSeconds TODO: add argument description\r
878ddf1f 705\r
706 TODO: add return values\r
707\r
ed72955c 708**/\r
878ddf1f 709EFI_STATUS\r
710StatusDRDYReady (\r
711 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
712 UINT64 TimeoutInMicroSeconds\r
713 )\r
ed72955c 714;\r
878ddf1f 715\r
ed72955c 716/**\r
878ddf1f 717 TODO: Add function description\r
718\r
ed72955c 719 @param AtapiScsiPrivate TODO: add argument description\r
720 @param TimeoutInMicroSeconds TODO: add argument description\r
878ddf1f 721\r
722 TODO: add return values\r
723\r
ed72955c 724**/\r
878ddf1f 725EFI_STATUS\r
726AltStatusDRDYReady (\r
727 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
728 UINT64 TimeoutInMicroSeconds\r
729 )\r
ed72955c 730;\r
878ddf1f 731\r
ed72955c 732/**\r
878ddf1f 733 TODO: Add function description\r
734\r
ed72955c 735 @param AtapiScsiPrivate TODO: add argument description\r
736 @param Buffer TODO: add argument description\r
737 @param ByteCount TODO: add argument description\r
738 @param Direction TODO: add argument description\r
739 @param TimeOutInMicroSeconds TODO: add argument description\r
878ddf1f 740\r
741 TODO: add return values\r
742\r
ed72955c 743**/\r
878ddf1f 744EFI_STATUS\r
745AtapiPassThruPioReadWriteData (\r
746 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate,\r
747 UINT16 *Buffer,\r
748 UINT32 *ByteCount,\r
749 DATA_DIRECTION Direction,\r
750 UINT64 TimeOutInMicroSeconds\r
751 )\r
ed72955c 752;\r
878ddf1f 753\r
ed72955c 754/**\r
878ddf1f 755 TODO: Add function description\r
756\r
ed72955c 757 @param AtapiScsiPrivate TODO: add argument description\r
878ddf1f 758\r
759 TODO: add return values\r
760\r
ed72955c 761**/\r
878ddf1f 762EFI_STATUS\r
763AtapiPassThruCheckErrorStatus (\r
764 ATAPI_SCSI_PASS_THRU_DEV *AtapiScsiPrivate\r
765 )\r
878ddf1f 766;\r
767#endif\r