blob: c3b8b8970b3e2b326708a07b246da0e47c7eda77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "MI_dma_card.h"
#include "MI_dma.h"
#include "function_target.h"
ARM_FUNC void MIi_CardDmaCopy32(u32 dmaNo, const void *src, void *dest, u32 size)
{
MIi_CheckAnotherAutoDMA(dmaNo, MIi_DMA_TIMING_ANY);
MIi_CheckDma0SourceAddress(dmaNo, (u32)src, size, MI_DMA_SRC_FIX);
if (size == 0)
{
return;
}
vu32 *dmaCntp;
do
{
dmaCntp = &((vu32 *)REG_ADDR_DMA0SAD)[dmaNo * 3 + 2];
while (*dmaCntp & 0x80000000) {}
} while(0);
MIi_DmaSetParams(dmaNo, (u32)src, (u32)dest, (u32)(0xaf000001));
}
|