diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/ata.c | 55 |
1 files changed, 2 insertions, 53 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index b6292e5d5c..e114718bb4 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -162,57 +162,6 @@ static int wait_for_end_of_transfer(void) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | 164 | ||
165 | /* | ||
166 | 0x090156A8: 0x4F22 sts.l pr,@-r15 | ||
167 | 0x090156AA: 0x6243 mov r4,r2 | ||
168 | 0x090156AC: 0x6023 mov r2,r0 | ||
169 | 0x090156AE: 0xC901 and #0x01,r0 | ||
170 | 0x090156B0: 0x2008 tst r0,r0 | ||
171 | 0x090156B2: 0x8911 bt 0x090156D8 | ||
172 | 0x090156B4: 0x6153 mov r5,r1 | ||
173 | 0x090156B6: 0x311C add r1,r1 | ||
174 | 0x090156B8: 0x6523 mov r2,r5 | ||
175 | 0x090156BA: 0x351C add r1,r5 | ||
176 | 0x090156BC: 0xD30E mov.l @(0x03C,pc),r3 ; 0x090156F8 (0x06104100) | ||
177 | 0x090156BE: 0x0009 nop | ||
178 | |||
179 | 0x090156C0: 0x6131 mov.w @r3,r1 | ||
180 | 0x090156C2: 0x611D extu.w r1,r1 | ||
181 | 0x090156C4: 0x2210 mov.b r1,@r2 | ||
182 | 0x090156C6: 0x7201 add #0x01,r2 | ||
183 | 0x090156C8: 0x4119 shlr8 r1 | ||
184 | 0x090156CA: 0x2210 mov.b r1,@r2 | ||
185 | 0x090156CC: 0x7201 add #0x01,r2 | ||
186 | 0x090156CE: 0x3252 cmp/hs r5,r2 | ||
187 | 0x090156D0: 0x8BF6 bf 0x090156C0 | ||
188 | |||
189 | 0x090156D2: 0xA00F bra 0x090156F4 | ||
190 | 0x090156D4: 0x4F26 lds.l @r15+,pr | ||
191 | 0x090156D6: 0x0009 nop | ||
192 | 0x090156D8: 0x6423 mov r2,r4 | ||
193 | 0x090156DA: 0x6153 mov r5,r1 | ||
194 | 0x090156DC: 0x311C add r1,r1 | ||
195 | 0x090156DE: 0x6543 mov r4,r5 | ||
196 | 0x090156E0: 0x351C add r1,r5 | ||
197 | 0x090156E2: 0xD205 mov.l @(0x018,pc),r2 ; 0x090156F8 (0x06104100) | ||
198 | |||
199 | 0x090156E4: 0x6121 mov.w @r2,r1 | ||
200 | 0x090156E6: 0x611F exts.w r1,r1 | ||
201 | 0x090156E8: 0x6118 swap.b r1,r1 | ||
202 | 0x090156EA: 0x2411 mov.w r1,@r4 | ||
203 | 0x090156EC: 0x7402 add #0x02,r4 | ||
204 | 0x090156EE: 0x3452 cmp/hs r5,r4 | ||
205 | 0x090156F0: 0x8BF8 bf 0x090156E4 | ||
206 | |||
207 | 0x090156F2: 0x4F26 lds.l @r15+,pr | ||
208 | 0x090156F4: 0x000B rts | ||
209 | 0x090156F6: 0x0009 nop | ||
210 | 0x090156F8: 0x0610 .long 0x06104100 ; 0x090156E0 | ||
211 | 0x090156FA: 0x4100 | ||
212 | */ | ||
213 | |||
214 | |||
215 | |||
216 | /* the tight loop of ata_read_sectors(), to avoid the whole in IRAM */ | 165 | /* the tight loop of ata_read_sectors(), to avoid the whole in IRAM */ |
217 | static void copy_read_sectors(unsigned char* buf, | 166 | static void copy_read_sectors(unsigned char* buf, |
218 | int wordcount) | 167 | int wordcount) |
@@ -232,7 +181,7 @@ static void copy_read_sectors(unsigned char* buf, int wordcount) | |||
232 | *buf++ = tmp >> 8; /* and don't use the SWAB16 macro */ | 181 | *buf++ = tmp >> 8; /* and don't use the SWAB16 macro */ |
233 | } while (buf < bufend); /* tail loop is faster */ | 182 | } while (buf < bufend); /* tail loop is faster */ |
234 | #else | 183 | #else |
235 | asm ( | 184 | asm ( /* I can bring it down to 7 instructions/loop */ |
236 | "mov #1, r0 \n" | 185 | "mov #1, r0 \n" |
237 | "loop_b: \n" | 186 | "loop_b: \n" |
238 | "mov.w @%1,%0 \n" | 187 | "mov.w @%1,%0 \n" |
@@ -263,7 +212,7 @@ static void copy_read_sectors(unsigned char* buf, int wordcount) | |||
263 | *wbuf = SWAB16(ATA_DATA); | 212 | *wbuf = SWAB16(ATA_DATA); |
264 | } while (++wbuf < wbufend); /* tail loop is faster */ | 213 | } while (++wbuf < wbufend); /* tail loop is faster */ |
265 | #else | 214 | #else |
266 | asm ( | 215 | asm ( /* I can bring it down to 9 instructions for 2 loops */ |
267 | "mov #2, r0 \n" | 216 | "mov #2, r0 \n" |
268 | "loop_w: \n" | 217 | "loop_w: \n" |
269 | "mov.w @%1,%0 \n" | 218 | "mov.w @%1,%0 \n" |