~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to hw/sparc32_dma.c

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno, Aurelien Jarno
  • Date: 2009-03-22 10:13:17 UTC
  • mfrom: (1.2.1 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090322101317-iigjtnu5qil35dtb
Tags: 0.10.1-1
[ Aurelien Jarno ]
* New upstream stable release:
  - patches/80_stable-branch.patch: remove.
* debian/control: 
  - Remove depends on proll.
  - Move depends on device-tree-compiler to build-depends.
  - Bump Standards-Version to 3.8.1 (no changes).
* patches/82_qemu-img_decimal.patch: new patch from upstream to make
  qemu-img accept sizes with decimal values (closes: bug#501400).

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
#define DMA_REGS 4
47
47
#define DMA_SIZE (4 * sizeof(uint32_t))
48
 
#define DMA_MAXADDR (DMA_SIZE - 1)
 
48
/* We need the mask, because one instance of the device is not page
 
49
   aligned (ledma, start address 0x0010) */
 
50
#define DMA_MASK (DMA_SIZE - 1)
49
51
 
50
52
#define DMA_VER 0xa0000000
51
53
#define DMA_INTR 1
157
159
    DMAState *s = opaque;
158
160
    uint32_t saddr;
159
161
 
160
 
    saddr = (addr & DMA_MAXADDR) >> 2;
 
162
    saddr = (addr & DMA_MASK) >> 2;
161
163
    DPRINTF("read dmareg " TARGET_FMT_plx ": 0x%8.8x\n", addr,
162
164
            s->dmaregs[saddr]);
163
165
 
169
171
    DMAState *s = opaque;
170
172
    uint32_t saddr;
171
173
 
172
 
    saddr = (addr & DMA_MAXADDR) >> 2;
 
174
    saddr = (addr & DMA_MASK) >> 2;
173
175
    DPRINTF("write dmareg " TARGET_FMT_plx ": 0x%8.8x -> 0x%8.8x\n", addr,
174
176
            s->dmaregs[saddr], val);
175
177
    switch (saddr) {
246
248
    int dma_io_memory;
247
249
 
248
250
    s = qemu_mallocz(sizeof(DMAState));
249
 
    if (!s)
250
 
        return NULL;
251
251
 
252
252
    s->irq = parent_irq;
253
253
    s->iommu = iommu;