From nobody Fri Nov 1 07:28:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708020480; cv=none; d=zohomail.com; s=zohoarc; b=mFLjQvPx6lodROVt3SO/h4NAraJpNuWqPpP7pIe+aLvXb/58cXUQDmQaKFF8MarQV+7FvsQYE5S6vuBVX9ExyTsoYuWnUsdrOg6SVlinfwuaOZ+GPudfkVbG4awPm8G129JLT56YBlpXm4g0k8+60A50sYn08pM67izsbzahyMA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708020480; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=M0JMLTzOASp2LTXmqUnI4wsUaudt2sBVolvQqLJvM14=; b=T4el6szz6aejypcJSG53k5K3kGyq2/mXpTco7+wr2KrJti5bHHG2cTEP34Y5Dd8Z6ypAGWmGHgSCrj6ENNbi2VNCoK072DUcPTX04I4eImTFj7ajFzdsuI5qGKPYI5dfy7hDBmbt+gGxCqEmsi1X0YZwK6l+FcY3fyf7cn45QVY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708020480766120.51614928831725; Thu, 15 Feb 2024 10:08:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rag1m-0007B5-Ud; Thu, 15 Feb 2024 13:00:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rag1k-00071y-Bs for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:04 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag1h-0001un-J3 for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:00:03 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-411d3c75026so9349195e9.0 for ; Thu, 15 Feb 2024 10:00:00 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id k2-20020adff282000000b0033b8808355fsm2427810wro.28.2024.02.15.09.59.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 09:59:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708019999; x=1708624799; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M0JMLTzOASp2LTXmqUnI4wsUaudt2sBVolvQqLJvM14=; b=jSGPEJYFXQXuoE8+uoZaEdxJEMWYzAwLV17uIA0JOCVXIZ4vxQykpXCbZmZwvm7pKC 7I3YOm43dG9cHfzU/pbJbDTB8GmwLsIawO6OODp6c94g9m5VEEwh+adTOnv3gDybchuf uUaaVo/8FTfa6AkNxQO/pcjlkBXBjReCDU6FqCTzJ8H0eqYHJYXWojzupo2whBXSUKUn 2DArFN7dlJ3Xxxeajzfz3GpkeklPEtHs0WTwbchCP71bgeRQ1ir9d2EeW8gmnAvC+8Nc hTbaidSaahl6ReT1IgLSbwBJ6mVdQP0FZtKoYBS7cAUz5NToOwgRg/4gO4HwWCrtC5kW tI/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708019999; x=1708624799; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M0JMLTzOASp2LTXmqUnI4wsUaudt2sBVolvQqLJvM14=; b=oiK4RmWS5oNpHuqE4/mA95N7MBpVuyaMM8k16kzt1WLlgz0Ix8jcupK7vdKyF/d254 1U6TfcytapphFlFkjzFaitL946V/PdHPufmpdxLkqgVmC+P1/wJg8+Q+ZexcnHycPSPF LdV/MyHAupTlZWvbxnAeT7oFRURwRxxXOw+T4BtqYRpj+a4+J6JLYxvOg97/7I+iUN47 SJhp7apFcfoKmtFindpinsLt/tnPozeN+oup5pttthU3kwbYu97T+kvSiD1NpXpabxET AFiIWolU3xOtv1P4vYvXULB9LHjaymMWiiYlIGS55cUlGXKjJuNBcyQSWpZAr+htY9m/ jnuw== X-Gm-Message-State: AOJu0Yz/NT1DbiW0vA03+a1sdVfwN05MVutYYkx53zoxYhjap/L6P9r8 PSu1YeodDcowwOUnLII+c5SlMZBoPT0/p9nSr5E9Uv7oE5P/xueZIVvnpy4xIinb99GeY53Lf+v T9Xk= X-Google-Smtp-Source: AGHT+IEaWcGRb9ukFzPkT3oA6f1sKO1XMNb3NfWMLKvBO8tFFPKsCzeT/t52oMWK+PiJvro4r9u65A== X-Received: by 2002:a05:600c:218:b0:411:e27d:522e with SMTP id 24-20020a05600c021800b00411e27d522emr1957903wmi.33.1708019999176; Thu, 15 Feb 2024 09:59:59 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, Paolo Bonzini , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , "Michael S. Tsirkin" Subject: [PULL 19/56] hw/isa: extract FDC37M81X to a separate file Date: Thu, 15 Feb 2024 18:57:13 +0100 Message-ID: <20240215175752.82828-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1708020481688100002 From: Paolo Bonzini isa-superio.c currently defines a SuperIO chip that is not used by any other user of the file. Extract the chip to a separate file. Reviewed-by: Bernhard Beschow Signed-off-by: Paolo Bonzini Message-ID: <20240213155005.109954-7-pbonzini@redhat.com> [PMD: Update MAINTAINERS] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + hw/isa/fdc37m81x-superio.c | 32 ++++++++++++++++++++++++++++++++ hw/isa/isa-superio.c | 18 ------------------ hw/isa/Kconfig | 4 ++++ hw/isa/meson.build | 1 + hw/mips/Kconfig | 2 +- 6 files changed, 39 insertions(+), 19 deletions(-) create mode 100644 hw/isa/fdc37m81x-superio.c diff --git a/MAINTAINERS b/MAINTAINERS index a24c2b51b6..8920ba403d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1357,6 +1357,7 @@ M: Philippe Mathieu-Daud=C3=A9 R: Aurelien Jarno S: Odd Fixes F: hw/isa/piix.c +F: hw/isa/fdc37m81x-superio.c F: hw/acpi/piix4.c F: hw/mips/malta.c F: hw/pci-host/gt64120.c diff --git a/hw/isa/fdc37m81x-superio.c b/hw/isa/fdc37m81x-superio.c new file mode 100644 index 0000000000..55e91fbca1 --- /dev/null +++ b/hw/isa/fdc37m81x-superio.c @@ -0,0 +1,32 @@ +/* + * SMS FDC37M817 Super I/O + * + * Copyright (c) 2018 Philippe Mathieu-Daud=C3=A9 + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "hw/isa/superio.h" + +static void fdc37m81x_class_init(ObjectClass *klass, void *data) +{ + ISASuperIOClass *sc =3D ISA_SUPERIO_CLASS(klass); + + sc->serial.count =3D 2; /* NS16C550A */ + sc->parallel.count =3D 1; + sc->floppy.count =3D 1; /* SMSC 82077AA Compatible */ + sc->ide.count =3D 0; +} + +static const TypeInfo types[] =3D { + { + .name =3D TYPE_FDC37M81X_SUPERIO, + .parent =3D TYPE_ISA_SUPERIO, + .class_init =3D fdc37m81x_class_init, + }, +}; + +DEFINE_TYPES(types) diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index d85f22db1a..ad9cd129af 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -188,27 +188,9 @@ static const TypeInfo isa_superio_type_info =3D { .instance_size =3D sizeof(ISASuperIODevice), }; =20 -/* SMS FDC37M817 Super I/O */ -static void fdc37m81x_class_init(ObjectClass *klass, void *data) -{ - ISASuperIOClass *sc =3D ISA_SUPERIO_CLASS(klass); - - sc->serial.count =3D 2; /* NS16C550A */ - sc->parallel.count =3D 1; - sc->floppy.count =3D 1; /* SMSC 82077AA Compatible */ - sc->ide.count =3D 0; -} - -static const TypeInfo fdc37m81x_type_info =3D { - .name =3D TYPE_FDC37M81X_SUPERIO, - .parent =3D TYPE_ISA_SUPERIO, - .class_init =3D fdc37m81x_class_init, -}; - static void isa_superio_register_types(void) { type_register_static(&isa_superio_type_info); - type_register_static(&fdc37m81x_type_info); } =20 type_init(isa_superio_register_types) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index 5df3c09cd5..73c6470805 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -23,6 +23,10 @@ config ISA_SUPERIO # Some users of ISA_SUPERIO do not use it #select IDE_ISA =20 +config FDC37M81X + bool + select ISA_SUPERIO + config PC87312 bool select ISA_SUPERIO diff --git a/hw/isa/meson.build b/hw/isa/meson.build index 2ab99ce0c6..f650b39507 100644 --- a/hw/isa/meson.build +++ b/hw/isa/meson.build @@ -4,6 +4,7 @@ system_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('isa-b= us.c')) system_ss.add(when: 'CONFIG_ISA_SUPERIO', if_true: files('isa-superio.c')) system_ss.add(when: 'CONFIG_PC87312', if_true: files('pc87312.c')) system_ss.add(when: 'CONFIG_PIIX', if_true: files('piix.c')) +system_ss.add(when: 'CONFIG_FDC37M81X', if_true: files('fdc37m81x-superio.= c')) system_ss.add(when: 'CONFIG_SMC37C669', if_true: files('smc37c669-superio.= c')) system_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686.c')) =20 diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index afcfb2b8ec..e57db4f641 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -1,7 +1,7 @@ config MALTA bool + select FDC37M81X select GT64120 - select ISA_SUPERIO select PIIX =20 config MIPSSIM --=20 2.41.0