diff options
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index e62c78c..1fbfa4c 100644 --- a/src/common.h +++ b/src/common.h | |||
@@ -419,12 +419,16 @@ dma_transfer_fill(void *dst, volatile u32 src, u32 count, int channel, u32 optio | |||
419 | inline void | 419 | inline void |
420 | dma_copy(void *dst, const void *src, u32 size, int channel) { | 420 | dma_copy(void *dst, const void *src, u32 size, int channel) { |
421 | dma_transfer_copy(dst, src, size / 4, channel, DMA_CHUNK_32 | DMA_ENABLE); | 421 | dma_transfer_copy(dst, src, size / 4, channel, DMA_CHUNK_32 | DMA_ENABLE); |
422 | // Stall for 2 cycles in case we call this function more than once. | ||
423 | asm("nop"); asm("nop"); | ||
422 | } | 424 | } |
423 | 425 | ||
424 | // Fill the dst location with the word set at src. | 426 | // Fill the dst location with the word set at src. |
425 | inline void | 427 | inline void |
426 | dma_fill(void *dst, vu32 src, u32 size, int channel) { | 428 | dma_fill(void *dst, vu32 src, u32 size, int channel) { |
427 | dma_transfer_fill(dst, src, size / 4, channel, DMA_CHUNK_32 | DMA_ENABLE); | 429 | dma_transfer_fill(dst, src, size / 4, channel, DMA_CHUNK_32 | DMA_ENABLE); |
430 | // Stall for 2 cycles in case we call this function more than once. | ||
431 | asm("nop"); asm("nop"); | ||
428 | } | 432 | } |
429 | 433 | ||
430 | // | 434 | // |