Revision c227f099 hw/ppc405_boards.c

b/hw/ppc405_boards.c
52 52
 * - NVRAM (0xF0000000)
53 53
 * - FPGA  (0xF0300000)
54 54
 */
55
typedef struct ref405ep_fpga a_ref405ep_fpga;
56
struct ref405ep_fpga {
55
typedef struct ref405ep_fpga_t ref405ep_fpga_t;
56
struct ref405ep_fpga_t {
57 57
    uint8_t reg0;
58 58
    uint8_t reg1;
59 59
};
60 60

  
61
static uint32_t ref405ep_fpga_readb (void *opaque, a_target_phys_addr addr)
61
static uint32_t ref405ep_fpga_readb (void *opaque, target_phys_addr_t addr)
62 62
{
63
    a_ref405ep_fpga *fpga;
63
    ref405ep_fpga_t *fpga;
64 64
    uint32_t ret;
65 65

  
66 66
    fpga = opaque;
......
80 80
}
81 81

  
82 82
static void ref405ep_fpga_writeb (void *opaque,
83
                                  a_target_phys_addr addr, uint32_t value)
83
                                  target_phys_addr_t addr, uint32_t value)
84 84
{
85
    a_ref405ep_fpga *fpga;
85
    ref405ep_fpga_t *fpga;
86 86

  
87 87
    fpga = opaque;
88 88
    switch (addr) {
......
97 97
    }
98 98
}
99 99

  
100
static uint32_t ref405ep_fpga_readw (void *opaque, a_target_phys_addr addr)
100
static uint32_t ref405ep_fpga_readw (void *opaque, target_phys_addr_t addr)
101 101
{
102 102
    uint32_t ret;
103 103

  
......
108 108
}
109 109

  
110 110
static void ref405ep_fpga_writew (void *opaque,
111
                                  a_target_phys_addr addr, uint32_t value)
111
                                  target_phys_addr_t addr, uint32_t value)
112 112
{
113 113
    ref405ep_fpga_writeb(opaque, addr, (value >> 8) & 0xFF);
114 114
    ref405ep_fpga_writeb(opaque, addr + 1, value & 0xFF);
115 115
}
116 116

  
117
static uint32_t ref405ep_fpga_readl (void *opaque, a_target_phys_addr addr)
117
static uint32_t ref405ep_fpga_readl (void *opaque, target_phys_addr_t addr)
118 118
{
119 119
    uint32_t ret;
120 120

  
......
127 127
}
128 128

  
129 129
static void ref405ep_fpga_writel (void *opaque,
130
                                  a_target_phys_addr addr, uint32_t value)
130
                                  target_phys_addr_t addr, uint32_t value)
