diff options
author | Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> | 2011-10-31 17:06:51 +1100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-01 16:52:07 -0500 |
commit | 3204db98de7dd0bd25a2223fd324313c610cc029 (patch) | |
tree | bf18050dfcc2995fb9cd48c9620e575fd5402a5e | |
parent | 93f43c48887a4e5b651965955eedd8e838e53db3 (diff) | |
download | qemu-3204db98de7dd0bd25a2223fd324313c610cc029.zip qemu-3204db98de7dd0bd25a2223fd324313c610cc029.tar.gz qemu-3204db98de7dd0bd25a2223fd324313c610cc029.tar.bz2 |
es1370: Use PCI DMA stub functions
This updates the es1370 device emulation to use the explicit PCI DMA
functions, instead of directly calling physical memory access functions.
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/es1370.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/es1370.c b/hw/es1370.c index 2daadde..c5c16b0 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -30,6 +30,7 @@ #include "audiodev.h" #include "audio/audio.h" #include "pci.h" +#include "dma.h" /* Missing stuff: SCTRL_P[12](END|ST)INC @@ -802,7 +803,7 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel, if (!acquired) break; - cpu_physical_memory_write (addr, tmpbuf, acquired); + pci_dma_write (&s->dev, addr, tmpbuf, acquired); temp -= acquired; addr += acquired; @@ -816,7 +817,7 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel, int copied, to_copy; to_copy = audio_MIN ((size_t) temp, sizeof (tmpbuf)); - cpu_physical_memory_read (addr, tmpbuf, to_copy); + pci_dma_read (&s->dev, addr, tmpbuf, to_copy); copied = AUD_write (voice, tmpbuf, to_copy); if (!copied) break; |