1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25: #include "hw.h"
26: #include "ppc_mac.h"
27:
28:
29:
30: static void dbdma_writeb (void *opaque,
31: target_phys_addr_t addr, uint32_t value)
32: {
33: printf("%s: 0x" PADDRX " <= 0x%08x\n", __func__, addr, value);
34: }
35:
36: static void dbdma_writew (void *opaque,
37: target_phys_addr_t addr, uint32_t value)
38: {
39: }
40:
41: static void dbdma_writel (void *opaque,
42: target_phys_addr_t addr, uint32_t value)
43: {
44: }
45:
46: static uint32_t dbdma_readb (void *opaque, target_phys_addr_t addr)
47: {
48: printf("%s: 0x" PADDRX " => 0x00000000\n", __func__, addr);
49:
50: return 0;
51: }
52:
53: static uint32_t dbdma_readw (void *opaque, target_phys_addr_t addr)
54: {
55: return 0;
56: }
57:
58: static uint32_t dbdma_readl (void *opaque, target_phys_addr_t addr)
59: {
60: return 0;
61: }
62:
63: static CPUWriteMemoryFunc *dbdma_write[] = {
64: &dbdma_writeb,
65: &dbdma_writew,
66: &dbdma_writel,
67: };
68:
69: static CPUReadMemoryFunc *dbdma_read[] = {
70: &dbdma_readb,
71: &dbdma_readw,
72: &dbdma_readl,
73: };
74:
75: void dbdma_init (int *dbdma_mem_index)
76: {
77: *dbdma_mem_index = cpu_register_io_memory(0, dbdma_read, dbdma_write, NULL);
78: }
79: