soc: add initial DMA bus support (optionally provided by CPU(s) for cache coherency).
[litex.git] / litex / soc / software / liblitesdcard / sdcard.c
index cb5f6138d57849b08ea5df7545a0818a2732233f..5089939d56aed60a48a04718a93444d75e154439 100644 (file)
@@ -576,11 +576,13 @@ sdcard_set_block_count(count);
 
        sdcard_stop_transmission();
 
+#ifndef CONFIG_CPU_HAS_DMA_BUS
        /* Flush CPU caches */
        flush_cpu_dcache();
 #ifdef CONFIG_L2_SIZE
        flush_l2_cache();
 #endif
+#endif
 }
 
 #endif