Revision 8da3ff18 hw/pl080.c
b/hw/pl080.c | ||
---|---|---|
37 | 37 |
} pl080_channel; |
38 | 38 |
|
39 | 39 |
typedef struct { |
40 |
uint32_t base; |
|
41 | 40 |
uint8_t tc_int; |
42 | 41 |
uint8_t tc_mask; |
43 | 42 |
uint8_t err_int; |
... | ... | |
187 | 186 |
uint32_t i; |
188 | 187 |
uint32_t mask; |
189 | 188 |
|
190 |
offset -= s->base; |
|
191 | 189 |
if (offset >= 0xfe0 && offset < 0x1000) { |
192 | 190 |
if (s->nchannels == 8) { |
193 | 191 |
return pl080_id[(offset - 0xfe0) >> 2]; |
... | ... | |
255 | 253 |
pl080_state *s = (pl080_state *)opaque; |
256 | 254 |
int i; |
257 | 255 |
|
258 |
offset -= s->base; |
|
259 | 256 |
if (offset >= 0x100 && offset < 0x200) { |
260 | 257 |
i = (offset & 0xe0) >> 5; |
261 | 258 |
if (i >= s->nchannels) |
... | ... | |
334 | 331 |
iomemtype = cpu_register_io_memory(0, pl080_readfn, |
335 | 332 |
pl080_writefn, s); |
336 | 333 |
cpu_register_physical_memory(base, 0x00001000, iomemtype); |
337 |
s->base = base; |
|
338 | 334 |
s->irq = irq; |
339 | 335 |
s->nchannels = nchannels; |
340 | 336 |
/* ??? Save/restore. */ |
Also available in: Unified diff