diff options
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r-- | firmware/drivers/ata.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 61365094bc..475b1257a6 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -362,7 +362,7 @@ static void copy_read_sectors(unsigned char* buf, int wordcount) | |||
362 | { /* loop compiles to 7 assembler instructions */ | 362 | { /* loop compiles to 7 assembler instructions */ |
363 | /* takes 12 clock cycles (2 pipeline stalls, 1 wait) */ | 363 | /* takes 12 clock cycles (2 pipeline stalls, 1 wait) */ |
364 | #ifdef SWAP_WORDS | 364 | #ifdef SWAP_WORDS |
365 | *wbuf = SWAB16(ATA_DATA); | 365 | *wbuf = letoh16(ATA_DATA); |
366 | #else | 366 | #else |
367 | *wbuf = ATA_DATA; | 367 | *wbuf = ATA_DATA; |
368 | #endif | 368 | #endif |
@@ -677,7 +677,7 @@ static void copy_write_sectors(const unsigned char* buf, int wordcount) | |||
677 | #ifdef SWAP_WORDS | 677 | #ifdef SWAP_WORDS |
678 | /* loop compiles to 6 assembler instructions */ | 678 | /* loop compiles to 6 assembler instructions */ |
679 | /* takes 10 clock cycles (2 pipeline stalls) */ | 679 | /* takes 10 clock cycles (2 pipeline stalls) */ |
680 | SET_16BITREG(ATA_DATA, SWAB16(*wbuf)); | 680 | SET_16BITREG(ATA_DATA, htole16(*wbuf)); |
681 | #else | 681 | #else |
682 | SET_16BITREG(ATA_DATA, *wbuf); | 682 | SET_16BITREG(ATA_DATA, *wbuf); |
683 | #endif | 683 | #endif |
@@ -1270,7 +1270,7 @@ static int identify(void) | |||
1270 | #ifdef SWAP_WORDS | 1270 | #ifdef SWAP_WORDS |
1271 | identify_info[i] = ATA_DATA; | 1271 | identify_info[i] = ATA_DATA; |
1272 | #else | 1272 | #else |
1273 | identify_info[i] = SWAB16(ATA_DATA); | 1273 | identify_info[i] = letoh16(ATA_DATA); |
1274 | #endif | 1274 | #endif |
1275 | } | 1275 | } |
1276 | 1276 | ||