add place-holder directory for the a3000 wd533c93 scsi controller implementation.
[AROS.git] / rom / devs / scsi / include / hardware / scsi.h
blob9197593a3f664f586a937a19576b6ba8bfec9434
1 #ifndef _HARDWARE_SCSI_H
2 #define _HARDWARE_SCSI_H
4 /*
5 Copyright © 2019, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: SCSI hardware register definitions
9 Lang: English
12 /* Registers */
13 #define scsi_Error 1
14 #define scsi_Feature 1
15 #define scsi_Count 2
16 #define scsi_LBALow 3
17 #define scsi_Sector 3
18 #define scsi_LBAMid 4
19 #define scsi_CylinderLow 4
20 #define scsi_LBAHigh 5
21 #define scsi_CylinderHigh 5
22 #define scsi_DevHead 6
23 #define scsi_Status 7
24 #define scsi_Command 7
25 #define scsi_AltStatus 0x2
26 #define scsi_AltControl 0x2
28 #define scsi_pi_Error 1
29 #define scsi_pi_Features 1
30 #define scsi_pi_Reason 2
31 #define scsi_pi_ByteCntL 4
32 #define scsi_pi_ByteCntH 5
33 #define scsi_pi_DevSel 6
34 #define scsi_pi_Status 7
35 #define scsi_pi_Command 7
37 /* Status bits */
38 #define SCSIB_SLAVE 4
39 #define SCSIB_LBA 6
40 #define SCSIB_ATAPI 7
41 #define SCSIB_DATAREQ 3
42 #define SCSIB_ERROR 0
43 #define SCSIB_BUSY 7
45 #define SCSIF_SLAVE 0x10
46 #define SCSIF_LBA 0x40
47 #define SCSIF_ATAPI 0x80
48 #define SCSIF_DATAREQ 0x08
49 #define SCSIF_ERROR 0x01
50 #define SCSIF_BUSY 0x80
51 #define SCSIF_DRDY 0x40
53 #define SCSIPIF_CHECK 0x01
55 /* Commands */
56 #define SCSI_RECALIBRATE 0x10
58 #define SCSI_IDENTIFY_DEVICE 0xEC
59 #define SCSI_CHECK_POWER_MODE 0xE5
60 #define SCSI_STANDBY 0xE2
61 #define SCSI_STANDBY_IMMED 0xE0
62 #define SCSI_STANDBY_IMMEDIATE SCSI_STANDBY_IMMED
63 #define SCSI_IDLE_IMMED 0xE1
64 #define SCSI_IDLE_IMMEDIATE SCSI_IDLE_IMMED
65 #define SCSI_IDLE 0xE3
66 #define SCSI_FLUSH_CACHE 0xE7
67 #define SCSI_FLUSH_CACHE_EXT 0xEA
68 #define SCSI_READ_DMA_EXT 0x25
69 #define SCSI_READ_DMA64 SCSI_READ_DMA_EXT
70 #define SCSI_READ_DMA 0xC8
71 #define SCSI_READ_SECTORS_EXT 0x24
72 #define SCSI_READ64 SCSI_READ_SECTORS_EXT
73 #define SCSI_READ_SECTORS 0x20
74 #define SCSI_READ SCSI_READ_SECTORS
75 #define SCSI_WRITE_DMA_EXT 0x35
76 #define SCSI_WRITE_DMA64 SCSI_WRITE_DMA_EXT
77 #define SCSI_WRITE_DMA 0xCA
78 #define SCSI_WRITE_SECTORS_EXT 0x34
79 #define SCSI_WRITE64 SCSI_WRITE_SECTORS_EXT
80 #define SCSI_WRITE_SECTORS 0x30
81 #define SCSI_WRITE SCSI_WRITE_SECTORS
82 #define SCSI_WRITE_UNCORRECTABLE 0x45
83 #define SCSI_READ_VERIFY_SECTORS 0x40
84 #define SCSI_READ_VERIFY_SECTORS_EXT 0x42
85 #define SCSI_READ_BUFFER 0xE4
86 #define SCSI_WRITE_BUFFER 0xE8
87 #define SCSI_EXECUTE_DEVICE_DIAG 0x90
88 #define SCSI_EXECUTE_DIAG SCSI_EXECUTE_DEVICE_DIAG
89 #define SCSI_SET_FEATURES 0xEF
90 #define SCSI_SMART 0xB0
91 #define SCSI_PACKET_IDENTIFY 0xA1
92 #define SCSI_IDENTIFY_ATAPI SCSI_PACKET_IDENTIFY
93 #define SCSI_PACKET 0xA0
94 #define SCSI_READ_FPDMA 0x60
95 #define SCSI_WRITE_FPDMA 0x61
96 #define SCSI_READ_LOG_EXT 0x2F
97 #define SCSI_NOP 0x00
98 #define SCSI_DEVICE_RESET 0x08
99 #define SCSI_MEDIA_EJECT 0xED
100 #define SCSI_SECURITY_UNLOCK 0xF2
101 #define SCSI_SECURITY_FREEZE_LOCK 0xF5
102 #define SCSI_DATA_SET_MANAGEMENT 0x06
103 #define SCSI_DOWNLOAD_MICROCODE 0x92
104 #define SCSI_WRITE_STREAM_DMA_EXT 0x3A
105 #define SCSI_READ_LOG_DMA_EXT 0x47
106 #define SCSI_READ_STREAM_DMA_EXT 0x2A
107 #define SCSI_WRITE_DMA_FUA 0x3D
108 #define SCSI_WRITE_LOG_DMA_EXT 0x57
109 #define SCSI_READ_DMA_QUEUED 0xC7
110 #define SCSI_READ_DMA_QUEUED_EXT 0x26
111 #define SCSI_WRITE_DMA_QUEUED 0xCC
112 #define SCSI_WRITE_DMA_QUEUED_EXT 0x36
113 #define SCSI_WRITE_DMA_QUEUED_FUA_EXT 0x3E
114 #define SCSI_SET_MULTIPLE 0XC6
115 #define SCSI_READ_MULTIPLE 0xC4
116 #define SCSI_READ_MULTIPLE_EXT 0x29
117 #define SCSI_READ_MULTIPLE64 SCSI_READ_MULTIPLE_EXT
118 #define SCSI_WRITE_MULTIPLE 0xC5
119 #define SCSI_WRITE_MULTIPLE_EXT 0x39
120 #define SCSI_WRITE_MULTIPLE64 SCSI_WRITE_MULTIPLE_EXT
121 #define SCSI_WRITE_MULTIPLE_FUA_EXT 0xCE
123 #define SCSI_DEVICE_CONFIG_IDENTIFY 0xB1
124 #define SCSI_DEVICE_CONFIG_ID_FEATURES 0xC2
127 /* SET_FEATURES sub-commands */
128 #define SCSI_SET_FEATURES_ENABLE_CACHE 0x02
129 #define SCSI_SET_FEATURES_DISABLE_CACHE 0x82
130 #define SCSI_SET_FEATURES_DISABLE_READ_AHEAD 0x55
131 #define SCSI_SET_FEATURES_ENABLE_READ_AHEAD 0xAA
132 #define SCSI_SET_FEATURES_SET_TRANSFER_MODE 0x03
134 /* ATAPI reason flags */
135 #define ATAPIF_MASK 0x03
136 #define ATAPIF_COMMAND 0x01
137 #define ATAPIF_READ 0x02
138 #define ATAPIF_WRITE 0x00
140 /* AltControl bits */
141 #define SCSICTLF_INT_DISABLE 0x02
142 #define SCSICTLF_RESET 0x04
144 #endif