Removed autodocs of arch specific variants of ROM modules.
[AROS.git] / arch / ppc-sam440 / exec / cachepredma.c
bloba42202f8aa70ece25bdc53dbd62d0077393acf1f
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: CachePreDMA() - Do what is necessary for DMA.
6 Lang: english
7 */
9 #define DEBUG 0
11 #include <aros/debug.h>
12 #include <exec/types.h>
13 #include <aros/libcall.h>
14 #include <proto/kernel.h>
16 #include "exec_intern.h"
18 /* See rom/exec/cachepredma.c for documentation */
20 #include <proto/exec.h>
22 AROS_LH3(APTR, CachePreDMA,
23 AROS_LHA(APTR, address, A0),
24 AROS_LHA(ULONG *, length, A1),
25 AROS_LHA(ULONG, flags, D0),
26 struct ExecBase *, SysBase, 127, Exec)
28 AROS_LIBFUNC_INIT
30 void *addr = KrnVirtualToPhysical(address);
32 D(bug("[exec] CachePreDMA(%08x, %d, %c) = %08x\n", address, *length, flags & DMA_ReadFromRAM ? 'R':'W', addr));
34 /* At PreDMA stage only data caches need to be flushed */
35 CacheClearE(address, *length, CACRF_ClearD);
37 return addr;
39 AROS_LIBFUNC_EXIT
40 } /* CachePreDMA() */