Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
firmware/target/arm/as3525/sd-as3525v2.c | 16 ++-------------- 1 files changed, 2 insertions(+), 14 deletions(-) diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index ee2a09a..fda21a8 100644 static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, MCI_BYTCNT = transfer * SD_BLOCK_SIZE; - ret = sd_wait_for_state(drive, SD_TRAN); - if (ret < 0) - { - static const char *st[9] = { - "IDLE", "RDY", "IDENT", "STBY", "TRAN", "DATA", "RCV", - "PRG", "DIS"}; - if(ret <= -10) - panicf("wait for TRAN state failed (%s) %d", - st[(-ret / 10) % 9], drive); - else - panicf("wait for state failed"); - goto sd_transfer_error; - } - int arg = start; if(!(card_info[drive].ocr & (1<<30))) /* not SDHC */ arg *= SD_BLOCK_SIZE; static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start, dma_enable_channel(0, MCI_FIFO, dma_buf, DMA_PERI_SD, DMAC_FLOWCTRL_PERI_PERI_TO_MEM, false, true, 0, DMA_S8, NULL); + while(MCI_STATUS & DATA_BUSY); + unsigned long dummy; /* if we don't ask for a response, writing fails */ if(!send_cmd(drive, cmd, arg, MCI_RESP, &dummy)) panicf("%s multiple blocks failed", write ? "write" : "read"); |