Revert part of r5853
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6057 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
3af72a4d98
commit
09723aa114
|
@ -45,6 +45,9 @@ do { printf("DMA: " fmt , ##args); } while (0)
|
||||||
|
|
||||||
#define DMA_REGS 4
|
#define DMA_REGS 4
|
||||||
#define DMA_SIZE (4 * sizeof(uint32_t))
|
#define DMA_SIZE (4 * sizeof(uint32_t))
|
||||||
|
/* We need the mask, because one instance of the device is not page
|
||||||
|
aligned (ledma, start address 0x0010) */
|
||||||
|
#define DMA_MASK (DMA_SIZE - 1)
|
||||||
|
|
||||||
#define DMA_VER 0xa0000000
|
#define DMA_VER 0xa0000000
|
||||||
#define DMA_INTR 1
|
#define DMA_INTR 1
|
||||||
|
@ -156,7 +159,7 @@ static uint32_t dma_mem_readl(void *opaque, target_phys_addr_t addr)
|
||||||
DMAState *s = opaque;
|
DMAState *s = opaque;
|
||||||
uint32_t saddr;
|
uint32_t saddr;
|
||||||
|
|
||||||
saddr = addr >> 2;
|
saddr = (addr & DMA_MASK) >> 2;
|
||||||
DPRINTF("read dmareg " TARGET_FMT_plx ": 0x%8.8x\n", addr,
|
DPRINTF("read dmareg " TARGET_FMT_plx ": 0x%8.8x\n", addr,
|
||||||
s->dmaregs[saddr]);
|
s->dmaregs[saddr]);
|
||||||
|
|
||||||
|
@ -168,7 +171,7 @@ static void dma_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
|
||||||
DMAState *s = opaque;
|
DMAState *s = opaque;
|
||||||
uint32_t saddr;
|
uint32_t saddr;
|
||||||
|
|
||||||
saddr = addr >> 2;
|
saddr = (addr & DMA_MASK) >> 2;
|
||||||
DPRINTF("write dmareg " TARGET_FMT_plx ": 0x%8.8x -> 0x%8.8x\n", addr,
|
DPRINTF("write dmareg " TARGET_FMT_plx ": 0x%8.8x -> 0x%8.8x\n", addr,
|
||||||
s->dmaregs[saddr], val);
|
s->dmaregs[saddr], val);
|
||||||
switch (saddr) {
|
switch (saddr) {
|
||||||
|
|
Loading…
Reference in a new issue