diff options
Diffstat (limited to 'firmware/target/arm/as3525/sd-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c index 81dc637617..fb1ec959e3 100644 --- a/firmware/target/arm/as3525/sd-as3525.c +++ b/firmware/target/arm/as3525/sd-as3525.c | |||
@@ -100,7 +100,7 @@ static const int pl180_base[NUM_DRIVES] = { | |||
100 | #endif | 100 | #endif |
101 | }; | 101 | }; |
102 | 102 | ||
103 | static int sd_wait_for_state(const int drive, unsigned int state); | 103 | static int sd_wait_for_tran_state(const int drive); |
104 | static int sd_select_bank(signed char bank); | 104 | static int sd_select_bank(signed char bank); |
105 | static int sd_init_card(const int drive); | 105 | static int sd_init_card(const int drive); |
106 | static void init_pl180_controller(const int drive); | 106 | static void init_pl180_controller(const int drive); |
@@ -321,7 +321,7 @@ static int sd_init_card(const int drive) | |||
321 | return -5; | 321 | return -5; |
322 | mci_delay(); | 322 | mci_delay(); |
323 | 323 | ||
324 | if(sd_wait_for_state(drive, SD_TRAN)) | 324 | if(sd_wait_for_tran_state(drive)) |
325 | return -6; | 325 | return -6; |
326 | /* CMD6 */ | 326 | /* CMD6 */ |
327 | if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_ARG, NULL)) | 327 | if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_ARG, NULL)) |
@@ -570,7 +570,7 @@ bool sd_present(IF_MD_NONVOID(int drive)) | |||
570 | } | 570 | } |
571 | #endif /* HAVE_HOTSWAP */ | 571 | #endif /* HAVE_HOTSWAP */ |
572 | 572 | ||
573 | static int sd_wait_for_state(const int drive, unsigned int state) | 573 | static int sd_wait_for_tran_state(const int drive) |
574 | { | 574 | { |
575 | unsigned long response = 0; | 575 | unsigned long response = 0; |
576 | unsigned int timeout = current_tick + HZ; | 576 | unsigned int timeout = current_tick + HZ; |
@@ -581,7 +581,7 @@ static int sd_wait_for_state(const int drive, unsigned int state) | |||
581 | MCI_RESP|MCI_ARG, &response)) | 581 | MCI_RESP|MCI_ARG, &response)) |
582 | return -1; | 582 | return -1; |
583 | 583 | ||
584 | if (((response >> 9) & 0xf) == state) | 584 | if (((response >> 9) & 0xf) == SD_TRAN) |
585 | return 0; | 585 | return 0; |
586 | 586 | ||
587 | if(TIME_AFTER(current_tick, timeout)) | 587 | if(TIME_AFTER(current_tick, timeout)) |
@@ -605,7 +605,7 @@ static int sd_select_bank(signed char bank) | |||
605 | panicf("SD bank %d error : 0x%x", bank, | 605 | panicf("SD bank %d error : 0x%x", bank, |
606 | transfer_error[INTERNAL_AS3525]); | 606 | transfer_error[INTERNAL_AS3525]); |
607 | 607 | ||
608 | ret = sd_wait_for_state(INTERNAL_AS3525, SD_TRAN); | 608 | ret = sd_wait_for_tran_state(INTERNAL_AS3525); |
609 | if (ret < 0) | 609 | if (ret < 0) |
610 | return ret - 2; | 610 | return ret - 2; |
611 | 611 | ||
@@ -746,7 +746,7 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, | |||
746 | if(write) | 746 | if(write) |
747 | memcpy(uncached_buffer, buf, transfer * SD_BLOCK_SIZE); | 747 | memcpy(uncached_buffer, buf, transfer * SD_BLOCK_SIZE); |
748 | 748 | ||
749 | ret = sd_wait_for_state(drive, SD_TRAN); | 749 | ret = sd_wait_for_tran_state(drive); |
750 | if (ret < 0) | 750 | if (ret < 0) |
751 | { | 751 | { |
752 | ret -= 2*20; | 752 | ret -= 2*20; |