From nobody Sat Oct 25 08:57:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520285274711689.5571578879658; Mon, 5 Mar 2018 13:27:54 -0800 (PST) Received: from localhost ([::1]:51634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esxeD-0002xs-Q4 for importer@patchew.org; Mon, 05 Mar 2018 16:27:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esxWj-0004gG-PH for qemu-devel@nongnu.org; Mon, 05 Mar 2018 16:20:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esxWi-0001nU-Ly for qemu-devel@nongnu.org; Mon, 05 Mar 2018 16:20:09 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:52775) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esxWi-0001mw-CW for qemu-devel@nongnu.org; Mon, 05 Mar 2018 16:20:08 -0500 Received: by mail-wm0-x243.google.com with SMTP id t3so18728615wmc.2 for ; Mon, 05 Mar 2018 13:20:08 -0800 (PST) Received: from x1.local (ABayonne-654-1-79-224.w86-222.abo.wanadoo.fr. [86.222.222.224]) by smtp.gmail.com with ESMTPSA id g96sm12904808wrd.73.2018.03.05.13.20.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 13:20:06 -0800 (PST) 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=LaH9lS0Rh473ceQo0RVQSXSQ5r0vdjDcRsNCm7bJndM=; b=DUvyle5O62GrrTmOdxc/tlggQP3F9vUbPj7fMm7hmq9ozjudVcy1s5JKwRT3vhOq+V 7FvaOi5AuN1ffsd2hXWx34QaQiOM3WBWNkUJMv+x52XFumZR738AKBDky7oa2IVt2nxj CUweYJPBhIiTIAwkS74AXpBKftvRYcjKe6wk+wkK9OJCIWZxcPJdbcTBmA6Z67IJj25D WxE3slb+WyTPza/4H0w4okcVC+73GbBHnBAAuOsyaJ0Y7MOvv9PS19qJjkss5PXvgUWl S+EIEQDADEX4laiG2ZehqPsLWBarIsmFDtRi7pdx0dxmUTdUXAh96BZzgSXQZETJcLJf wbJA== 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=LaH9lS0Rh473ceQo0RVQSXSQ5r0vdjDcRsNCm7bJndM=; b=RAR7mexuTv9bsrOiyGIIG/cwVRjeQhOaHEJFVWoCpqTTXnfQ4bHaXx4kHxchZyw1Na YPVF5g3QBllcgG/HS7EqZ+6u4baKDiDkhNRbPa6M8ZlRjNTay/MbsLChSRE5KMpovSBo yRmsNHXYWXatOwBqFjv6jOiRnWVcovjcwrcdLNFWDQzmY1Boioj6xewlAs11r2rlpz5R xSbf1ejq9cwG04UC4GocKoXtW3dMViwzQmqczYoCs/GaO+EoQzYJb/dJyz7grfBQgPca proLrLSxcNPrFIwEDn23ejfAlXO0hdv3zuChg89avYo26wpdNFCZQN4uleOEuQHvIA/y 4Ikg== X-Gm-Message-State: AElRT7EkyVeR8XIuIlVlGdNMeiyXcypfWcW/xMLSgvZoy+tcv9wzlxjR JjF3Vcc08HySO/v9gaMF/F0= X-Google-Smtp-Source: AG47ELtKknCt1X2ysoc86jHrnhgRx2ZLEFLRB9nDjyAo/mLPfiY/voIDSSjI3QH97W9yZQXN8MsjmA== X-Received: by 10.28.40.195 with SMTP id o186mr8962426wmo.134.1520284807428; Mon, 05 Mar 2018 13:20:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: "Michael S . Tsirkin" , Paolo Bonzini , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Aurelien Jarno , Mark Cave-Ayland , Alexey Kardashevskiy , Thomas Huth Date: Mon, 5 Mar 2018 18:19:24 -0300 Message-Id: <20180305211928.466-19-f4bug@amsat.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180305211928.466-1-f4bug@amsat.org> References: <20180305211928.466-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [RFC PATCH v2 18/22] hw/isa/vt82c686: Add the TYPE_VT82C686B_SUPERIO 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 , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Guan Xuetao , Yongbok Kim , Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/isa/vt82c686.h | 2 ++ hw/isa/vt82c686.c | 20 ++++++++++++++++++++ hw/mips/mips_fulong2e.c | 15 +++------------ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h index db97c8ed7a..c3c2b6e786 100644 --- a/include/hw/isa/vt82c686.h +++ b/include/hw/isa/vt82c686.h @@ -1,6 +1,8 @@ #ifndef HW_VT82C686_H #define HW_VT82C686_H =20 +#define TYPE_VT82C686B_SUPERIO "vt82c686b-superio" + /* vt82c686.c */ ISABus *vt82c686b_isa_init(PCIBus * bus, int devfn); void vt82c686b_ac97_init(PCIBus *bus, int devfn); diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 7eaf3c7e8f..cff1946232 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -17,6 +17,7 @@ #include "hw/i2c/smbus.h" #include "hw/pci/pci.h" #include "hw/isa/isa.h" +#include "hw/isa/superio.h" #include "hw/sysbus.h" #include "hw/mips/mips.h" #include "hw/isa/apm.h" @@ -519,11 +520,30 @@ static const TypeInfo via_info =3D { }, }; =20 +static void vt82c686b_superio_class_init(ObjectClass *klass, void *data) +{ + ISASuperIOClass *sc =3D ISA_SUPERIO_CLASS(klass); + + sc->serial.count =3D 2; + sc->parallel.count =3D 1; + sc->ide.count =3D 0; + sc->floppy.count =3D 1; +} + +static const TypeInfo via_superio_info =3D { + .name =3D TYPE_VT82C686B_SUPERIO, + .parent =3D TYPE_ISA_SUPERIO, + .instance_size =3D sizeof(ISASuperIODevice), + .class_size =3D sizeof(ISASuperIOClass), + .class_init =3D vt82c686b_superio_class_init, +}; + 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 diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 9ebc225d3b..d608f17e1e 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -23,9 +23,7 @@ #include "hw/hw.h" #include "hw/i386/pc.h" #include "hw/dma/i8257.h" -#include "hw/char/serial.h" -#include "hw/char/parallel.h" -#include "hw/block/fdc.h" +#include "hw/isa/superio.h" #include "net/net.h" #include "hw/boards.h" #include "hw/i2c/smbus.h" @@ -34,7 +32,6 @@ #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" #include "hw/pci/pci.h" -#include "sysemu/sysemu.h" #include "audio/audio.h" #include "qemu/log.h" #include "hw/loader.h" @@ -44,8 +41,6 @@ #include "hw/isa/vt82c686.h" #include "hw/timer/mc146818rtc.h" #include "hw/timer/i8254.h" -#include "hw/input/i8042.h" -#include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h" #include "qemu/error-report.h" @@ -250,6 +245,8 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, /* init other devices */ i8254_pit_init(isa_bus, 0x40, 0, NULL); i8257_dma_init(isa_bus, 0); + /* Super I/O */ + isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO); =20 ide_drive_get(hd, ARRAY_SIZE(hd)); vt82c686b_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1)); @@ -262,12 +259,6 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus= , int slot, qemu_irq intc, /* Audio support */ vt82c686b_ac97_init(pci_bus, PCI_DEVFN(slot, 5)); vt82c686b_mc97_init(pci_bus, PCI_DEVFN(slot, 6)); - - /* Super I/O */ - isa_create_simple(isa_bus, TYPE_I8042); - - serial_hds_isa_init(isa_bus, 0, MAX_SERIAL_PORTS); - parallel_hds_isa_init(isa_bus, 1); } =20 /* Network support */ --=20 2.16.2