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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [peripheral/] [atacmd.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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