Skip to content
Snippets Groups Projects
Commit dedbe3b9 authored by Federico's avatar Federico
Browse files

Removed unneeded DSB in cacheless architectures

parent 01e522ef
No related branches found
No related tags found
No related merge requests found
...@@ -122,6 +122,7 @@ void IRQconfigureCache(const unsigned int *xramBase=nullptr, unsigned int xramSi ...@@ -122,6 +122,7 @@ void IRQconfigureCache(const unsigned int *xramBase=nullptr, unsigned int xramSi
*/ */
inline void markBufferBeforeDmaWrite(const void *buffer, int size) inline void markBufferBeforeDmaWrite(const void *buffer, int size)
{ {
#if defined(__DCACHE_PRESENT) && (__DCACHE_PRESENT==1)
// You may think that since the cache is configured as write-through, // You may think that since the cache is configured as write-through,
// there's nothing to do before the DMA can read a memory buffer just // there's nothing to do before the DMA can read a memory buffer just
// written by the CPU, right? Wrong! Other than the cache, there's the // written by the CPU, right? Wrong! Other than the cache, there's the
...@@ -132,6 +133,7 @@ inline void markBufferBeforeDmaWrite(const void *buffer, int size) ...@@ -132,6 +133,7 @@ inline void markBufferBeforeDmaWrite(const void *buffer, int size)
// this __DSB() is removed. Apparently, the characters remian in the write // this __DSB() is removed. Apparently, the characters remian in the write
// buffer. // buffer.
__DSB(); __DSB();
#endif
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment