From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyzP0-0006LB-2o for qemu-devel@nongnu.org; Thu, 01 Sep 2011 01:01:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyzOx-0000b7-Sb for qemu-devel@nongnu.org; Thu, 01 Sep 2011 01:01:22 -0400 Received: from ozlabs.org ([203.10.76.45]:34186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyzOw-0000Zq-SY for qemu-devel@nongnu.org; Thu, 01 Sep 2011 01:01:19 -0400 From: David Gibson Date: Thu, 1 Sep 2011 15:00:58 +1000 Message-Id: <1314853263-2086-6-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1314853263-2086-1-git-send-email-david@gibson.dropbear.id.au> References: <1314853263-2086-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PATCH 05/10] es1370: Use PCI DMA stub functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: joerg.roedel@amd.com, aliguori@us.ibm.com, rth@twiddle.net, agraf@suse.de, eduard.munteanu@linux360.ro From: Eduard - Gabriel Munteanu 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 Signed-off-by: David Gibson --- 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