Listtree.mcc: update version and date
[AROS.git] / rom / devs / ata / include / hardware / ata.h
blob779fb54fe4eac94a99de18825d8605f786e76aa7
1 #ifndef _HARDWARE_ATA_H
2 #define _HARDWARE_ATA_H
4 /*
5 Copyright © 2004-2013, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: ATA hardware register definitions
9 Lang: English
12 /* Registers */
13 #define ata_Error 1
14 #define ata_Feature 1
15 #define ata_Count 2
16 #define ata_LBALow 3
17 #define ata_Sector 3
18 #define ata_LBAMid 4
19 #define ata_CylinderLow 4
20 #define ata_LBAHigh 5
21 #define ata_CylinderHigh 5
22 #define ata_DevHead 6
23 #define ata_Status 7
24 #define ata_Command 7
25 #define ata_AltStatus 0x2
26 #define ata_AltControl 0x2
28 #define atapi_Error 1
29 #define atapi_Features 1
30 #define atapi_Reason 2
31 #define atapi_ByteCntL 4
32 #define atapi_ByteCntH 5
33 #define atapi_DevSel 6
34 #define atapi_Status 7
35 #define atapi_Command 7
37 /* Status bits */
38 #define ATAB_SLAVE 4
39 #define ATAB_LBA 6
40 #define ATAB_ATAPI 7
41 #define ATAB_DATAREQ 3
42 #define ATAB_ERROR 0
43 #define ATAB_BUSY 7
45 #define ATAF_SLAVE 0x10
46 #define ATAF_LBA 0x40
47 #define ATAF_ATAPI 0x80
48 #define ATAF_DATAREQ 0x08
49 #define ATAF_ERROR 0x01
50 #define ATAF_BUSY 0x80
51 #define ATAF_DRDY 0x40
53 #define ATAPIF_CHECK 0x01
55 /* Commands */
56 #define ATA_SET_FEATURES 0xef
57 #define ATA_SET_MULTIPLE 0xc6
58 #define ATA_DEVICE_RESET 0x08
59 #define ATA_IDENTIFY_DEVICE 0xec
60 #define ATA_IDENTIFY_ATAPI 0xa1
61 #define ATA_NOP 0x00
62 #define ATA_EXECUTE_DIAG 0x90
63 #define ATA_PACKET 0xa0
64 #define ATA_READ_DMA 0xc8
65 #define ATA_READ_DMA64 0x25
66 #define ATA_READ 0x20
67 #define ATA_READ64 0x24
68 #define ATA_READ_MULTIPLE 0xc4
69 #define ATA_READ_MULTIPLE64 0x29
70 #define ATA_WRITE_DMA 0xca
71 #define ATA_WRITE_DMA64 0x35
72 #define ATA_WRITE 0x30
73 #define ATA_WRITE64 0x34
74 #define ATA_WRITE_MULTIPLE 0xc5
75 #define ATA_WRITE_MULTIPLE64 0x39
76 #define ATA_MEDIA_EJECT 0xed
78 /* ATAPI reason flags */
79 #define ATAPIF_MASK 0x03
80 #define ATAPIF_COMMAND 0x01
81 #define ATAPIF_READ 0x02
82 #define ATAPIF_WRITE 0x00
84 /* AltControl bits */
85 #define ATACTLF_INT_DISABLE 0x02
86 #define ATACTLF_RESET 0x04
88 #endif