void mem_dma_desc(
unsigned long Mode,
unsigned long SrcAddr, /* input data addr */
unsigned long DestAddr, /* output data addr */
unsigned long Slot,
unsigned long Size) /* dma data size */
{
...prepare for dma encryption/decryption operation...
/* flush data in SrcAddr from D-Cache to memory
to ensure dma device get the correct data */
flush_d_cache(SrcAddr, Size);
...do dma operation, output will be redirect to DestAddr...
/* invalidate D-Cache to ensure fetch data from memory
instead of cached data in D-Cache */
invalidate_d_cache(DestAddr, Size);
return;
}