diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/ata-sd-pp.c | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/firmware/target/arm/ata-sd-pp.c b/firmware/target/arm/ata-sd-pp.c index 95e41e302b..af8c20d534 100644 --- a/firmware/target/arm/ata-sd-pp.c +++ b/firmware/target/arm/ata-sd-pp.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * KIND, either express or implied. | 18 | * KIND, either express or implied. |
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "config.h" /* for HAVE_MULTIVOLUME */ | ||
21 | #include "fat.h" | 22 | #include "fat.h" |
22 | #include "hotswap.h" | 23 | #include "hotswap.h" |
23 | #include "ata-sd-target.h" | 24 | #include "ata-sd-target.h" |
@@ -64,44 +65,8 @@ | |||
64 | #define CMD_ERROR_2 0x2 /* SD did not respond to command (either it doesn't | 65 | #define CMD_ERROR_2 0x2 /* SD did not respond to command (either it doesn't |
65 | understand the command or is not inserted) */ | 66 | understand the command or is not inserted) */ |
66 | 67 | ||
67 | /* SD States */ | ||
68 | #define IDLE 0 | ||
69 | #define READY 1 | ||
70 | #define IDENT 2 | ||
71 | #define STBY 3 | ||
72 | #define TRAN 4 | ||
73 | #define DATA 5 | ||
74 | #define RCV 6 | ||
75 | #define PRG 7 | ||
76 | #define DIS 8 | ||
77 | |||
78 | #define FIFO_LEN 16 /* FIFO is 16 words deep */ | 68 | #define FIFO_LEN 16 /* FIFO is 16 words deep */ |
79 | 69 | ||
80 | /* SD Commands */ | ||
81 | #define GO_IDLE_STATE 0 | ||
82 | #define ALL_SEND_CID 2 | ||
83 | #define SEND_RELATIVE_ADDR 3 | ||
84 | #define SET_DSR 4 | ||
85 | #define SWITCH_FUNC 6 | ||
86 | #define SELECT_CARD 7 | ||
87 | #define DESELECT_CARD 7 | ||
88 | #define SEND_IF_COND 8 | ||
89 | #define SEND_CSD 9 | ||
90 | #define SEND_CID 10 | ||
91 | #define STOP_TRANSMISSION 12 | ||
92 | #define SEND_STATUS 13 | ||
93 | #define GO_INACTIVE_STATE 15 | ||
94 | #define SET_BLOCKLEN 16 | ||
95 | #define READ_SINGLE_BLOCK 17 | ||
96 | #define READ_MULTIPLE_BLOCK 18 | ||
97 | #define SEND_NUM_WR_BLOCKS 22 | ||
98 | #define WRITE_BLOCK 24 | ||
99 | #define WRITE_MULTIPLE_BLOCK 25 | ||
100 | #define ERASE_WR_BLK_START 32 | ||
101 | #define ERASE_WR_BLK_END 33 | ||
102 | #define ERASE 38 | ||
103 | #define APP_CMD 55 | ||
104 | |||
105 | #define EC_OK 0 | 70 | #define EC_OK 0 |
106 | #define EC_FAILED 1 | 71 | #define EC_FAILED 1 |
107 | #define EC_NOCARD 2 | 72 | #define EC_NOCARD 2 |
@@ -124,17 +89,6 @@ | |||
124 | #define EC_COMMAND 19 | 89 | #define EC_COMMAND 19 |
125 | #define NUM_EC 20 | 90 | #define NUM_EC 20 |
126 | 91 | ||
127 | /* Application Specific commands */ | ||
128 | #define SET_BUS_WIDTH 6 | ||
129 | #define SD_APP_OP_COND 41 | ||
130 | |||
131 | /** global, exported variables **/ | ||
132 | #ifdef HAVE_MULTIVOLUME | ||
133 | #define NUM_DRIVES 2 | ||
134 | #else | ||
135 | #define NUM_DRIVES 1 | ||
136 | #endif | ||
137 | |||
138 | /* for compatibility */ | 92 | /* for compatibility */ |
139 | static long last_disk_activity = -1; | 93 | static long last_disk_activity = -1; |
140 | 94 | ||
@@ -153,7 +107,7 @@ struct sd_card_status | |||
153 | int retry_max; | 107 | int retry_max; |
154 | }; | 108 | }; |
155 | 109 | ||
156 | static struct sd_card_status sd_status[NUM_DRIVES] = | 110 | static struct sd_card_status sd_status[NUM_VOLUMES] = |
157 | { | 111 | { |
158 | { 0, 1 }, | 112 | { 0, 1 }, |
159 | #ifdef HAVE_MULTIVOLUME | 113 | #ifdef HAVE_MULTIVOLUME |