software/liblitesdcard: remove wait for DMA Reader to complete, fix ifdef on SDCARD_CMD23_SUPPORT.
The FIFO after the DMA has been reduced and is no longer able to store an entire block, so the DMA will not complete if write is not released.
This commit is contained in:
parent
4ac0ed49e1
commit
334635a97f
|
@ -508,11 +508,8 @@ void sdcard_write(uint32_t sector, uint32_t count, uint8_t* buf)
|
|||
sdmem2block_dma_length_write(512);
|
||||
sdmem2block_dma_enable_write(1);
|
||||
|
||||
/* Wait for DMA Reader to complete */
|
||||
while ((sdmem2block_dma_done_read() & 0x1) == 0);
|
||||
|
||||
/* Write Single Block to SDCard */
|
||||
#ifndef SDCARD_CMD23_SUPPORT
|
||||
#ifdef SDCARD_CMD23_SUPPORT
|
||||
sdcard_set_block_count(1);
|
||||
#endif
|
||||
sdcard_write_single_block(sector);
|
||||
|
|
Loading…
Reference in New Issue