From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122429; cv=none; d=zohomail.com; s=zohoarc; b=L29F1fB1tGj0xl3xCF8+VoQUhDiNG2Lx/msFBS3PrD/WgG6Md3dxefGvcrLnDpeUxp6ICjYlOybcm/YP7J7NRmy9CSugKstf4e8eQyhkEPQdfts3Hrkba64yWbFbxb43yih2N40E0Mn9ma+Bsxn0w3gQWWcTQ7qBkjFDp4e9WZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122429; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=D+toO5YpMRu3HMcQd7sdwqatgkzrAEB2AEX/Qos92kY=; b=Km2pLHrca+uWha2kJpUoKrryVNbqA5la4y6TUUZ388R9/UJ1wWet4VrzRrMeKSqjqh0592xWLMb+Afwft+ImxfaV/hIfnCBgmT1Dcrvq/TujCdN3p6NO1Q9Zz0zfKkNrsc8hlmptA+7mJE3bgpSNU9qXovuJpaAoUyAIJM3DTsU= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609122429515587.4471472300575; Sun, 27 Dec 2020 18:27:09 -0800 (PST) Received: from localhost ([::1]:44674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiFX-0000p2-VZ for importer@patchew.org; Sun, 27 Dec 2020 21:27:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD0-0007SJ-W4 for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:31 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57206) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiCx-0003vB-7I for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:30 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id BEC6D7470F0; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 35A76746552; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <43d949fea01d0ceacc677c9d68b8e64bb637cc21.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 01/10] vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via These parts are common between VT82C686B and VT8231 so can be shared in the future. Rename them to VIA prefix accordingly. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/vt82c686.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index b3170c70c3..2a0f85dea9 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -168,22 +168,22 @@ struct VT686PMState { uint32_t smb_io_base; }; =20 -struct VT686AC97State { +struct VIAAC97State { PCIDevice dev; }; =20 -struct VT686MC97State { +struct VIAMC97State { PCIDevice dev; }; =20 #define TYPE_VT82C686B_PM_DEVICE "VT82C686B_PM" OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM_DEVICE) =20 -#define TYPE_VT82C686B_MC97_DEVICE "VT82C686B_MC97" -OBJECT_DECLARE_SIMPLE_TYPE(VT686MC97State, VT82C686B_MC97_DEVICE) +#define TYPE_VIA_MC97_DEVICE "VIA_MC97" +OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97_DEVICE) =20 -#define TYPE_VT82C686B_AC97_DEVICE "VT82C686B_AC97" -OBJECT_DECLARE_SIMPLE_TYPE(VT686AC97State, VT82C686B_AC97_DEVICE) +#define TYPE_VIA_AC97_DEVICE "VIA_AC97" +OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97_DEVICE) =20 static void pm_update_sci(VT686PMState *s) { @@ -260,7 +260,7 @@ static const VMStateDescription vmstate_acpi =3D { =20 static void vt82c686b_ac97_realize(PCIDevice *dev, Error **errp) { - VT686AC97State *s =3D VT82C686B_AC97_DEVICE(dev); + VIAAC97State *s =3D VIA_AC97_DEVICE(dev); uint8_t *pci_conf =3D s->dev.config; =20 pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | @@ -274,7 +274,7 @@ void vt82c686b_ac97_init(PCIBus *bus, int devfn) { PCIDevice *dev; =20 - dev =3D pci_new(devfn, TYPE_VT82C686B_AC97_DEVICE); + dev =3D pci_new(devfn, TYPE_VIA_AC97_DEVICE); pci_realize_and_unref(dev, bus, &error_fatal); } =20 @@ -293,9 +293,9 @@ static void via_ac97_class_init(ObjectClass *klass, voi= d *data) } =20 static const TypeInfo via_ac97_info =3D { - .name =3D TYPE_VT82C686B_AC97_DEVICE, + .name =3D TYPE_VIA_AC97_DEVICE, .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(VT686AC97State), + .instance_size =3D sizeof(VIAAC97State), .class_init =3D via_ac97_class_init, .interfaces =3D (InterfaceInfo[]) { { INTERFACE_CONVENTIONAL_PCI_DEVICE }, @@ -305,7 +305,7 @@ static const TypeInfo via_ac97_info =3D { =20 static void vt82c686b_mc97_realize(PCIDevice *dev, Error **errp) { - VT686MC97State *s =3D VT82C686B_MC97_DEVICE(dev); + VIAMC97State *s =3D VIA_MC97_DEVICE(dev); uint8_t *pci_conf =3D s->dev.config; =20 pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | @@ -318,7 +318,7 @@ void vt82c686b_mc97_init(PCIBus *bus, int devfn) { PCIDevice *dev; =20 - dev =3D pci_new(devfn, TYPE_VT82C686B_MC97_DEVICE); + dev =3D pci_new(devfn, TYPE_VIA_MC97_DEVICE); pci_realize_and_unref(dev, bus, &error_fatal); } =20 @@ -337,9 +337,9 @@ static void via_mc97_class_init(ObjectClass *klass, voi= d *data) } =20 static const TypeInfo via_mc97_info =3D { - .name =3D TYPE_VT82C686B_MC97_DEVICE, + .name =3D TYPE_VIA_MC97_DEVICE, .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(VT686MC97State), + .instance_size =3D sizeof(VIAMC97State), .class_init =3D via_mc97_class_init, .interfaces =3D (InterfaceInfo[]) { { INTERFACE_CONVENTIONAL_PCI_DEVICE }, --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122576; cv=none; d=zohomail.com; s=zohoarc; b=YoAbCvih3Ke6b5KrzWu5qTeCRknSQh7SvZQwtwsrjkGzk7tNAWJsQpmNT1XZQUs2dNiUy/+cXucLtVV1IB2b5P+CkTVqxeupaXcKFi9ZaeZTh3ALuKhGQDwNi36cgfGJzfFF7hErwG4amdO29kRJg77PKwnt3Br5VDDFfDU9Rd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122576; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=6if80o/6Cq30isIKr1ONf9ghaZre2GVm7HSvfUK3rtI=; b=ZM2Lj2J3U7RYAMuAsa8UKuTmxMqVaM0jL/w+l5L/0nP+4SR44lOwYoqu0Q1uZtJD1SNwH2HKzj3eBxjr417VH4u0l7dQBfcBN/B6yIZbPc39S6pV9/KrLreAuDw8Kc0/XlJ6VhEWup02oaL4G397hx9iin4kan6RctAda9ABqxI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160912257658350.24775835772107; Sun, 27 Dec 2020 18:29:36 -0800 (PST) Received: from localhost ([::1]:53118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiHv-0004Dx-S6 for importer@patchew.org; Sun, 27 Dec 2020 21:29:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD1-0007Sp-Tt for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:31 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiCx-0003vA-7H for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:31 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id CF4C57470F4; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 3D2E47470DD; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <5b62392a6a3f39ea498e0f95a993a6d0f2288176.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 02/10] vt82c686: Remove unnecessary _DEVICE suffix from type macros Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via There's no reason to suffix everything with _DEVICE when the names are already unique without it and shorter names are more readable. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/vt82c686.c | 48 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 2a0f85dea9..1be1169f83 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -49,8 +49,8 @@ struct VT82C686BState { SuperIOConfig superio_conf; }; =20 -#define TYPE_VT82C686B_DEVICE "VT82C686B" -OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BState, VT82C686B_DEVICE) +#define TYPE_VT82C686B "VT82C686B" +OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BState, VT82C686B) =20 static void superio_ioport_writeb(void *opaque, hwaddr addr, uint64_t data, unsigned size) @@ -117,7 +117,7 @@ static const MemoryRegionOps superio_ops =3D { =20 static void vt82c686b_isa_reset(DeviceState *dev) { - VT82C686BState *vt82c =3D VT82C686B_DEVICE(dev); + VT82C686BState *vt82c =3D VT82C686B(dev); uint8_t *pci_conf =3D vt82c->dev.config; =20 pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); @@ -146,7 +146,7 @@ static void vt82c686b_isa_reset(DeviceState *dev) static void vt82c686b_write_config(PCIDevice *d, uint32_t address, uint32_t val, int len) { - VT82C686BState *vt686 =3D VT82C686B_DEVICE(d); + VT82C686BState *vt686 =3D VT82C686B(d); =20 DPRINTF("vt82c686b_write_config address 0x%x val 0x%x len 0x%x\n", address, val, len); @@ -176,14 +176,14 @@ struct VIAMC97State { PCIDevice dev; }; =20 -#define TYPE_VT82C686B_PM_DEVICE "VT82C686B_PM" -OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM_DEVICE) +#define TYPE_VT82C686B_PM "VT82C686B_PM" +OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM) =20 -#define TYPE_VIA_MC97_DEVICE "VIA_MC97" -OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97_DEVICE) +#define TYPE_VIA_MC97 "VIA_MC97" +OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97) =20 -#define TYPE_VIA_AC97_DEVICE "VIA_AC97" -OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97_DEVICE) +#define TYPE_VIA_AC97 "VIA_AC97" +OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97) =20 static void pm_update_sci(VT686PMState *s) { @@ -260,7 +260,7 @@ static const VMStateDescription vmstate_acpi =3D { =20 static void vt82c686b_ac97_realize(PCIDevice *dev, Error **errp) { - VIAAC97State *s =3D VIA_AC97_DEVICE(dev); + VIAAC97State *s =3D VIA_AC97(dev); uint8_t *pci_conf =3D s->dev.config; =20 pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | @@ -274,7 +274,7 @@ void vt82c686b_ac97_init(PCIBus *bus, int devfn) { PCIDevice *dev; =20 - dev =3D pci_new(devfn, TYPE_VIA_AC97_DEVICE); + dev =3D pci_new(devfn, TYPE_VIA_AC97); pci_realize_and_unref(dev, bus, &error_fatal); } =20 @@ -293,7 +293,7 @@ static void via_ac97_class_init(ObjectClass *klass, voi= d *data) } =20 static const TypeInfo via_ac97_info =3D { - .name =3D TYPE_VIA_AC97_DEVICE, + .name =3D TYPE_VIA_AC97, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(VIAAC97State), .class_init =3D via_ac97_class_init, @@ -305,7 +305,7 @@ static const TypeInfo via_ac97_info =3D { =20 static void vt82c686b_mc97_realize(PCIDevice *dev, Error **errp) { - VIAMC97State *s =3D VIA_MC97_DEVICE(dev); + VIAMC97State *s =3D VIA_MC97(dev); uint8_t *pci_conf =3D s->dev.config; =20 pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | @@ -318,7 +318,7 @@ void vt82c686b_mc97_init(PCIBus *bus, int devfn) { PCIDevice *dev; =20 - dev =3D pci_new(devfn, TYPE_VIA_MC97_DEVICE); + dev =3D pci_new(devfn, TYPE_VIA_MC97); pci_realize_and_unref(dev, bus, &error_fatal); } =20 @@ -337,7 +337,7 @@ static void via_mc97_class_init(ObjectClass *klass, voi= d *data) } =20 static const TypeInfo via_mc97_info =3D { - .name =3D TYPE_VIA_MC97_DEVICE, + .name =3D TYPE_VIA_MC97, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(VIAMC97State), .class_init =3D via_mc97_class_init, @@ -350,7 +350,7 @@ static const TypeInfo via_mc97_info =3D { /* vt82c686 pm init */ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp) { - VT686PMState *s =3D VT82C686B_PM_DEVICE(dev); + VT686PMState *s =3D VT82C686B_PM(dev); uint8_t *pci_conf; =20 pci_conf =3D s->dev.config; @@ -386,10 +386,10 @@ I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uin= t32_t smb_io_base, PCIDevice *dev; VT686PMState *s; =20 - dev =3D pci_new(devfn, TYPE_VT82C686B_PM_DEVICE); + dev =3D pci_new(devfn, TYPE_VT82C686B_PM); qdev_prop_set_uint32(&dev->qdev, "smb_io_base", smb_io_base); =20 - s =3D VT82C686B_PM_DEVICE(dev); + s =3D VT82C686B_PM(dev); =20 pci_realize_and_unref(dev, bus, &error_fatal); =20 @@ -419,7 +419,7 @@ static void via_pm_class_init(ObjectClass *klass, void = *data) } =20 static const TypeInfo via_pm_info =3D { - .name =3D TYPE_VT82C686B_PM_DEVICE, + .name =3D TYPE_VT82C686B_PM, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(VT686PMState), .class_init =3D via_pm_class_init, @@ -442,7 +442,7 @@ static const VMStateDescription vmstate_via =3D { /* init the PCI-to-ISA bridge */ static void vt82c686b_realize(PCIDevice *d, Error **errp) { - VT82C686BState *vt82c =3D VT82C686B_DEVICE(d); + VT82C686BState *vt82c =3D VT82C686B(d); uint8_t *pci_conf; ISABus *isa_bus; uint8_t *wmask; @@ -479,9 +479,7 @@ ISABus *vt82c686b_isa_init(PCIBus *bus, int devfn) { PCIDevice *d; =20 - d =3D pci_create_simple_multifunction(bus, devfn, true, - TYPE_VT82C686B_DEVICE); - + d =3D pci_create_simple_multifunction(bus, devfn, true, TYPE_VT82C686B= ); return ISA_BUS(qdev_get_child_bus(DEVICE(d), "isa.0")); } =20 @@ -507,7 +505,7 @@ static void via_class_init(ObjectClass *klass, void *da= ta) } =20 static const TypeInfo via_info =3D { - .name =3D TYPE_VT82C686B_DEVICE, + .name =3D TYPE_VT82C686B, .parent =3D TYPE_PCI_DEVICE, .instance_size =3D sizeof(VT82C686BState), .class_init =3D via_class_init, --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122428; cv=none; d=zohomail.com; s=zohoarc; b=Lw1mhbue5PD2VBpBlFRLFUJdVqspVDbKQ2jy7BqnZM6NEFlKtkZlvx6lSMmYybkM9xbbHwDcVciLLQKCE8Os67CJUx/Yq+4pqoU4QxK2q7/Y+D/X3KXA3jOgm9bY6m/jS/ldWioaa2SM/VccrRyHuTNsYNG+qoiNZ8d88ge6BWc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122428; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4wYoF2WcrDNw2uslNQNjkgp+chzz+N0b46uNgtCcmJA=; b=TOAJBoDwbG9PcMqu6AGrCFGmiWgKEDQeu9JdhBnP2mJ1sqKJuU3r4voMfq5qpRsbJ0l3gWR4AdcV9jnozUJT42qYZ12q7zL/tG56NlHuV2ukDiFevRTBqevrbEYG0iD/50GnOxkSU1F3J9fkHynkl03scp9O/zFX45fuGPsQDKo= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609122428744143.846671922709; Sun, 27 Dec 2020 18:27:08 -0800 (PST) Received: from localhost ([::1]:44682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiFX-0000p9-Fe for importer@patchew.org; Sun, 27 Dec 2020 21:27:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD1-0007SU-8d for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:31 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiCx-0003v8-7J for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:31 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id C5C367470F3; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 433277470E3; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: In-Reply-To: References: Subject: [PATCH v2 03/10] vt82c686b: Rename VT82C686B to VT82C686B_ISA Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" This is really the ISA bridge part so name the type accordingly. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/vt82c686.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 1be1169f83..d40599c7da 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -43,14 +43,14 @@ typedef struct SuperIOConfig { uint8_t data; } SuperIOConfig; =20 -struct VT82C686BState { +struct VT82C686BISAState { PCIDevice dev; MemoryRegion superio; SuperIOConfig superio_conf; }; =20 -#define TYPE_VT82C686B "VT82C686B" -OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BState, VT82C686B) +#define TYPE_VT82C686B_ISA "vt82c686b-isa" +OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BISAState, VT82C686B_ISA) =20 static void superio_ioport_writeb(void *opaque, hwaddr addr, uint64_t data, unsigned size) @@ -117,7 +117,7 @@ static const MemoryRegionOps superio_ops =3D { =20 static void vt82c686b_isa_reset(DeviceState *dev) { - VT82C686BState *vt82c =3D VT82C686B(dev); + VT82C686BISAState *vt82c =3D VT82C686B_ISA(dev); uint8_t *pci_conf =3D vt82c->dev.config; =20 pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); @@ -146,7 +146,7 @@ static void vt82c686b_isa_reset(DeviceState *dev) static void vt82c686b_write_config(PCIDevice *d, uint32_t address, uint32_t val, int len) { - VT82C686BState *vt686 =3D VT82C686B(d); + VT82C686BISAState *vt686 =3D VT82C686B_ISA(d); =20 DPRINTF("vt82c686b_write_config address 0x%x val 0x%x len 0x%x\n", address, val, len); @@ -434,7 +434,7 @@ static const VMStateDescription vmstate_via =3D { .version_id =3D 1, .minimum_version_id =3D 1, .fields =3D (VMStateField[]) { - VMSTATE_PCI_DEVICE(dev, VT82C686BState), + VMSTATE_PCI_DEVICE(dev, VT82C686BISAState), VMSTATE_END_OF_LIST() } }; @@ -442,7 +442,7 @@ static const VMStateDescription vmstate_via =3D { /* init the PCI-to-ISA bridge */ static void vt82c686b_realize(PCIDevice *d, Error **errp) { - VT82C686BState *vt82c =3D VT82C686B(d); + VT82C686BISAState *vt82c =3D VT82C686B_ISA(d); uint8_t *pci_conf; ISABus *isa_bus; uint8_t *wmask; @@ -479,7 +479,7 @@ ISABus *vt82c686b_isa_init(PCIBus *bus, int devfn) { PCIDevice *d; =20 - d =3D pci_create_simple_multifunction(bus, devfn, true, TYPE_VT82C686B= ); + d =3D pci_create_simple_multifunction(bus, devfn, true, TYPE_VT82C686B= _ISA); return ISA_BUS(qdev_get_child_bus(DEVICE(d), "isa.0")); } =20 @@ -505,9 +505,9 @@ static void via_class_init(ObjectClass *klass, void *da= ta) } =20 static const TypeInfo via_info =3D { - .name =3D TYPE_VT82C686B, + .name =3D TYPE_VT82C686B_ISA, .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(VT82C686BState), + .instance_size =3D sizeof(VT82C686BISAState), .class_init =3D via_class_init, .interfaces =3D (InterfaceInfo[]) { { INTERFACE_CONVENTIONAL_PCI_DEVICE }, --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122429; cv=none; d=zohomail.com; s=zohoarc; b=FU6Im1kH7cysYvaCqI9zTxl1WTHwsGCnQFR014jpEvK+FhFVLrs0iZonP0Mv20YNj+aBIgN3yeIxDVppXURZ5EZy0ScQyPpW5ZPexLZLq/KLkOztUD6Nsq7aL6JmmwNXvkjGwebv6gcuOG8DavVXAvzy/m6CmLjo+taGZ2bz7qA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122429; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=QciLAumsdjmX5xxVVjju9NhhzobDRc9VcfVwQZpm06Q=; b=hyaIsh4Th0sTIdHn2HAZip8QZnRxmPUBSiEAo4u3IX4AUQYfn2aO7vRvd95/VQ5S5zgSQv8i7vzL39EYR+62kQO94qkPTbFkzJKQcIMxKEvcOEQHBDdlNd3qcjnuAojk0WS+xoig/j78COy/wkJXsMKYRdMoYyTTFaeiP3ZUjhI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609122429508523.630460629661; Sun, 27 Dec 2020 18:27:09 -0800 (PST) Received: from localhost ([::1]:44660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiFX-0000oh-Pi for importer@patchew.org; Sun, 27 Dec 2020 21:27:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD0-0007SH-Rc for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:30 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57210) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiCx-0003v7-7N for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:30 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id EA4D17470F5; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 495097470DB; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <0df2885abd286feab5d8edf864afa65bf35c6f95.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 04/10] vt82c686: Remove vt82c686b_[am]c97_init() functions Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" These are legacy init functions that are just equivalent to directly calling pci_create_simple so do that instead. Also rename objects to lower case via-ac97 and via-mc97 matching naming of other devices. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/vt82c686.c | 27 ++++----------------------- hw/mips/fuloong2e.c | 4 ++-- include/hw/isa/vt82c686.h | 4 ++-- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index d40599c7da..8677a2d212 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -179,12 +179,6 @@ struct VIAMC97State { #define TYPE_VT82C686B_PM "VT82C686B_PM" OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM) =20 -#define TYPE_VIA_MC97 "VIA_MC97" -OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97) - -#define TYPE_VIA_AC97 "VIA_AC97" -OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97) - static void pm_update_sci(VT686PMState *s) { int sci_level, pmsts; @@ -254,10 +248,13 @@ static const VMStateDescription vmstate_acpi =3D { }; =20 /* - * TODO: vt82c686b_ac97_init() and vt82c686b_mc97_init() + * TODO: VIA_AC97 and VIA_MC97 * just register a PCI device now, functionalities will be implemented lat= er. */ =20 +OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97) +OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97) + static void vt82c686b_ac97_realize(PCIDevice *dev, Error **errp) { VIAAC97State *s =3D VIA_AC97(dev); @@ -270,14 +267,6 @@ static void vt82c686b_ac97_realize(PCIDevice *dev, Err= or **errp) pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03); } =20 -void vt82c686b_ac97_init(PCIBus *bus, int devfn) -{ - PCIDevice *dev; - - dev =3D pci_new(devfn, TYPE_VIA_AC97); - pci_realize_and_unref(dev, bus, &error_fatal); -} - static void via_ac97_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); @@ -314,14 +303,6 @@ static void vt82c686b_mc97_realize(PCIDevice *dev, Err= or **errp) pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03); } =20 -void vt82c686b_mc97_init(PCIBus *bus, int devfn) -{ - PCIDevice *dev; - - dev =3D pci_new(devfn, TYPE_VIA_MC97); - pci_realize_and_unref(dev, bus, &error_fatal); -} - static void via_mc97_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index f0733e87b7..3b0489f781 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -264,8 +264,8 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, *i2c_bus =3D vt82c686b_pm_init(pci_bus, PCI_DEVFN(slot, 4), 0xeee1, NU= LL); =20 /* Audio support */ - vt82c686b_ac97_init(pci_bus, PCI_DEVFN(slot, 5)); - vt82c686b_mc97_init(pci_bus, PCI_DEVFN(slot, 6)); + pci_create_simple(pci_bus, PCI_DEVFN(slot, 5), TYPE_VIA_AC97); + pci_create_simple(pci_bus, PCI_DEVFN(slot, 6), TYPE_VIA_MC97); } =20 /* Network support */ diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h index f23f45dfb1..ff80a926dc 100644 --- a/include/hw/isa/vt82c686.h +++ b/include/hw/isa/vt82c686.h @@ -3,11 +3,11 @@ =20 =20 #define TYPE_VT82C686B_SUPERIO "vt82c686b-superio" +#define TYPE_VIA_AC97 "via-ac97" +#define TYPE_VIA_MC97 "via-mc97" =20 /* vt82c686.c */ ISABus *vt82c686b_isa_init(PCIBus * bus, int devfn); -void vt82c686b_ac97_init(PCIBus *bus, int devfn); -void vt82c686b_mc97_init(PCIBus *bus, int devfn); I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, qemu_irq sci_irq); =20 --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122576; cv=none; d=zohomail.com; s=zohoarc; b=cb0kA++WV2E8PRykwVH9hg7kavV0UKyphqTSNsnzSdUCXcVRpDacxgEr3MFDYZWmYvHw9cWMMBI2Cdzx6RHrl/Q1JqYlXO8Fv2Mxv9e+GvWA1aavKpcoOLrDFoE5IFV+B4p+G8S1jNzR2utqUGx6v8kpkd4I0NBJylGbK/xZ+jw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122576; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=XR3rCClBnrz83vBe935XkhX8lRWO6uoBvRRDVM7Wzm4=; b=AvPq+bUzb2owCc7vbxI8BwsG+DzyB0C6abFHar6lpR8LtLqjMjMLBirVaIUekAKhnGck+8rW5YQeqGhw+ZV3InleNIOuJ1syU2cobG1+kBBciqvzwQLEsCDrpOmvH4B32euJvFXbwdjVzUO81Old3YJkMUrHzk11DXatjyiKF6M= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609122576668201.82990246762733; Sun, 27 Dec 2020 18:29:36 -0800 (PST) Received: from localhost ([::1]:53212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiHv-0004GB-VR for importer@patchew.org; Sun, 27 Dec 2020 21:29:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD9-0007b3-JF for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:39 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:57235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD2-0003xg-LK for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:39 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 617AE7470F6; Mon, 28 Dec 2020 03:24:31 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 500467470DF; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <76efd30b1c69505e4ed4c1e3d680f328b2734750.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 05/10] vt82c686: Split off via-[am]c97 into separate file in hw/audio Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via The via-[am]c97 code is supposed to implement the audio part of VIA south bridge chips so it is better placed under hw/audio/. Split it off into a separate file. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2: Reworded commit message hw/audio/meson.build | 1 + hw/audio/via-ac97.c | 106 +++++++++++++++++++++++++++++++++++++++++++ hw/isa/vt82c686.c | 91 ------------------------------------- 3 files changed, 107 insertions(+), 91 deletions(-) create mode 100644 hw/audio/via-ac97.c diff --git a/hw/audio/meson.build b/hw/audio/meson.build index 549e9a0396..32c42bdebe 100644 --- a/hw/audio/meson.build +++ b/hw/audio/meson.build @@ -11,4 +11,5 @@ softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('= milkymist-ac97.c')) softmmu_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c')) softmmu_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c')) softmmu_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c')) +softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('via-ac97.c')) softmmu_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c')) diff --git a/hw/audio/via-ac97.c b/hw/audio/via-ac97.c new file mode 100644 index 0000000000..e617416ff7 --- /dev/null +++ b/hw/audio/via-ac97.c @@ -0,0 +1,106 @@ +/* + * VIA south bridges sound support + * + * This work is licensed under the GNU GPL license version 2 or later. + */ + +/* + * TODO: This is entirely boiler plate just registering empty PCI devices + * with the right ID guests expect, functionality should be added here. + */ + +#include "qemu/osdep.h" +#include "hw/isa/vt82c686.h" +#include "hw/pci/pci.h" + +struct VIAAC97State { + PCIDevice dev; +}; + +struct VIAMC97State { + PCIDevice dev; +}; + +OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97) +OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97) + +static void via_ac97_realize(PCIDevice *dev, Error **errp) +{ + VIAAC97State *s =3D VIA_AC97(dev); + uint8_t *pci_conf =3D s->dev.config; + + pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | + PCI_COMMAND_PARITY); + pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_CAP_LIST | + PCI_STATUS_DEVSEL_MEDIUM); + pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03); +} + +static void via_ac97_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); + + k->realize =3D via_ac97_realize; + k->vendor_id =3D PCI_VENDOR_ID_VIA; + k->device_id =3D PCI_DEVICE_ID_VIA_AC97; + k->revision =3D 0x50; + k->class_id =3D PCI_CLASS_MULTIMEDIA_AUDIO; + set_bit(DEVICE_CATEGORY_SOUND, dc->categories); + dc->desc =3D "AC97"; +} + +static const TypeInfo via_ac97_info =3D { + .name =3D TYPE_VIA_AC97, + .parent =3D TYPE_PCI_DEVICE, + .instance_size =3D sizeof(VIAAC97State), + .class_init =3D via_ac97_class_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, +}; + +static void via_mc97_realize(PCIDevice *dev, Error **errp) +{ + VIAMC97State *s =3D VIA_MC97(dev); + uint8_t *pci_conf =3D s->dev.config; + + pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | + PCI_COMMAND_VGA_PALETTE); + pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_DEVSEL_MEDIUM); + pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03); +} + +static void via_mc97_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); + + k->realize =3D via_mc97_realize; + k->vendor_id =3D PCI_VENDOR_ID_VIA; + k->device_id =3D PCI_DEVICE_ID_VIA_MC97; + k->class_id =3D PCI_CLASS_COMMUNICATION_OTHER; + k->revision =3D 0x30; + set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); + dc->desc =3D "MC97"; +} + +static const TypeInfo via_mc97_info =3D { + .name =3D TYPE_VIA_MC97, + .parent =3D TYPE_PCI_DEVICE, + .instance_size =3D sizeof(VIAMC97State), + .class_init =3D via_mc97_class_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, +}; + +static void via_ac97_register_types(void) +{ + type_register_static(&via_ac97_info); + type_register_static(&via_mc97_info); +} + +type_init(via_ac97_register_types) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 8677a2d212..9567326d8e 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -168,14 +168,6 @@ struct VT686PMState { uint32_t smb_io_base; }; =20 -struct VIAAC97State { - PCIDevice dev; -}; - -struct VIAMC97State { - PCIDevice dev; -}; - #define TYPE_VT82C686B_PM "VT82C686B_PM" OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM) =20 @@ -247,87 +239,6 @@ static const VMStateDescription vmstate_acpi =3D { } }; =20 -/* - * TODO: VIA_AC97 and VIA_MC97 - * just register a PCI device now, functionalities will be implemented lat= er. - */ - -OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97) -OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97) - -static void vt82c686b_ac97_realize(PCIDevice *dev, Error **errp) -{ - VIAAC97State *s =3D VIA_AC97(dev); - uint8_t *pci_conf =3D s->dev.config; - - pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | - PCI_COMMAND_PARITY); - pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_CAP_LIST | - PCI_STATUS_DEVSEL_MEDIUM); - pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03); -} - -static void via_ac97_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc =3D DEVICE_CLASS(klass); - PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); - - k->realize =3D vt82c686b_ac97_realize; - k->vendor_id =3D PCI_VENDOR_ID_VIA; - k->device_id =3D PCI_DEVICE_ID_VIA_AC97; - k->revision =3D 0x50; - k->class_id =3D PCI_CLASS_MULTIMEDIA_AUDIO; - set_bit(DEVICE_CATEGORY_SOUND, dc->categories); - dc->desc =3D "AC97"; -} - -static const TypeInfo via_ac97_info =3D { - .name =3D TYPE_VIA_AC97, - .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(VIAAC97State), - .class_init =3D via_ac97_class_init, - .interfaces =3D (InterfaceInfo[]) { - { INTERFACE_CONVENTIONAL_PCI_DEVICE }, - { }, - }, -}; - -static void vt82c686b_mc97_realize(PCIDevice *dev, Error **errp) -{ - VIAMC97State *s =3D VIA_MC97(dev); - uint8_t *pci_conf =3D s->dev.config; - - pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | - PCI_COMMAND_VGA_PALETTE); - pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_DEVSEL_MEDIUM); - pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03); -} - -static void via_mc97_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc =3D DEVICE_CLASS(klass); - PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); - - k->realize =3D vt82c686b_mc97_realize; - k->vendor_id =3D PCI_VENDOR_ID_VIA; - k->device_id =3D PCI_DEVICE_ID_VIA_MC97; - k->class_id =3D PCI_CLASS_COMMUNICATION_OTHER; - k->revision =3D 0x30; - set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); - dc->desc =3D "MC97"; -} - -static const TypeInfo via_mc97_info =3D { - .name =3D TYPE_VIA_MC97, - .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(VIAMC97State), - .class_init =3D via_mc97_class_init, - .interfaces =3D (InterfaceInfo[]) { - { INTERFACE_CONVENTIONAL_PCI_DEVICE }, - { }, - }, -}; - /* vt82c686 pm init */ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp) { @@ -516,8 +427,6 @@ static const TypeInfo via_superio_info =3D { =20 static void vt82c686b_register_types(void) { - type_register_static(&via_ac97_info); - type_register_static(&via_mc97_info); type_register_static(&via_pm_info); type_register_static(&via_superio_info); type_register_static(&via_info); --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122785; cv=none; d=zohomail.com; s=zohoarc; b=GWHKz36Ymhw+uszFF62ivacWID7lFWhDQuAroZ2eweQvw4tXkyQ7St5MCIdpdUDKKvxVQraX1ywGmlRG3UhNIz/6e2vv6rVB+ll5SmeRuIvHZ4Ga5S8OUVqvuyMRcccDAnQsH8fYUJYR1gc73axQpWVgOKpHGV57LgmDpqATbKs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122785; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=fn5eY0xMEbbwnGNkKWU/Oo5wySVMIpMAnSVvRr7dcM0=; b=lyVukTf5mHcnpc8nCyn67eMRsV7qdIHoYhtywmvXwOOL5QALcQMRJp7QNKVaqoxxoMRbZsjpzY1R48q8J9dG4OTXakzUstO+6GeKqmvR4v3UolO3XKCsg3a2NSdTOSdt4nIGPqefQ/ttwBKXpzzD0JD+xpCccxBGzb16U3+Tvu0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609122785740255.9852856111138; Sun, 27 Dec 2020 18:33:05 -0800 (PST) Received: from localhost ([::1]:32786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiLI-0007aM-CS for importer@patchew.org; Sun, 27 Dec 2020 21:33:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD3-0007V0-6U for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:33 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD0-0003wS-DH for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:32 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 0FE237470DD; Mon, 28 Dec 2020 03:24:24 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 560257470E6; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <1ebc069cbab65386d01125f6b0997a88e560d582.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 06/10] audio/via-ac97: Simplify code and set user_creatable to false Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 9% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" Remove some unneded, empty code and set user_creatable to false (besides being not implemented yet, so does nothing anyway) it's also normally part of VIA south bridge chips so no need to confuse users showing them these devices. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/audio/via-ac97.c | 51 +++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/hw/audio/via-ac97.c b/hw/audio/via-ac97.c index e617416ff7..6d556f74fc 100644 --- a/hw/audio/via-ac97.c +++ b/hw/audio/via-ac97.c @@ -13,27 +13,13 @@ #include "hw/isa/vt82c686.h" #include "hw/pci/pci.h" =20 -struct VIAAC97State { - PCIDevice dev; -}; - -struct VIAMC97State { - PCIDevice dev; -}; - -OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97) -OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97) - -static void via_ac97_realize(PCIDevice *dev, Error **errp) +static void via_ac97_realize(PCIDevice *pci_dev, Error **errp) { - VIAAC97State *s =3D VIA_AC97(dev); - uint8_t *pci_conf =3D s->dev.config; - - pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | - PCI_COMMAND_PARITY); - pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_CAP_LIST | - PCI_STATUS_DEVSEL_MEDIUM); - pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03); + pci_set_word(pci_dev->config + PCI_COMMAND, + PCI_COMMAND_INVALIDATE | PCI_COMMAND_PARITY); + pci_set_word(pci_dev->config + PCI_STATUS, + PCI_STATUS_CAP_LIST | PCI_STATUS_DEVSEL_MEDIUM); + pci_set_long(pci_dev->config + PCI_INTERRUPT_PIN, 0x03); } =20 static void via_ac97_class_init(ObjectClass *klass, void *data) @@ -47,13 +33,15 @@ static void via_ac97_class_init(ObjectClass *klass, voi= d *data) k->revision =3D 0x50; k->class_id =3D PCI_CLASS_MULTIMEDIA_AUDIO; set_bit(DEVICE_CATEGORY_SOUND, dc->categories); - dc->desc =3D "AC97"; + dc->desc =3D "VIA AC97"; + /* Reason: Part of a south bridge chip */ + dc->user_creatable =3D false; } =20 static const TypeInfo via_ac97_info =3D { .name =3D TYPE_VIA_AC97, .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(VIAAC97State), + .instance_size =3D sizeof(PCIDevice), .class_init =3D via_ac97_class_init, .interfaces =3D (InterfaceInfo[]) { { INTERFACE_CONVENTIONAL_PCI_DEVICE }, @@ -61,15 +49,12 @@ static const TypeInfo via_ac97_info =3D { }, }; =20 -static void via_mc97_realize(PCIDevice *dev, Error **errp) +static void via_mc97_realize(PCIDevice *pci_dev, Error **errp) { - VIAMC97State *s =3D VIA_MC97(dev); - uint8_t *pci_conf =3D s->dev.config; - - pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_INVALIDATE | - PCI_COMMAND_VGA_PALETTE); - pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_DEVSEL_MEDIUM); - pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03); + pci_set_word(pci_dev->config + PCI_COMMAND, + PCI_COMMAND_INVALIDATE | PCI_COMMAND_VGA_PALETTE); + pci_set_word(pci_dev->config + PCI_STATUS, PCI_STATUS_DEVSEL_MEDIUM); + pci_set_long(pci_dev->config + PCI_INTERRUPT_PIN, 0x03); } =20 static void via_mc97_class_init(ObjectClass *klass, void *data) @@ -83,13 +68,15 @@ static void via_mc97_class_init(ObjectClass *klass, voi= d *data) k->class_id =3D PCI_CLASS_COMMUNICATION_OTHER; k->revision =3D 0x30; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); - dc->desc =3D "MC97"; + dc->desc =3D "VIA MC97"; + /* Reason: Part of a south bridge chip */ + dc->user_creatable =3D false; } =20 static const TypeInfo via_mc97_info =3D { .name =3D TYPE_VIA_MC97, .parent =3D TYPE_PCI_DEVICE, - .instance_size =3D sizeof(VIAMC97State), + .instance_size =3D sizeof(PCIDevice), .class_init =3D via_mc97_class_init, .interfaces =3D (InterfaceInfo[]) { { INTERFACE_CONVENTIONAL_PCI_DEVICE }, --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122576; cv=none; d=zohomail.com; s=zohoarc; b=CGxU05MBLCee1iuQKvGXL0lkpCpFwsFM8FfNCAyMV/5qI5bHUEGmDWGfDfsQeblPtLlRAF7mh9bo5UbH5ghXMkTYRLWhaXedxoRts9FX6kwrswGrPWpgmG+mpr9qeah2vyqIHjNTKzxoX6E+fa2DtuTAXXj1rSLq9KXPKPvBLMI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122576; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=FUjP3Hk4ubpwGf6zYbbblcV3jz4V+14n/bxp2ja1kUM=; b=I9xAotOGT1JKzGQk9Iq7YwSLeT0Ucjgn1yzpumr29s4PTRrDNNvRy3CBCcCPu7Sz2PeMkUBVnlMr+/W/vkWzMjG6rLcFIqaF4PlrBMfAtfrB/sQmIGYo+zu16/S8C+rUDWyUSAWIPICSqjnixWHoAdO3MsoWWe8fRhElHBliSE0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609122576970994.8390824276163; Sun, 27 Dec 2020 18:29:36 -0800 (PST) Received: from localhost ([::1]:53232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiHw-0004Gb-78 for importer@patchew.org; Sun, 27 Dec 2020 21:29:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD2-0007TA-BU for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:32 -0500 Received: from zero.eik.bme.hu ([2001:738:2001:2001::2001]:57230) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD0-0003wT-Dt for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:32 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 12CA77470E3; Mon, 28 Dec 2020 03:24:24 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 5C51C7470E8; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <8211f2903fe90d639f574403cdb764eb06b723f9.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 07/10] vt82c686: Remove legacy vt82c686b_isa_init() function Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:738:2001:2001::2001; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2: Reworded commit message hw/isa/vt82c686.c | 9 --------- hw/mips/fuloong2e.c | 4 +++- include/hw/isa/vt82c686.h | 3 +-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 9567326d8e..2912c253dc 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -49,7 +49,6 @@ struct VT82C686BISAState { SuperIOConfig superio_conf; }; =20 -#define TYPE_VT82C686B_ISA "vt82c686b-isa" OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BISAState, VT82C686B_ISA) =20 static void superio_ioport_writeb(void *opaque, hwaddr addr, uint64_t data, @@ -367,14 +366,6 @@ static void vt82c686b_realize(PCIDevice *d, Error **er= rp) &vt82c->superio); } =20 -ISABus *vt82c686b_isa_init(PCIBus *bus, int devfn) -{ - PCIDevice *d; - - d =3D pci_create_simple_multifunction(bus, devfn, true, TYPE_VT82C686B= _ISA); - return ISA_BUS(qdev_get_child_bus(DEVICE(d), "isa.0")); -} - static void via_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 3b0489f781..d123e34d9e 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -240,7 +240,9 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, ISABus *isa_bus; PCIDevice *dev; =20 - isa_bus =3D vt82c686b_isa_init(pci_bus, PCI_DEVFN(slot, 0)); + dev =3D pci_create_simple_multifunction(pci_bus, PCI_DEVFN(slot, 0), t= rue, + TYPE_VT82C686B_ISA); + isa_bus =3D ISA_BUS(qdev_get_child_bus(DEVICE(dev), "isa.0")); assert(isa_bus); *p_isa_bus =3D isa_bus; /* Interrupt controller */ diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h index ff80a926dc..8d2d276fe1 100644 --- a/include/hw/isa/vt82c686.h +++ b/include/hw/isa/vt82c686.h @@ -1,13 +1,12 @@ #ifndef HW_VT82C686_H #define HW_VT82C686_H =20 - +#define TYPE_VT82C686B_ISA "vt82c686b-isa" #define TYPE_VT82C686B_SUPERIO "vt82c686b-superio" #define TYPE_VIA_AC97 "via-ac97" #define TYPE_VIA_MC97 "via-mc97" =20 /* vt82c686.c */ -ISABus *vt82c686b_isa_init(PCIBus * bus, int devfn); I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, qemu_irq sci_irq); =20 --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122785; cv=none; d=zohomail.com; s=zohoarc; b=Mw/IGbtBnZd9jXolpI4o6rEWGrAjZK7kBmmvUGX86O3pwdpVbkjX3N+/LK3O5iJb9qfVExdrthWMMYFzCs/eG7hdQd6juNAAbFOB0CptANe4ZUi0a0TPCw9HKU/hzLtwyQQ0YZLyFUx8ObxO3X6VJYgX4NqhosvOu7cAO+eR6ns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122785; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=y8+HRYcYfXjQGhVnlH45p0mvWIKcMaaEl7P1y9Yi5gA=; b=MpsJOFyc1Lw29NQ7IDR5shM7P+6AkMPnMj17q1In9SVxO5F3y8vqQW7veEWNZwzfYh3GA0vTo0HlbsFEJ/cfZPb9ggEwH1MXR1smL6GTdhRYRZf/oprWwmPTq04GTwbofZCN2SSJ6+LTT69CC+c1FtLqaxp9tDifVSE296NVu7I= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609122785738934.4979654293602; Sun, 27 Dec 2020 18:33:05 -0800 (PST) Received: from localhost ([::1]:32798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiLI-0007ag-Io for importer@patchew.org; Sun, 27 Dec 2020 21:33:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD5-0007Zr-1t for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:39 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:57232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD2-0003xU-9a for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:34 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 2364D7470DB; Mon, 28 Dec 2020 03:24:24 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 625F87470ED; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <95cbca5085fd2063f606c1a06c85b63ae06996e6.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 08/10] vt82c686: Remove legacy vt82c686b_pm_init() function Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Remove legacy vt82c686b_pm_init() function and also rename VT82C686B_PM type name to match other device names. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2: Reworded commit message, delete i2c include here hw/isa/vt82c686.c | 18 ------------------ hw/mips/fuloong2e.c | 5 ++++- include/hw/isa/vt82c686.h | 5 +---- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 2912c253dc..cd87ec0103 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -12,7 +12,6 @@ =20 #include "qemu/osdep.h" #include "hw/isa/vt82c686.h" -#include "hw/i2c/i2c.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" #include "hw/isa/isa.h" @@ -167,7 +166,6 @@ struct VT686PMState { uint32_t smb_io_base; }; =20 -#define TYPE_VT82C686B_PM "VT82C686B_PM" OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM) =20 static void pm_update_sci(VT686PMState *s) @@ -271,22 +269,6 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error= **errp) acpi_pm1_cnt_init(&s->ar, &s->io, false, false, 2); } =20 -I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, - qemu_irq sci_irq) -{ - PCIDevice *dev; - VT686PMState *s; - - dev =3D pci_new(devfn, TYPE_VT82C686B_PM); - qdev_prop_set_uint32(&dev->qdev, "smb_io_base", smb_io_base); - - s =3D VT82C686B_PM(dev); - - pci_realize_and_unref(dev, bus, &error_fatal); - - return s->smb.smbus; -} - static Property via_pm_properties[] =3D { DEFINE_PROP_UINT32("smb_io_base", VT686PMState, smb_io_base, 0), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index d123e34d9e..a2b69a3a7a 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -263,7 +263,10 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus= , int slot, qemu_irq intc, pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci"); pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci"); =20 - *i2c_bus =3D vt82c686b_pm_init(pci_bus, PCI_DEVFN(slot, 4), 0xeee1, NU= LL); + dev =3D pci_new(PCI_DEVFN(slot, 4), TYPE_VT82C686B_PM); + qdev_prop_set_uint32(DEVICE(dev), "smb_io_base", 0xeee1); + pci_realize_and_unref(dev, pci_bus, &error_fatal); + *i2c_bus =3D I2C_BUS(qdev_get_child_bus(DEVICE(dev), "i2c")); =20 /* Audio support */ pci_create_simple(pci_bus, PCI_DEVFN(slot, 5), TYPE_VIA_AC97); diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h index 8d2d276fe1..5b0a1ffe72 100644 --- a/include/hw/isa/vt82c686.h +++ b/include/hw/isa/vt82c686.h @@ -3,11 +3,8 @@ =20 #define TYPE_VT82C686B_ISA "vt82c686b-isa" #define TYPE_VT82C686B_SUPERIO "vt82c686b-superio" +#define TYPE_VT82C686B_PM "vt82c686b-pm" #define TYPE_VIA_AC97 "via-ac97" #define TYPE_VIA_MC97 "via-mc97" =20 -/* vt82c686.c */ -I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base, - qemu_irq sci_irq); - #endif --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609125011; cv=none; d=zohomail.com; s=zohoarc; b=HPLIbmfNAr0j+24ByOOplckwPe0gZS8WdWQq78n0KweMLHTYUApz7NsVP8Y9MAoAKa7mJsQvwj+DKUf11Tg4HoQo0Jp7J30zIx8RwUYwReTPtoKfxTaciadgvv1J4iQ9V2R1s9WFZzrQUkH7qqUatppzULcnpYRPxa4xRZUsQ0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609125011; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=/NFYJgnBGzwfONJFrwE7kgRSlwiLCmJEjpDW761KUpc=; b=P3JtXqnQWFQtd6VSAIkNepaeWcwOGlwjD4H1Mu7h+QUgg8IIoDydq2MhrJqI28nqNh70s9bHnScxV8WYCAfT6amAvoJwW8VclBjMHYuETp7Ier+n4LkgUgLDPY6xwW4k0DYZRh45BanK4nhmy8xT5KAYLZXA5odgsXuO6n7rlUQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160912501121826.83210134832484; Sun, 27 Dec 2020 19:10:11 -0800 (PST) Received: from localhost ([::1]:36660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiNq-0000yS-20 for importer@patchew.org; Sun, 27 Dec 2020 21:35:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD4-0007ZJ-SK for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:34 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:57234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD2-0003xX-D6 for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:34 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 44FD27470E8; Mon, 28 Dec 2020 03:24:24 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 672347470EE; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <28d9455165261a9cfd2cc4a650b25f987e60295c.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 09/10] vt82c686: Convert debug printf to trace points Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" Drop DPRINTF and use trace functions instead. Two debug messages about unimplemented registers could be converted to qemu_log_mask() but in reality all registers are currently unimplemented (we just store and return values of writable regs but do nothing with them). As we already trace register access there's no need for additional debug messages so these are just removed and a comment is added as a reminder. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2: Extended commit message hw/isa/trace-events | 6 ++++++ hw/isa/vt82c686.c | 51 +++++++++++++-------------------------------- 2 files changed, 21 insertions(+), 36 deletions(-) diff --git a/hw/isa/trace-events b/hw/isa/trace-events index 3544c6213c..d267d3e652 100644 --- a/hw/isa/trace-events +++ b/hw/isa/trace-events @@ -13,3 +13,9 @@ pc87312_io_write(uint32_t addr, uint32_t val) "write addr= =3D0x%x val=3D0x%x" # apm.c apm_io_read(uint8_t addr, uint8_t val) "read addr=3D0x%x val=3D0x%02x" apm_io_write(uint8_t addr, uint8_t val) "write addr=3D0x%x val=3D0x%02x" + +# vt82c686.c +via_isa_write(uint32_t addr, uint32_t val, int len) "addr 0x%x val 0x%x le= n 0x%x" +via_pm_write(uint32_t addr, uint32_t val, int len) "addr 0x%x val 0x%x len= 0x%x" +via_superio_read(uint8_t addr, uint8_t val) "addr 0x%x val 0x%x" +via_superio_write(uint8_t addr, uint32_t val) "addr 0x%x val 0x%x" diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index cd87ec0103..d7ce15bf9f 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -27,14 +27,7 @@ #include "qemu/timer.h" #include "exec/address-spaces.h" #include "qom/object.h" - -/* #define DEBUG_VT82C686B */ - -#ifdef DEBUG_VT82C686B -#define DPRINTF(fmt, ...) fprintf(stderr, "%s: " fmt, __func__, ##__VA_ARG= S__) -#else -#define DPRINTF(fmt, ...) -#endif +#include "trace.h" =20 typedef struct SuperIOConfig { uint8_t config[0x100]; @@ -55,12 +48,12 @@ static void superio_ioport_writeb(void *opaque, hwaddr = addr, uint64_t data, { SuperIOConfig *superio_conf =3D opaque; =20 - DPRINTF("superio_ioport_writeb address 0x%x val 0x%x\n", addr, data); - if (addr =3D=3D 0x3f0) { + if (addr =3D=3D 0x3f0) { /* config index register */ superio_conf->index =3D data & 0xff; } else { bool can_write =3D true; - /* 0x3f1 */ + /* 0x3f1, config data register */ + trace_via_superio_write(superio_conf->index, data & 0xff); switch (superio_conf->index) { case 0x00 ... 0xdf: case 0xe4: @@ -73,18 +66,7 @@ static void superio_ioport_writeb(void *opaque, hwaddr a= ddr, uint64_t data, case 0xfd ... 0xff: can_write =3D false; break; - case 0xe7: - if ((data & 0xff) !=3D 0xfe) { - DPRINTF("change uart 1 base. unsupported yet\n"); - can_write =3D false; - } - break; - case 0xe8: - if ((data & 0xff) !=3D 0xbe) { - DPRINTF("change uart 2 base. unsupported yet\n"); - can_write =3D false; - } - break; + /* case 0xe6 ... 0xe8: Should set base port of parallel and serial= */ default: break; =20 @@ -98,9 +80,10 @@ static void superio_ioport_writeb(void *opaque, hwaddr a= ddr, uint64_t data, static uint64_t superio_ioport_readb(void *opaque, hwaddr addr, unsigned s= ize) { SuperIOConfig *superio_conf =3D opaque; + uint8_t val =3D superio_conf->config[superio_conf->index]; =20 - DPRINTF("superio_ioport_readb address 0x%x\n", addr); - return superio_conf->config[superio_conf->index]; + trace_via_superio_read(superio_conf->index, val); + return val; } =20 static const MemoryRegionOps superio_ops =3D { @@ -141,16 +124,14 @@ static void vt82c686b_isa_reset(DeviceState *dev) } =20 /* write config pci function0 registers. PCI-ISA bridge */ -static void vt82c686b_write_config(PCIDevice *d, uint32_t address, +static void vt82c686b_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int len) { VT82C686BISAState *vt686 =3D VT82C686B_ISA(d); =20 - DPRINTF("vt82c686b_write_config address 0x%x val 0x%x len 0x%x\n", - address, val, len); - - pci_default_write_config(d, address, val, len); - if (address =3D=3D 0x85) { /* enable or disable super IO configure */ + trace_via_isa_write(addr, val, len); + pci_default_write_config(d, addr, val, len); + if (addr =3D=3D 0x85) { /* enable or disable super IO configure */ memory_region_set_enabled(&vt686->superio, val & 0x2); } } @@ -203,12 +184,10 @@ static void pm_io_space_update(VT686PMState *s) memory_region_transaction_commit(); } =20 -static void pm_write_config(PCIDevice *d, - uint32_t address, uint32_t val, int len) +static void pm_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int= len) { - DPRINTF("pm_write_config address 0x%x val 0x%x len 0x%x\n", - address, val, len); - pci_default_write_config(d, address, val, len); + trace_via_pm_write(addr, val, len); + pci_default_write_config(d, addr, val, len); } =20 static int vmstate_acpi_post_load(void *opaque, int version_id) --=20 2.21.3 From nobody Tue Nov 18 07:45:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1609122575; cv=none; d=zohomail.com; s=zohoarc; b=UBRrfMvSgnO5TxMI4wvsbWaHwDGk93OPed3Z7nkKpclWOeEE5A+/iu8Un4SgQ/gmk/OIPMmgNHg8eIrqNEI7iQzfV5D4aOz7mpj0pF6rbxX+wv5l9veyRVBOZaQWA/ui+i9Finrj0vuJLF4q+1FkuABtcNGPE2ER5DuCNR2M9GY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609122575; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=SpD7XgiURWX8yxdFpgZJp8uKkd6ABFivoAyHD5+WGpg=; b=eUOpdDVtiE0uPC4ZjNXlw+ICVHPsoobtH/yoWQgP2oR5/AywhCgMv0TrAsfRRgLXV93M3j+8gX0VTzi7UYmrZ3hxKdnAi6iIlxtwxdPO/nzZiaHVpqoy1dbe+h3mdqqU/ZTbZucfgfHxR4kArJKEpVV/Br3BRupUoqZlx6DNRu0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609122575917643.7481282134376; Sun, 27 Dec 2020 18:29:35 -0800 (PST) Received: from localhost ([::1]:53104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktiHv-0004DY-2c for importer@patchew.org; Sun, 27 Dec 2020 21:29:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD4-0007X4-2N for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:34 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:57233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktiD2-0003xV-Dg for qemu-devel@nongnu.org; Sun, 27 Dec 2020 21:24:33 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 3A9387470E6; Mon, 28 Dec 2020 03:24:24 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 6C40A7470EF; Mon, 28 Dec 2020 03:24:23 +0100 (CET) Message-Id: <56a23e0638fb15b5bc4177a0bec836a7e000083c.1609121293.git.balaton@eik.bme.hu> In-Reply-To: References: Subject: [PATCH v2 10/10] vt82c686: Remove unneeded includes and defines Date: Mon, 28 Dec 2020 03:08:13 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: qemu-devel@nongnu.org X-Spam-Probability: 8% Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=152.66.115.2; envelope-from=balaton@eik.bme.hu; helo=zero.eik.bme.hu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Huacai Chen , f4bug@amsat.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: BALATON Zoltan From: BALATON Zoltan via Content-Type: text/plain; charset="utf-8" These are not used or not needed. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2: Added back a few that we get indirectly but keep it explicit hw/isa/vt82c686.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index d7ce15bf9f..02d6759c00 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -16,9 +16,7 @@ #include "hw/qdev-properties.h" #include "hw/isa/isa.h" #include "hw/isa/superio.h" -#include "hw/sysbus.h" #include "migration/vmstate.h" -#include "hw/mips/mips.h" #include "hw/isa/apm.h" #include "hw/acpi/acpi.h" #include "hw/i2c/pm_smbus.h" @@ -26,7 +24,6 @@ #include "qemu/module.h" #include "qemu/timer.h" #include "exec/address-spaces.h" -#include "qom/object.h" #include "trace.h" =20 typedef struct SuperIOConfig { @@ -136,8 +133,6 @@ static void vt82c686b_write_config(PCIDevice *d, uint32= _t addr, } } =20 -#define ACPI_DBG_IO_ADDR 0xb044 - struct VT686PMState { PCIDevice dev; MemoryRegion io; --=20 2.21.3