Revision 8da3ff18 hw/pxa2xx_dma.c

b/hw/pxa2xx_dma.c
25 25

  
26 26
struct pxa2xx_dma_state_s {
27 27
    pxa2xx_dma_handler_t handler;
28
    target_phys_addr_t base;
29 28
    qemu_irq irq;
30 29

  
31 30
    uint32_t stopintr;
......
257 256
{
258 257
    struct pxa2xx_dma_state_s *s = (struct pxa2xx_dma_state_s *) opaque;
259 258
    unsigned int channel;
260
    offset -= s->base;
261 259

  
262 260
    switch (offset) {
263 261
    case DRCMR64 ... DRCMR74:
......
313 311
{
314 312
    struct pxa2xx_dma_state_s *s = (struct pxa2xx_dma_state_s *) opaque;
315 313
    unsigned int channel;
316
    offset -= s->base;
317 314

  
318 315
    switch (offset) {
319 316
    case DRCMR64 ... DRCMR74:
......
498 495

  
499 496
    s->channels = channels;
500 497
    s->chan = qemu_mallocz(sizeof(struct pxa2xx_dma_channel_s) * s->channels);
501
    s->base = base;
502 498
    s->irq = irq;
503 499
    s->handler = (pxa2xx_dma_handler_t) pxa2xx_dma_request;
504 500
    s->req = qemu_mallocz(sizeof(uint8_t) * PXA2XX_DMA_NUM_REQUESTS);

Also available in: Unified diff