3
|
1 #ifndef INCLUDED_DMA_MANAGER
|
|
2 #define INCLUDED_DMA_MANAGER
|
|
3
|
109
|
4 #ifndef INCLUDED_BASE_H_
|
|
5 # include "base.h"
|
|
6 #endif
|
|
7
|
|
8
|
3
|
9 enum dma_tag {
|
109
|
10 #if 0
|
|
11 DMA_READ = 27,
|
|
12 DMA_WRITE = 28,
|
|
13 DMA_READ_TASKLIST = 29,
|
|
14 DMA_READ_IN_LIST = 30,
|
|
15 DMA_READ_OUT_LIST = 31,
|
|
16 #else
|
|
17 DMA_READ_TASKLIST = 27,
|
|
18 DMA_READ_IN_LIST = 28,
|
|
19 DMA_READ_OUT_LIST = 29,
|
|
20 DMA_READ = 30,
|
|
21 DMA_WRITE = 31,
|
|
22 #endif
|
3
|
23 };
|
|
24
|
109
|
25 #ifndef INCLUDED_LIST_DATA
|
|
26 # include "ListData.h"
|
|
27 #endif
|
|
28
|
42
|
29 #ifndef INCLUDED_TYPES
|
46
|
30 # include "types.h"
|
42
|
31 #endif
|
3
|
32
|
|
33 class DmaManager {
|
|
34 public:
|
|
35 virtual ~DmaManager(void) {};
|
|
36
|
109
|
37 BASE_NEW_DELETE(DmaManager);
|
|
38
|
88
|
39 // API for DMA transfer
|
109
|
40 virtual void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask) {}
|
|
41 virtual void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask) {}
|
|
42 virtual void dma_wait(uint32 mask) {}
|
3
|
43
|
88
|
44 // API for SPU inbound/outbound mailbox
|
109
|
45 virtual void mail_write(uint32 data) {}
|
|
46 virtual uint32 mail_read(void) {return 0;}
|
|
47
|
88
|
48 // API for MFC list DMA transfer
|
109
|
49 virtual void dma_loadList(ListDataPtr list, void *,uint32 mask) {}
|
|
50 virtual void dma_storeList(ListDataPtr, void *buff, uint32 mask) {}
|
3
|
51 };
|
|
52
|
|
53 #endif
|