Modules/ATA - Fixed uninitialised variable
[tpg/acess2.git] / KernelLand / Modules / Storage / AHCI / ata.h
1 /*
2  * Acess2
3  * - By John Hodge (thePowersGang)
4  *
5  * ata.h
6  * - ATA Definitions
7  */
8 #ifndef _AHCI__ATA_H_
9 #define _AHCI__ATA_H_
10
11 enum eATA_Commands
12 {
13         ATA_CMD_IDENTIFY_DEVICE = 0xEC,
14         ATA_CMD_READDMA48       = 0x25,
15         ATA_CMD_READDMA28       = 0xC8,
16 };
17
18 #define ATA_STATUS_ERR  0x01    // Error encountered
19 #define ATA_STATUS_DRQ  0x08    // Data Request
20 #define ATA_STATUS_CDEP 0x10    // Command-dependent
21 #define ATA_STATUS_DF   0x20    // Device Fault
22 #define ATA_STATUS_DRDY 0x40    // Device ready 
23 #define ATA_STATUS_BSY  0x80    // Device busy
24
25 typedef struct sATA_Identify tATA_Identify;
26
27 /**
28  * \brief Structure returned by the ATA IDENTIFY command
29  */
30 struct sATA_Identify
31 {
32         Uint16  Flags;          // 1
33         Uint16  Usused1[9];     // 10
34         char    SerialNum[20];  // 20
35         Uint16  Usused2[3];     // 23
36         char    FirmwareVer[8]; // 27
37         char    ModelNumber[40];        // 47
38         Uint16  SectPerInt;     // 48 - Low byte only
39         Uint16  Unused3;        // 49
40         Uint16  Capabilities[2];        // 51
41         Uint16  Unused4[2];     // 53
42         Uint16  ValidExtData;   // 54
43         Uint16  Unused5[5];      // 59
44         Uint16  SizeOfRWMultiple;       // 60
45         Uint32  Sectors28;      // LBA 28 Sector Count
46         Uint16  Unused6[100-62];
47         Uint64  Sectors48;      // LBA 48 Sector Count
48         Uint16  Unused7[256-104];
49 } PACKED;
50
51 #endif
52

UCC git Repository :: git.ucc.asn.au