OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [peripheral/] [atacmd.h] - Blame information for rev 650

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 jeremybenn
/* atacommon.h -- ATA Host code simulation. Common defines for ATA Host and
2
   ATA Device
3
 
4
   Copyright (C) 2002 Richard Herveille, rherveille@opencores.org
5
   Copyright (C) 2008 Embecosm Limited
6
 
7
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
8
 
9
   This file is part of Or1ksim, the OpenRISC 1000 Architectural Simulator.
10
 
11
   This program is free software; you can redistribute it and/or modify it
12
   under the terms of the GNU General Public License as published by the Free
13
   Software Foundation; either version 3 of the License, or (at your option)
14
   any later version.
15
 
16
   This program is distributed in the hope that it will be useful, but WITHOUT
17
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
19
   more details.
20
 
21
   You should have received a copy of the GNU General Public License along
22
   with this program.  If not, see <http://www.gnu.org/licenses/>.  */
23
 
24
/* This program is commented throughout in a fashion suitable for processing
25
   with Doxygen. */
26
 
27
/* Definitions for the Opencores ATA Controller Core */
28
 
29
#ifndef ATACMD__H
30
#define ATACMD__H
31
 
32
/* ----------------------------                                       */
33
/* ----- ATA commands     -----                                       */
34
/* ----------------------------                                       */
35
#define CFA_ERASE_SECTORS                0xC0
36
#define CFA_REQUEST_EXTENDED_ERROR_CODE  0x03
37
#define CFA_TRANSLATE_SECTOR             0x87
38
#define CFA_WRITE_MULTIPLE_WITHOUT_ERASE 0xCD
39
#define CFA_WRITE_SECTORS_WITHOUT_ERASE  0x38
40
#define CHECK_POWER_MODE                 0xE5
41
#define DEVICE_RESET                     0x08
42
#define DOWNLOAD_MICROCODE               0x92
43
#define EXECUTE_DEVICE_DIAGNOSTICS       0x90
44
#define FLUSH_CACHE                      0xE7
45
#define GET_MEDIA_STATUS                 0xDA
46
#define IDENTIFY_DEVICE                  0xEC
47
#define IDENTIFY_PACKET_DEVICE           0xA1
48
#define IDLE                             0xE3
49
#define IDLE_IMMEDIATE                   0xE1
50
#define INITIALIZE_DEVICE_PARAMETERS     0x91
51
#define MEDIA_EJECT                      0xED
52
#define MEDIA_LOCK                       0xDE
53
#define MEDIA_UNLOCK                     0xDF
54
#define NOP                              0x00
55
#define PACKET                           0xA0
56
#define READ_BUFFER                      0xE4
57
#define READ_DMA                         0xC8
58
#define READ_DMA_QUEUED                  0xC7
59
#define READ_MULTIPLE                    0xC4
60
#define READ_NATIVE_MAX_ADDRESS          0xF8
61
#define READ_SECTOR                      0x20
62
#define READ_SECTORS                     0x20
63
#define READ_VERIFY_SECTOR               0x40
64
#define READ_VERIFY_SECTORS              0x40
65
#define SECURITY_DISABLE_PASSWORD        0xF6
66
#define SECURITY_ERASE_PREPARE           0xF3
67
#define SECURITY_ERASE_UNIT              0xF4
68
#define SECURITY_FREEZE_LOCK             0xF5
69
#define SECURITY_SET_PASSWORD            0xF1
70
#define SECURITY_UNLOCK                  0xF2
71
#define SEEK                             0x70
72
#define SERVICE                          0xA2
73
#define SET_FEATURES                     0xEF
74
#define SET_MAX                          0xF9
75
#define SET_MULTIPLE_MODE                0xC6
76
#define SLEEP                            0xE6
77
#define SMART                            0xB0
78
#define STANDBY                          0xE2
79
#define STANDBY_IMMEDIATE                0xE0
80
#define WRITE_BUFFER                     0xE8
81
#define WRITE_DMA                        0xCA
82
#define WRITE_DMA_QUEUED                 0xCC
83
#define WRITE_MULTIPLE                   0xC5
84
#define WRITE_SECTOR                     0x30
85
#define WRITE_SECTORS                    0x30
86
 
87
 
88
/* SET_FEATURES has a number of sub-commands (in Features Register)   */
89
#define CFA_ENABLE_8BIT_PIO_TRANSFER_MODE       0x01
90
#define ENABLE_WRITE_CACHE                      0x02
91
#define SET_TRANSFER_MODE_SECTOR_COUNT_REG      0x03
92
#define ENABLE_ADVANCED_POWER_MANAGEMENT        0x05
93
#define ENABLE_POWERUP_IN_STANDBY_FEATURE_SET   0x06
94
#define POWERUP_IN_STANDBY_FEATURE_SET_SPINUP   0x07
95
#define CFA_ENABLE_POWER_MODE1                  0x0A
96
#define DISABLE_MEDIA_STATUS_NOTIFICATION       0x31
97
#define DISABLE_READ_LOOKAHEAD                  0x55
98
#define ENABLE_RELEASE_INTERRUPT                0x5D
99
#define ENABLE_SERVICE_INTERRUPT                0x5E
100
#define DISABLE_REVERTING_TO_POWERON_DEFAULTS   0x66
101
#define CFA_DISABLE_8BIT_PIO_TRANSFER_MODE      0x81
102
#define DISABLE_WRITE_CACHE                     0x82
103
#define DISABLE_ADVANCED_POWER_MANAGEMENT       0x85
104
#define DISABLE_POWERUP_IN_STANDBY_FEATURE_SET  0x86
105
#define CFA_DISABLE_POWER_MODE1                 0x8A
106
#define ENABLE_MEDIA_STATUS_NOTIFICATION        0x95
107
#define ENABLE_READ_LOOKAHEAD_FEATURE           0xAA
108
#define ENABLE_REVERTING_TO_POWERON_DEFAULTS    0xCC
109
#define DISABLE_RELEASE_INTERRUPT               0xDD
110
#define DISABLE_SERVICE_INTERRUPT               0xDE
111
 
112
/* SET_MAX has a number of sub-commands (in Features Register)        */
113
#define SET_MAX_ADDRESS                         0x00
114
#define SET_MAX_SET_PASSWORD                    0x01
115
#define SET_MAX_LOCK                            0x02
116
#define SET_MAX_UNLOCK                          0x03
117
#define SET_MAX_FREEZE_LOCK                     0x04
118
 
119
/* SET_MAX has a number of sub-commands (in Features Register)        */
120
#define SMART_READ_DATA                         0xD0
121
#define SMART_ATTRIBITE_AUTOSAVE                0xD1
122
#define SMART_SAVE_ATTRIBUTE_VALUES             0xD3
123
#define SMART_EXECUTE_OFFLINE_IMMEDIATE         0xD4
124
#define SMART_READ_LOG                          0xD5
125
#define SMART_WRITE_LOG                         0xD6
126
#define SMART_ENABLE_OPERATIONS                 0xD8
127
#define SMART_DISABLE_OPERATIONS                0xD9
128
#define SMART_RETURN_STATUS                     0xDA
129
 
130
#endif  /* ATACMD__H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.