From patchwork Mon Mar 26 15:34:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 891096 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jjVudNA3"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 408zM85T6Wz9s33 for ; Tue, 27 Mar 2018 02:58:11 +1100 (AEDT) Received: from localhost ([::1]:57567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0UVc-00065s-2r for incoming@patchwork.ozlabs.org; Mon, 26 Mar 2018 11:58:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0U9T-0003RI-Pq for qemu-devel@nongnu.org; Mon, 26 Mar 2018 11:35:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0U9S-0000T3-Jl for qemu-devel@nongnu.org; Mon, 26 Mar 2018 11:35:15 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:39605) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f0U9S-0000Sh-Fy for qemu-devel@nongnu.org; Mon, 26 Mar 2018 11:35:14 -0400 Received: by mail-qt0-x242.google.com with SMTP id v11so19969719qtj.6 for ; Mon, 26 Mar 2018 08:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=meGqfvJxx8hZLrt7hqRMcMJspaFRQYd4v2T543CMHBM=; b=jjVudNA3xWSc1mMISdmYmg8jWuJ+byvkBrTdiQJfGney79obQI4VDRsQunol3cBvSW mQJGQTVZ1HA7xjfCgfm6/oUOLvr9mOleyBseEizb0yhh9PemaPQexVPU4+jjVQ5d9OUH S8hyQ23LzJEvvMiyLbp7YYEt2ZpTHE0jgR8wvnpKxAaWQdJ/sTwDph2B8R9Wj0fbnKCe 6Jq1vtkTK1b4dg4YAuG6zMqNKyQNTXBscFIk++cBBCprMXqTBqNYtBeR+dQOyGK7iNsP 6CtY9XABlNPp0zWXRvZjbEbaGdy1dmzQZg7IALi6Rze+QpFtay7roTf2XskPas+osUPx +ETA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=meGqfvJxx8hZLrt7hqRMcMJspaFRQYd4v2T543CMHBM=; b=QTHpTny1kA5Xr+9eK54EeJl6a3Y9EqH81ggZyBnesIuWe2PWKcgK5xSAJ4X3TnH5vb Q7W174NhXNYQSHrrr7hwX7BuxmnapqGGUEux8Etjojka5tALgIoEqwMk+zk/jHBLMy+M CJdz91tuczgJMSIl7/AFiCOPw1C2mLB051+FQrM6b1m8ZH+F+iXRB/qULCmx7GTjj5IU PfVxm36tubOf93ooYI7UjvevEKDElnRhDME1rl/Z443k2wreyIYehFwWFF8nXwtGgHIV t4/a4HuYwPHj1MoTl+qQI71dMeQZUC5aDGRFqVBvyWh7Dx9OYyK7N7B80Izt3RaAI6o7 cixw== X-Gm-Message-State: AElRT7Fbr6uj+lAjrbrjVu/Piiixd08HEx5G33bJkhshMPOyMxsTgnMb yLiRp4yWMvnqbGiaalTEspM= X-Google-Smtp-Source: AIpwx4//urJAgVrf37C8BYqiIWfLoTM6pss5a23rewtMriLuC3K659Bf/TS9THEass1TrLKy+D/JcQ== X-Received: by 10.200.61.65 with SMTP id u1mr27364066qtf.168.1522078513936; Mon, 26 Mar 2018 08:35:13 -0700 (PDT) Received: from x1.local ([138.117.48.212]) by smtp.gmail.com with ESMTPSA id i188sm2017502qkc.16.2018.03.26.08.35.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Mar 2018 08:35:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Eduardo Otubo , Thomas Huth , Paolo Bonzini Date: Mon, 26 Mar 2018 12:34:41 -0300 Message-Id: <20180326153441.32641-6-f4bug@amsat.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180326153441.32641-1-f4bug@amsat.org> References: <20180326153441.32641-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::242 Subject: [Qemu-devel] [PATCH for-2.13 5/5] hw/dma/i8257: Rename i8257_dma_init(false) -> i8257_dma_init_pc_at() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Michael Tokarev , Alexander Graf , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Nageswara Sastry , Marcel Apfelbaum , =?utf-8?q?Herv=C3=A9_Poussineau?= , Yongbok Kim , Aurelien Jarno , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Reflect that the PC/AT implementation is used. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/dma/i8257.h | 17 +++++++++++++++-- hw/i386/pc.c | 2 +- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/include/hw/dma/i8257.h b/include/hw/dma/i8257.h index 986319e4e3..15db8b4d29 100644 --- a/include/hw/dma/i8257.h +++ b/include/hw/dma/i8257.h @@ -47,9 +47,22 @@ typedef struct I8257State { } I8257State; void i8257_dma_init_cascaded(ISABus *bus, bool high_page_enable); -static inline void i8257_dma_init(ISABus *bus, bool high_page_enable) + +/** + * i8257_dma_init_pc_at: Install 8 DMA channels on the ISA bus. + * + * This is the PC/AT DMA implementation: + * + * Two i8257 controllers are created. + * The primary controller register channels [0..3] on the bus, + * the secondary controller (slave) is cascaded on the primary (master), + * registering channels [4..7]. + * + * @bus: the #ISABus against which these are created. + */ +static inline void i8257_dma_init_pc_at(ISABus *bus) { - i8257_dma_init_cascaded(bus, high_page_enable); + i8257_dma_init_cascaded(bus, false); } #endif diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d36bac8c89..baba079d7f 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1624,7 +1624,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi, pcspk_init(isa_bus, pit); } - i8257_dma_init(isa_bus, 0); + i8257_dma_init_pc_at(isa_bus); /* Super I/O */ pc_superio_init(isa_bus, create_fdctrl, no_vmport); diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 02fb2fdcc4..8168e6cf16 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -243,7 +243,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc, isa_bus_irqs(isa_bus, i8259); /* init other devices */ i8254_pit_init(isa_bus, 0x40, 0, NULL); - i8257_dma_init(isa_bus, 0); + i8257_dma_init_pc_at(isa_bus); /* Super I/O */ isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO); diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index 7223085547..2577e8383d 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -222,7 +222,7 @@ static void mips_jazz_init(MachineState *machine, /* ISA devices */ i8259 = i8259_init(isa_bus, env->irq[4]); isa_bus_irqs(isa_bus, i8259); - i8257_dma_init(isa_bus, 0); + i8257_dma_init_pc_at(isa_bus); pit = i8254_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 f6513a4fd5..9d0409bc36 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -1198,7 +1198,7 @@ void mips_malta_init(MachineState *machine) smbus = piix4_pm_init(pci_bus, piix4_devfn + 3, 0x1100, isa_get_irq(NULL, 9), NULL, 0, NULL); pit = i8254_pit_init(isa_bus, 0x40, 0, NULL); - i8257_dma_init(isa_bus, 0); + i8257_dma_init_pc_at(isa_bus); mc146818_rtc_init(isa_bus, 2000, NULL); /* generate SPD EEPROM data */