From patchwork Wed Feb 3 20:32:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Snow X-Patchwork-Id: 8208731 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 28E78BEEE5 for ; Wed, 3 Feb 2016 20:34:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6DD16202C8 for ; Wed, 3 Feb 2016 20:34:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B0DD20279 for ; Wed, 3 Feb 2016 20:34:42 +0000 (UTC) Received: from localhost ([::1]:37535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR48P-0001u0-Rm for patchwork-qemu-devel@patchwork.kernel.org; Wed, 03 Feb 2016 15:34:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR46T-0006fD-Gk for qemu-devel@nongnu.org; Wed, 03 Feb 2016 15:32:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aR46Q-0005bi-VS for qemu-devel@nongnu.org; Wed, 03 Feb 2016 15:32:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR46Q-0005bM-NJ for qemu-devel@nongnu.org; Wed, 03 Feb 2016 15:32:38 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 5E034C0A848A; Wed, 3 Feb 2016 20:32:38 +0000 (UTC) Received: from scv.usersys.redhat.com (vpn-49-112.rdu2.redhat.com [10.10.49.112]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u13KWZEf032297; Wed, 3 Feb 2016 15:32:37 -0500 From: John Snow To: qemu-devel@nongnu.org Date: Wed, 3 Feb 2016 15:32:18 -0500 Message-Id: <1454531555-32022-4-git-send-email-jsnow@redhat.com> In-Reply-To: <1454531555-32022-1-git-send-email-jsnow@redhat.com> References: <1454531555-32022-1-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, jsnow@redhat.com, =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [Qemu-devel] [PULL 03/20] i8257: pass ISA bus to DMA_init() function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hervé Poussineau i8257 DMA controller exists on one ISA bus, so let's specify it at initialization. Signed-off-by: Hervé Poussineau Message-id: 1453843944-26833-3-git-send-email-hpoussin@reactos.org Signed-off-by: John Snow --- hw/dma/i82374.c | 2 +- hw/dma/i8257.c | 2 +- hw/i386/pc.c | 2 +- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/sparc/sun4m.c | 2 +- hw/sparc64/sun4u.c | 2 +- include/hw/isa/isa.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index 031a3f5..6c0f975 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -123,7 +123,7 @@ static void i82374_realize(DeviceState *dev, Error **errp) portio_list_add(&s->port_list, isa_address_space_io(&s->parent_obj), s->iobase); - DMA_init(1); + DMA_init(isa_bus_from_device(ISA_DEVICE(dev)), 1); memset(s->commands, 0, sizeof(s->commands)); } diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 1ff6c4d..bb6945a 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -589,7 +589,7 @@ static const VMStateDescription vmstate_dma = { } }; -void DMA_init(int high_page_enable) +void DMA_init(ISABus *bus, int high_page_enable) { dma_init2(&dma_controllers[0], 0x00, 0, 0x80, high_page_enable ? 0x480 : -1); dma_init2(&dma_controllers[1], 0xc0, 1, 0x88, high_page_enable ? 0x488 : -1); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 942ac06..b28bac4 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1542,7 +1542,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, port92 = isa_create_simple(isa_bus, "port92"); port92_init(port92, &a20_line[1]); - DMA_init(0); + DMA_init(isa_bus, 0); for(i = 0; i < MAX_FD; i++) { fd[i] = drive_get(IF_FLOPPY, 0, i); diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 6748d89..184c404 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -366,7 +366,7 @@ static void mips_fulong2e_init(MachineState *machine) /* init other devices */ pit = pit_init(isa_bus, 0x40, 0, NULL); - DMA_init(0); + DMA_init(isa_bus, 0); /* Super I/O */ isa_create_simple(isa_bus, "i8042"); diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index 62527fd..a199b9d 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -225,7 +225,7 @@ static void mips_jazz_init(MachineState *machine, /* ISA devices */ i8259 = i8259_init(isa_bus, env->irq[4]); isa_bus_irqs(isa_bus, i8259); - DMA_init(0); + DMA_init(isa_bus, 0); pit = pit_init(isa_bus, 0x40, 0, NULL); pcspk_init(isa_bus, pit); diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index c5da83f..c04aa2b 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1166,7 +1166,7 @@ void mips_malta_init(MachineState *machine) smbus_eeprom_init(smbus, 8, smbus_eeprom_buf, smbus_eeprom_size); g_free(smbus_eeprom_buf); pit = pit_init(isa_bus, 0x40, 0, NULL); - DMA_init(0); + DMA_init(isa_bus, 0); /* Super I/O */ isa_create_simple(isa_bus, "i8042"); diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 1fcec44..9c078d5 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -112,7 +112,7 @@ void DMA_hold_DREQ (int nchan) {} void DMA_release_DREQ (int nchan) {} void DMA_schedule(void) {} -void DMA_init(int high_page_enable) +void DMA_init(ISABus *bus, int high_page_enable) { } diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 124c376..d356717 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -115,7 +115,7 @@ void DMA_hold_DREQ (int nchan) {} void DMA_release_DREQ (int nchan) {} void DMA_schedule(void) {} -void DMA_init(int high_page_enable) +void DMA_init(ISABus *bus, int high_page_enable) { } diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index de3cd3d..4af8730 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -113,7 +113,7 @@ int DMA_write_memory (int nchan, void *buf, int pos, int size); void DMA_hold_DREQ (int nchan); void DMA_release_DREQ (int nchan); void DMA_schedule(void); -void DMA_init(int high_page_enable); +void DMA_init(ISABus *bus, int high_page_enable); void DMA_register_channel (int nchan, DMA_transfer_handler transfer_handler, void *opaque);