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:
Florent Kermarrec 2020-08-26 12:47:50 +02:00
parent 4ac0ed49e1
commit 334635a97f
1 changed files with 1 additions and 4 deletions

View File

@ -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);