3
|
1 #ifndef INCLUDED_DMA_MANAGER
|
|
2 #define INCLUDED_DMA_MANAGER
|
|
3
|
|
4 enum dma_tag {
|
|
5 DMA_READ,
|
|
6 DMA_WRITE
|
|
7 };
|
|
8
|
42
|
9 #ifndef INCLUDED_TYPES
|
46
|
10 # include "types.h"
|
42
|
11 #endif
|
3
|
12
|
|
13 class DmaManager {
|
|
14 public:
|
|
15 virtual ~DmaManager(void) {};
|
|
16
|
88
|
17 // API for DMA transfer
|
|
18 virtual void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask)=0;
|
|
19 virtual void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask)=0;
|
|
20 virtual void dma_wait(uint32 mask) = 0;
|
3
|
21
|
88
|
22 // API for SPU inbound/outbound mailbox
|
|
23 virtual void mail_write(uint32 data) = 0;
|
|
24 virtual uint32 mail_read(void) = 0;
|
|
25
|
|
26 // API for MFC list DMA transfer
|
|
27 virtual void dmaList_set(uint32 address, uint32 size) {}
|
|
28 virtual void** dmaList_load(uint32 mask) { return (void**)0; }
|
3
|
29 };
|
|
30
|
|
31 #endif
|