[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/9] es1370: Use PCI DMA stub functions
From: |
David Gibson |
Subject: |
[Qemu-devel] [PATCH 5/9] es1370: Use PCI DMA stub functions |
Date: |
Mon, 5 Sep 2011 14:35:00 +1000 |
From: Eduard - Gabriel Munteanu <address@hidden>
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 <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/es1370.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/es1370.c b/hw/es1370.c
index a9387d1..fbbb94f 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;
--
1.7.5.4
- [Qemu-devel] [0/9] Preliminary work for IOMMU emulation support; the easy bits (v2), David Gibson, 2011/09/05
- [Qemu-devel] [PATCH 6/9] e1000: Use PCI DMA stub functions, David Gibson, 2011/09/05
- [Qemu-devel] [PATCH 8/9] pcnet-pci: Use PCI DMA stub functions, David Gibson, 2011/09/05
- [Qemu-devel] [PATCH 1/9] Add stub functions for PCI device models to do PCI DMA, David Gibson, 2011/09/05
- [Qemu-devel] [PATCH 5/9] es1370: Use PCI DMA stub functions,
David Gibson <=
- [Qemu-devel] [PATCH 7/9] lsi53c895a: Use PCI DMA stub functions, David Gibson, 2011/09/05
- [Qemu-devel] [PATCH 2/9] rtl8139: Use PCI DMA stub functions, David Gibson, 2011/09/05
- [Qemu-devel] [PATCH 4/9] ac97: Use PCI DMA stub functions, David Gibson, 2011/09/05
- [Qemu-devel] [PATCH 3/9] eepro100: Use PCI DMA stub functions, David Gibson, 2011/09/05
- [Qemu-devel] [PATCH 9/9] intel-hda: Use PCI DMA stub functions, David Gibson, 2011/09/05
- Re: [Qemu-devel] [0/9] Preliminary work for IOMMU emulation support; the easy bits (v2), David Gibson, 2011/09/16