From nobody Tue Nov 26 14:26:25 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1707304590; cv=none; d=zohomail.com; s=zohoarc; b=fCulnG5E1AjVh9Wz0IJ4HRFS5eD5igTddxIYmuLvPt7Dr+mqsKekTJKYrVbR9fFe+DRY1Jnrz4CQJjm42XzKjvEVNC0mp8jkmHxK5yKdD7Cy4STMcVETcGWE47gwggYW62ZEbg8hca0LuiKw3RFti9jtpARDmNiUM+iXUh+kG3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707304590; 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=GKhWTRg2zOTnE9OJbj6ui0Mke5/Ni7WWZc/qd5ynn60=; b=OKyNgBIXJTWEUadK8Zngn/tg3oyzDixFdC230qWl/pwZwhFwIw0FuWcrNumeQ/tCuvcBFbybACnBviI10i1H5o3og6PA6MhWn0C4LGCzmViIAZKG2T8xRt4SkNJFuXUjWfSMxum37QPb5ZvTJOn4v5ywch9jYaqAKjdUoRWY+RM= 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 1707304590809751.638493175025; Wed, 7 Feb 2024 03:16:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXfsx-0002st-JW; Wed, 07 Feb 2024 06:14:35 -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 1rXfsu-0002sP-OC for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXfst-0003RA-26 for qemu-devel@nongnu.org; Wed, 07 Feb 2024 06:14:32 -0500 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-688-CGPTnnidMXOkfEWc-m0wxw-1; Wed, 07 Feb 2024 06:14:29 -0500 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5605a2937d4so234418a12.1 for ; Wed, 07 Feb 2024 03:14:29 -0800 (PST) Received: from [192.168.10.118] ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id n5-20020a056402434500b00560c43b48f4sm546040edc.10.2024.02.07.03.14.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 03:14:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707304470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GKhWTRg2zOTnE9OJbj6ui0Mke5/Ni7WWZc/qd5ynn60=; b=Xzv1cdSE3dlxEqLNnChzI+hx5Cu/jeKin4WYqx8bNYgzNNWZX2+iqOKiiiLvwCvHqC6BfK ZZYmJX/jnMzYdxP17nwA8yrM6VMjgwYlSHA3261c30tADXQUi4161cEaZpFcRGu7MxCtaM 0ZRg0Y8rSpl/SUI8/iHnQiAVqD6/hPw= X-MC-Unique: CGPTnnidMXOkfEWc-m0wxw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707304467; x=1707909267; 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=GKhWTRg2zOTnE9OJbj6ui0Mke5/Ni7WWZc/qd5ynn60=; b=DcR+soM64FRLgZ6Kv+9Wuf8YLpIHHosMOKi983irQf5UxmmmglA1xV9vRzNY3DueEK ELuoj0Boq1iz3cpvfoKkoY1Qbs50JjL5pUmj9roiuoqdhT4V5ujKKZKMxSymvOgphiUR VmZwwy2NrxqbxfDAATS95c9Oc6sRnqW8CeWyhQRhN6j/4Rz4ILAZYx4J+c0qBninwX0r TI5mQ/SzY36u4PpTTMfne1FH6GqJdqkD9BuBRjwq4wNzO4avB4ym1FHBXN38om/6qNhl 220fTus4v0dYlykIDScpYdIOuGkwGWqruwKpyruXwsFKgJujOZNgZk7T4Bqt5oI7OkFP gwfg== X-Gm-Message-State: AOJu0Ywf75lo5xKHuCT4SijPrb/0fveAAO23uKcGAx2JO36ctcM7be6b v6g46qXBuu5eq6KftLcznrTuwrHWffG/wsVWS6jxT37CSoybRLS/PEKKVK1o/zrglMdWLB2ZPZU p5faFnIK//GfuaDqj7Ew7WQlHtlZNi40l6cmAjlFxdpN+soITRM3y9wp1KbgUxg9881LvppG3hl C7yS0JJ9R6fClknGyHe6aNriv3kkIgYHVdSzsr X-Received: by 2002:a05:6402:2297:b0:560:b758:5e24 with SMTP id cw23-20020a056402229700b00560b7585e24mr2980366edb.0.1707304467518; Wed, 07 Feb 2024 03:14:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8IcOc8ktNPSWavxQV3k/ItXtVp8TenHKbGlepN8a3z5faXGerVWdFHe1t//5ieEsliIiVdA== X-Received: by 2002:a05:6402:2297:b0:560:b758:5e24 with SMTP id cw23-20020a056402229700b00560b7585e24mr2980346edb.0.1707304467101; Wed, 07 Feb 2024 03:14:27 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUGWHS+AAV42q0UVzGmb8Hc+l9XNiGGmf2jBpzMYkkbqNZmNkLBtJtJZ7d0Nl6Y1dNFzMZ00p49FCzqMVAyOr9doQ== From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: shentey@gmail.com, philmd@linaro.org Subject: [PATCH v2 6/8] isa: extract FDC37M81X to a separate file Date: Wed, 7 Feb 2024 12:14:08 +0100 Message-ID: <20240207111411.115040-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207111411.115040-1-pbonzini@redhat.com> References: <20240207111411.115040-1-pbonzini@redhat.com> 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=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.294, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 @redhat.com) X-ZM-MESSAGEID: 1707304591927100003 isa-superio.c currently defines a SuperIO chip that is not used by any other user of the faile. Extract the chip to a separate file. Signed-off-by: Paolo Bonzini Reviewed-by: Bernhard Beschow --- 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 +- 5 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 hw/isa/fdc37m81x-superio.c diff --git a/hw/isa/fdc37m81x-superio.c b/hw/isa/fdc37m81x-superio.c new file mode 100644 index 00000000000..55e91fbca17 --- /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 98d50844f71..a8c8c58ef7f 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -190,27 +190,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 5df3c09cd51..73c6470805c 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 2ab99ce0c6b..f650b395071 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 afcfb2b8eca..e57db4f6412 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.43.0