Revision c227f099 hw/macio.c
b/hw/macio.c | ||
---|---|---|
27 | 27 |
#include "pci.h" |
28 | 28 |
#include "escc.h" |
29 | 29 |
|
30 |
typedef struct macio_state a_macio_state;
|
|
31 |
struct macio_state { |
|
30 |
typedef struct macio_state_t macio_state_t;
|
|
31 |
struct macio_state_t {
|
|
32 | 32 |
int is_oldworld; |
33 | 33 |
int pic_mem_index; |
34 | 34 |
int dbdma_mem_index; |
... | ... | |
42 | 42 |
static void macio_map (PCIDevice *pci_dev, int region_num, |
43 | 43 |
uint32_t addr, uint32_t size, int type) |
44 | 44 |
{ |
45 |
a_macio_state *macio_state;
|
|
45 |
macio_state_t *macio_state;
|
|
46 | 46 |
int i; |
47 | 47 |
|
48 |
macio_state = (a_macio_state *)(pci_dev + 1);
|
|
48 |
macio_state = (macio_state_t *)(pci_dev + 1);
|
|
49 | 49 |
if (macio_state->pic_mem_index >= 0) { |
50 | 50 |
if (macio_state->is_oldworld) { |
51 | 51 |
/* Heathrow PIC */ |
... | ... | |
84 | 84 |
int nb_ide, int *ide_mem_index, int escc_mem_index) |
85 | 85 |
{ |
86 | 86 |
PCIDevice *d; |
87 |
a_macio_state *macio_state;
|
|
87 |
macio_state_t *macio_state;
|
|
88 | 88 |
int i; |
89 | 89 |
|
90 | 90 |
d = pci_register_device(bus, "macio", |
91 |
sizeof(PCIDevice) + sizeof(a_macio_state),
|
|
91 |
sizeof(PCIDevice) + sizeof(macio_state_t),
|
|
92 | 92 |
-1, NULL, NULL); |
93 |
macio_state = (a_macio_state *)(d + 1);
|
|
93 |
macio_state = (macio_state_t *)(d + 1);
|
|
94 | 94 |
macio_state->is_oldworld = is_oldworld; |
95 | 95 |
macio_state->pic_mem_index = pic_mem_index; |
96 | 96 |
macio_state->dbdma_mem_index = dbdma_mem_index; |
Also available in: Unified diff