131 131
{
132 132
    ref405ep_fpga_writeb(opaque, addr, (value >> 24) & 0xFF);
133 133
    ref405ep_fpga_writeb(opaque, addr + 1, (value >> 16) & 0xFF);
......
149 149

  
150 150
static void ref405ep_fpga_reset (void *opaque)
151 151
{
152
    a_ref405ep_fpga *fpga;
152
    ref405ep_fpga_t *fpga;
153 153

  
154 154
    fpga = opaque;
155 155
    fpga->reg0 = 0x00;
......
158 158

  
159 159
static void ref405ep_fpga_init (uint32_t base)
160 160
{
161
    a_ref405ep_fpga *fpga;
161
    ref405ep_fpga_t *fpga;
162 162
    int fpga_memory;
163 163

  
164
    fpga = qemu_mallocz(sizeof(a_ref405ep_fpga));
164
    fpga = qemu_mallocz(sizeof(ref405ep_fpga_t));
165 165
    fpga_memory = cpu_register_io_memory(ref405ep_fpga_read,
166 166
                                         ref405ep_fpga_write, fpga);
167 167
    cpu_register_physical_memory(base, 0x00000100, fpga_memory);
......
169 169
    qemu_register_reset(&ref405ep_fpga_reset, fpga);
170 170
}
171 171

  
172
static void ref405ep_init (a_ram_addr ram_size,
172
static void ref405ep_init (ram_addr_t ram_size,
173 173
                           const char *boot_device,
174 174
                           const char *kernel_filename,
175 175
                           const char *kernel_cmdline,
......
177 177
                           const char *cpu_model)
178 178
{
179 179
    char *filename;
180
    a_ppc4xx_bd_info bd;
180
    ppc4xx_bd_info_t bd;
181 181
    CPUPPCState *env;
182 182
    qemu_irq *pic;
183
    a_ram_addr sram_offset, bios_offset, bdloc;
184
    a_target_phys_addr ram_bases[2], ram_sizes[2];
183
    ram_addr_t sram_offset, bios_offset, bdloc;
184
    target_phys_addr_t ram_bases[2], ram_sizes[2];
185 185
    target_ulong sram_size, bios_size;
186 186
    //int phy_addr = 0;
187 187
    //static int phy_addr = 1;
......
382 382
    uint8_t reg1;
383 383
};
384 384

  
385
static uint32_t taihu_cpld_readb (void *opaque, a_target_phys_addr addr)
385
static uint32_t taihu_cpld_readb (void *opaque, target_phys_addr_t addr)
386 386
{
387 387
    taihu_cpld_t *cpld;
388 388
    uint32_t ret;
......
404 404
}
405 405

  
406 406
static void taihu_cpld_writeb (void *opaque,
407
                               a_target_phys_addr addr, uint32_t value)
407
                               target_phys_addr_t addr, uint32_t value)
408 408
{
409 409
    taihu_cpld_t *cpld;
410 410

  
......
421 421
    }
422 422
}
423 423

  
424
static uint32_t taihu_cpld_readw (void *opaque, a_target_phys_addr addr)
424
static uint32_t taihu_cpld_readw (void *opaque, target_phys_addr_t addr)
425 425
{
426 426
    uint32_t ret;
427 427

  
......
432 432
}
433 433

  
434 434
static void taihu_cpld_writew (void *opaque,
435
                               a_target_phys_addr addr, uint32_t value)
435
                               target_phys_addr_t addr, uint32_t value)
436 436
{
437 437
    taihu_cpld_writeb(opaque, addr, (value >> 8) & 0xFF);
438 438
    taihu_cpld_writeb(opaque, addr + 1, value & 0xFF);
439 439
}
440 440

  
441
static uint32_t taihu_cpld_readl (void *opaque, a_target_phys_addr addr)
441
static uint32_t taihu_cpld_readl (void *opaque, target_phys_addr_t addr)
442 442
{
443 443
    uint32_t ret;
444 444

  
......
451 451
}
452 452

  
453 453
static void taihu_cpld_writel (void *opaque,
454
                               a_target_phys_addr addr, uint32_t value)
454
                               target_phys_addr_t addr, uint32_t value)
455 455
{
456 456
    taihu_cpld_writel(opaque, addr, (value >> 24) & 0xFF);
457 457
    taihu_cpld_writel(opaque, addr + 1, (value >> 16) & 0xFF);
......
493 493
    qemu_register_reset(&taihu_cpld_reset, cpld);
494 494
}
495 495

  
496
static void taihu_405ep_init(a_ram_addr ram_size,
496
static void taihu_405ep_init(ram_addr_t ram_size,
497 497
                             const char *boot_device,
498 498
                             const char *kernel_filename,
499 499
                             const char *kernel_cmdline,
......
503 503
    char *filename;
504 504
    CPUPPCState *env;
505 505
    qemu_irq *pic;
506
    a_ram_addr bios_offset;
507
    a_target_phys_addr ram_bases[2], ram_sizes[2];
506
    ram_addr_t bios_offset;
507
    target_phys_addr_t ram_bases[2], ram_sizes[2];
508 508
    target_ulong bios_size;
509 509
    target_ulong kernel_base, kernel_size, initrd_base, initrd_size;
510 510
    int linux_boot;

Also available in: Unified diff