~ubuntu-branches/ubuntu/precise/qemu-kvm/precise

« back to all changes in this revision

Viewing changes to hw/pxa2xx_mmci.c

  • Committer: Serge Hallyn
  • Date: 2011-10-19 07:37:43 UTC
  • mfrom: (1.2.7)
  • Revision ID: serge.hallyn@ubuntu.com-20111019073743-7i7n9irsxlm38wic
Tags: 0.15.0+noroms-0ubuntu1
* New upstream release
* Remaining changes from upstream:
  - removed all binary roms and tests/pi_10.com
* Removed Detect-and-use-GCC-atomic-builtins-for-locking.patch - non-NPTL
  implementations were removed with commit
  02615337ef295443daa03233e492194e289a807e
* Drop spice-qxl-locking-fix-for-qemu-kvm.patch - should be unnecessary
  as of commit 196a778428989217b82de042725dc8eb29c8f8d8
* drop patches applied upstream:
  - CVE-2011-1751.diff
  - virtio-guard-against-negative-vq-notifies-CVE-2011-2512.diff
  - CVE-2011-2527.patch
  - fix-pa-configure.patch
* Refreshed the remaining patches:
  - larger_default_ram_size.patch
  - CVE-2011-2212-virtqueue-indirect-overflow.patch
  - qemuifup-fix-paths.patch
  - vpc.patch
* e1000-Dont-set-the-Capabilities-List-bit.patch - switched to the
  cherrypicked upstream patch (as the source file changed quite a bit,
  and the hand-ported patch backported to 0.14.1 does not apply).
* Drop qemu-kvm-spice (all changes from 0.14.1+noroms-0ubuntu7), it will
  need its own source package (LP: #878162)

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#include "hw.h"
11
11
#include "pxa.h"
12
12
#include "sd.h"
 
13
#include "qdev.h"
13
14
 
14
15
struct PXA2xxMMCIState {
15
16
    qemu_irq irq;
16
 
    void *dma;
 
17
    qemu_irq rx_dma;
 
18
    qemu_irq tx_dma;
17
19
 
18
20
    SDState *card;
19
21
 
102
104
    if (s->cmdat & CMDAT_DMA_EN) {
103
105
        mask |= INT_RXFIFO_REQ | INT_TXFIFO_REQ;
104
106
 
105
 
        pxa2xx_dma_request(s->dma,
106
 
                        PXA2XX_RX_RQ_MMCI, !!(s->intreq & INT_RXFIFO_REQ));
107
 
        pxa2xx_dma_request(s->dma,
108
 
                        PXA2XX_TX_RQ_MMCI, !!(s->intreq & INT_TXFIFO_REQ));
 
107
        qemu_set_irq(s->rx_dma, !!(s->intreq & INT_RXFIFO_REQ));
 
108
        qemu_set_irq(s->tx_dma, !!(s->intreq & INT_TXFIFO_REQ));
109
109
    }
110
110
 
111
111
    qemu_set_irq(s->irq, !!(s->intreq & ~mask));
518
518
}
519
519
 
520
520
PXA2xxMMCIState *pxa2xx_mmci_init(target_phys_addr_t base,
521
 
                BlockDriverState *bd, qemu_irq irq, void *dma)
 
521
                BlockDriverState *bd, qemu_irq irq,
 
522
                qemu_irq rx_dma, qemu_irq tx_dma)
522
523
{
523
524
    int iomemtype;
524
525
    PXA2xxMMCIState *s;
525
526
 
526
527
    s = (PXA2xxMMCIState *) qemu_mallocz(sizeof(PXA2xxMMCIState));
527
528
    s->irq = irq;
528
 
    s->dma = dma;
 
529
    s->rx_dma = rx_dma;
 
530
    s->tx_dma = tx_dma;
529
531
 
530
532
    iomemtype = cpu_register_io_memory(pxa2xx_mmci_readfn,
531
533
                    pxa2xx_mmci_writefn, s, DEVICE_NATIVE_ENDIAN);