From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783649; cv=none; d=zohomail.com; s=zohoarc; b=cDi5v7dRgnsUwdMwS/JmaIfOPiNZzGrEcrVkAgSON1GmBdnPcZIeC0pUdRk5+amT/H9ifvVILO++Kpn2LAuk5/qI42PXckaxY39/3iCdoY/nLKuckatDSMfstWLCS5FD0xLeOEVODh/rVNcrZq6UesaFGeb8j2HIaxatFlDqdto= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783649; 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=RwQQORSoHbpxB3+b3+LMm34qhoW6a91fGHA0i5e1pSQ=; b=WaJ5iSrusi+jATSB72VUprRl62exqKIsGnY+SQ0v0hdkiOx30udms6hE6rYLMqqoLne/Pix0uTdQSmjl5oo8DWoFDBaVvJ7xbLeMAvEA3MV/pGXsqClAl+00DiffM7xEY8lCmHZJ0wC87fJyVRlalZLXB4/7c26rJ6+MLzSND8A= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783649451507.4111524951479; Tue, 26 May 2026 01:20:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0D-0005BZ-Us; Tue, 26 May 2026 04:19:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0A-0005Ac-4J for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn07-0007Sj-B4 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:01 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-269-q1g6V6_xM86es_hlM6jPpQ-1; Tue, 26 May 2026 04:18:56 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 082D118002DC; Tue, 26 May 2026 08:18:55 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4DCAC1800267; Tue, 26 May 2026 08:18:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783538; 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=RwQQORSoHbpxB3+b3+LMm34qhoW6a91fGHA0i5e1pSQ=; b=dvHq3FEmWopTJpFOWsPn/basgjxoFfzFC4cJvZKcH1gHtK7o7pajwHIE5dFedx+gKS/ez/ UxI0BLbVN8Odj2bQagr9jaDHtmAEdtbHwxxUFyIMShVEmJrFA7jRbRJdnDWDUFqBpDdHU+ rxBdXDD7qHj2Ag8Nx/SdGhWIrmmIeik= X-MC-Unique: q1g6V6_xM86es_hlM6jPpQ-1 X-Mimecast-MFC-AGG-ID: q1g6V6_xM86es_hlM6jPpQ_1779783535 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Jamin Lin Subject: [PULL 01/37] hw/misc/aspeed_scu: Fix AST2600_RNG definitions Date: Tue, 26 May 2026 10:18:12 +0200 Message-ID: <20260526081848.651835-2-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779783651811154100 Commit e09cf36321f6 ("hw: aspeed_scu: Add AST2600 support") introduced a typo on the definitions of the Random Number Generator registers. Fix that. The implementation of RNG_CTRL and RNG_DATA should be rechecked on HW since the QEMU implementation always generates random data, regardless of RNG_CTRL. A comment in aspeed_ast2600_scu_read() admits uncertainty about the behavior : /* * On hardware, RNG_DATA works regardless of the state of the * enable bit in RNG_CTRL * * TODO: Check this is true for ast2600 */ Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/2350 Fixes: e09cf36321f6 ("hw: aspeed_scu: Add AST2600 support") Reviewed-by: Jamin Lin Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_scu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index e4160356e443..9d9f43e6b563 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -128,8 +128,8 @@ #define AST2600_HW_STRAP2 TO_REG(0x510) #define AST2600_HW_STRAP2_CLR TO_REG(0x514) #define AST2600_HW_STRAP2_PROT TO_REG(0x518) -#define AST2600_RNG_CTRL TO_REG(0x524) -#define AST2600_RNG_DATA TO_REG(0x540) +#define AST2600_RNG_CTRL TO_REG(0x520) +#define AST2600_RNG_DATA TO_REG(0x524) #define AST2600_CHIP_ID0 TO_REG(0x5B0) #define AST2600_CHIP_ID1 TO_REG(0x5B4) =20 --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783791; cv=none; d=zohomail.com; s=zohoarc; b=nqXIt4hdtqK6EtQoCWNQ4GZoFX1LA4VcSIqpLbBiDByAxNBePg1IT++FJIiokuFbBsqdiSIjOHIJqdBJ22cFQmIUcw/eGhBMGeG8KWdlJvY8icXI2fwz/dam+tyOtarcEgvN3xHyM2UECxKn1uh6vG3WBJxbLvto66LVP1ruO4w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783791; 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=AOIh9+j8SX6nATu4YMNyspTFt1ElE2GFmG4S309qu7k=; b=e0RKD9kYZTWAQ9jGW8KxPXDek3Xn1d0ZDnZY8uxBsLXmdjiZL6gswLiKZ+YwpoT6WBmQ99w9wBo/CVAYhYtUlLnwdRfTx/0LSOIhpMkxQhUgr6wT5IXTIOUml8K5NGWFf6EVAeXV710Pj8PLK2mVF66SKhb7lXEmTJMLle/lYNU= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783791837665.3674041622311; Tue, 26 May 2026 01:23:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0H-0005DX-8v; Tue, 26 May 2026 04:19:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0F-0005CH-F5 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:07 -0400 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 1wRn0C-0007XN-KS for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:07 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-106-X4TZW7T1PGCrKJEV5tpyug-1; Tue, 26 May 2026 04:19:00 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 59B091956094; Tue, 26 May 2026 08:18:57 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7A580180056E; Tue, 26 May 2026 08:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783543; 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=AOIh9+j8SX6nATu4YMNyspTFt1ElE2GFmG4S309qu7k=; b=VY60ex7fPHgNWnAuv9oV18E1n1WcTxlL26wC1+ICE15+/AsOKIOqfLYqI01fHw0Mqzs8fp IEf+zgcqsgw9rMtsw8H8TQ1K4aDZYKNSWLy7wXPOQ5DrmDgGLqcLQI5KrATWrShdfVZNdu 5yf0B7VI7ycs4zMd7IoHYHv9w4mmbEk= X-MC-Unique: X4TZW7T1PGCrKJEV5tpyug-1 X-Mimecast-MFC-AGG-ID: X4TZW7T1PGCrKJEV5tpyug_1779783537 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 02/37] tests/functional/arm/test_aspeed_ast2600_sdk: Add USB EHCI test for AST2600 SDK Date: Tue, 26 May 2026 10:18:13 +0200 Message-ID: <20260526081848.651835-3-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783793876154100 From: Jamin Lin Add a functional test to verify USB EHCI support on the AST2600 SDK machine by attaching a USB keyboard device and checking its enumeration via lsusb. This introduces a helper routine that runs lsusb in the guest and validates that the emulated "QEMU USB Keyboard" is detected. Signed-off-by: Jamin Lin Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/20260504025342.1452605-2-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- tests/functional/arm/test_aspeed_ast2600_sdk.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/functional/arm/test_aspeed_ast2600_sdk.py b/tests/functi= onal/arm/test_aspeed_ast2600_sdk.py index d787e90d1024..01548dd1354d 100755 --- a/tests/functional/arm/test_aspeed_ast2600_sdk.py +++ b/tests/functional/arm/test_aspeed_ast2600_sdk.py @@ -40,6 +40,11 @@ def do_ast2600_i3c_test(self): 'i3ctransfer -d /dev/bus/i3c/5-1234567890ab -r 8 | grep 0x | x= args', '0x12 0x34 0x56 0x78 0x90 0xab 0xcd 0xef') =20 + def do_ast2600_usb_ehci_test(self): + exec_command_and_wait_for_pattern(self, + 'lsusb', + 'QEMU QEMU USB Keyboard') + def test_arm_ast2600_evb_sdk(self): self.set_machine('ast2600-evb') self.require_netdev('user') @@ -54,6 +59,7 @@ def test_arm_ast2600_evb_sdk(self): self.vm.add_args('-netdev', 'user,id=3Dnet1') self.vm.add_args('-device', 'mock-i3c-target,bus=3Ddw.i3c.5,pid=3D0xab9078563412') + self.vm.add_args('-device', 'usb-kbd,bus=3Dusb-bus.1') self.do_test_arm_aspeed_sdk_start( self.scratch_file("ast2600-default-image", "image-bmc")) =20 @@ -81,6 +87,7 @@ def test_arm_ast2600_evb_sdk(self): '/sbin/hwclock -f /dev/rtc1', year) self.do_ast2600_pcie_test() self.do_ast2600_i3c_test() + self.do_ast2600_usb_ehci_test() =20 =20 if __name__ =3D=3D '__main__': --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783603; cv=none; d=zohomail.com; s=zohoarc; b=WcTcm4bU/H0zEkDlbJdvFAnXOCcWVOKUOISZnxEQa39KPRMiAOi+Ieyq+Gd39dmxU4ionSPldpx+w7M7bcTaxf34Srqc5zSzDE8zDVrqMfO1CItrVxne7FsCgkDmv3aOqRrhWyGvIKXhhMeYbQQ45EPf34NS7FvsqU4GqinnRNc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783603; 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=b4gGzKqYkZPtmFpeWH6+ZIWiEl85pUcGY2JyRRLoYIQ=; b=CE0koXBoQERibMKwN+13fLH4Vc6uPeIRFFO+2+P85jHkt/fMXNKdcRpoZhrnSupmOkVDjkZN1kdAeWye4Pg8HMsS3cKjYK5BrThVVwCB3ID8i8EWJzn9O0GrLfLNaaDbYDw5R2nHUaJ5xD+hd+NMnDOHSVBkyMSVANccDqfX3q8= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783603573907.7588544879468; Tue, 26 May 2026 01:20:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0G-0005DM-Qx; Tue, 26 May 2026 04:19:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0F-0005Cd-Pm for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:07 -0400 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 1wRn0D-0007Xo-3n for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:07 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-46-4zegLKX8OIildaC280HBRw-1; Tue, 26 May 2026 04:19:00 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5E75418002E0; Tue, 26 May 2026 08:18:59 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CD3DA180056E; Tue, 26 May 2026 08:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783544; 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=b4gGzKqYkZPtmFpeWH6+ZIWiEl85pUcGY2JyRRLoYIQ=; b=dtAy2R2b3uefbUt0CdX0451O8hkiIrB+Uegfn9o/Y3pdpyDi3n7+wHZJpjEGC+BkBVlpNz jshdBwWh6In9rat+Qw9pqwZrfbCuHtiXPOWlIY0hZCLzWB6c3BKF9NBpiweNdYegdON2wB ZKyAPiOXkdqdgnnXsycySRk2rc/JwCQ= X-MC-Unique: 4zegLKX8OIildaC280HBRw-1 X-Mimecast-MFC-AGG-ID: 4zegLKX8OIildaC280HBRw_1779783539 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: William de Abreu Pinho , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 03/37] tests/functional/aspeed: introduce FacebookAspeedTest Date: Tue, 26 May 2026 10:18:14 +0200 Message-ID: <20260526081848.651835-4-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779783607444154100 From: William de Abreu Pinho Facebook OpenBMC Images include an early script [1] that lowers the console log level to warning. This suppresses the "Hostname set to" message from the serial console. Introduce FacebookAspeedTest (a subclass of AspeedTest), that waits for login prompt instead. Update bletchley-bmc and catalina-bmc to use the new class. This is also used by the anacapa-bmc machine introduced in the following patch. [1]: https://github.com/openbmc/openbmc/blob/6a56a45931fb7015a3fc1855341590= 9105b484d6/meta-facebook/recipes-phosphor/initrdscripts/phosphor-static-nor= ootfs-init/999-reduce-printk Signed-off-by: William de Abreu Pinho Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260519-add-anacapa-machine-v3-1-= 56c23993a20a@gmail.com Signed-off-by: C=C3=A9dric Le Goater --- tests/functional/arm/test_aspeed_bletchley.py | 6 +++--- tests/functional/arm/test_aspeed_catalina.py | 6 +++--- tests/functional/aspeed.py | 8 ++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/functional/arm/test_aspeed_bletchley.py b/tests/function= al/arm/test_aspeed_bletchley.py index 5a60b24b3d2c..3000d0c302b1 100755 --- a/tests/functional/arm/test_aspeed_bletchley.py +++ b/tests/functional/arm/test_aspeed_bletchley.py @@ -5,10 +5,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 from qemu_test import Asset -from aspeed import AspeedTest +from aspeed import FacebookAspeedTest =20 =20 -class BletchleyMachine(AspeedTest): +class BletchleyMachine(FacebookAspeedTest): =20 ASSET_BLETCHLEY_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/master/images/bl= etchley-bmc/openbmc-20250128071329/obmc-phosphor-image-bletchley-2025012807= 1329.static.mtd.xz', @@ -22,4 +22,4 @@ def test_arm_ast2600_bletchley_openbmc(self): soc=3D'AST2600 rev A3') =20 if __name__ =3D=3D '__main__': - AspeedTest.main() + FacebookAspeedTest.main() diff --git a/tests/functional/arm/test_aspeed_catalina.py b/tests/functiona= l/arm/test_aspeed_catalina.py index dc2f24e7b43c..2694e4b005b7 100755 --- a/tests/functional/arm/test_aspeed_catalina.py +++ b/tests/functional/arm/test_aspeed_catalina.py @@ -5,10 +5,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later =20 from qemu_test import Asset -from aspeed import AspeedTest +from aspeed import FacebookAspeedTest =20 =20 -class CatalinaMachine(AspeedTest): +class CatalinaMachine(FacebookAspeedTest): =20 ASSET_CATALINA_FLASH =3D Asset( 'https://github.com/legoater/qemu-aspeed-boot/raw/a866feb5ef81245b= 4827a214584bf6bcc72939f6/images/catalina-bmc/obmc-phosphor-image-catalina-2= 0250619123021.static.mtd.xz', @@ -22,4 +22,4 @@ def test_arm_ast2600_catalina_openbmc(self): soc=3D'AST2600 rev A3') =20 if __name__ =3D=3D '__main__': - AspeedTest.main() + FacebookAspeedTest.main() diff --git a/tests/functional/aspeed.py b/tests/functional/aspeed.py index 47e84e035bd0..88b659093467 100644 --- a/tests/functional/aspeed.py +++ b/tests/functional/aspeed.py @@ -28,6 +28,9 @@ def do_test_arm_aspeed_openbmc(self, machine, image, uboo= t=3D'2019.04', self.wait_for_console_pattern(f'Booting Linux on physical CPU {cpu= _id}') self.wait_for_console_pattern(f'ASPEED {soc}') self.wait_for_console_pattern('/init as init process') + self.wait_for_boot_complete(hostname) + + def wait_for_boot_complete(self, hostname): self.wait_for_console_pattern(f'systemd[1]: Hostname set to <{host= name}>.') =20 def do_test_arm_aspeed_buildroot_start(self, image, cpu_id, pattern=3D= 'Aspeed EVB'): @@ -69,3 +72,8 @@ def generate_otpmem_image(self): f.write(pattern) return path =20 + +class FacebookAspeedTest(AspeedTest): + + def wait_for_boot_complete(self, hostname): + self.wait_for_console_pattern(f'{hostname} login:') --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783697; cv=none; d=zohomail.com; s=zohoarc; b=EvCY5FvzcsFNbiTYv8ZiDibBWwH20kNdZvAa7xOHzku0VW1//IP693O9DmIE0Bwy378XMdjeOwyf1vxpRrkOMOXcjqDYnLx66HrQNznslwVPKtuIOLABc+bHJhChmIGEhiiineJ3tFAc2gZZSkgIeBTNZ7Pv3YSN4ZJ6mVQZUeM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783697; 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=qrnseKuv3x4/lbCdy5/Oq2+oy5HacRijNtMBdoT6X7E=; b=NU51CS+zoAM+IvJONSLEbHCvsWBEcK3dMgBZnmF/EoCUChX26sCPDfJ50gxJn1HojbSCpb0Iui6qJP7RLHjo+LpK8kx6TfQHItu+ReoYdq2nq1b3hI5iltuR2T4igzaDt4rrp1KjoMFYD6n87CTdccwVSZNE/SDZV1ahYaU6+Rg= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783697393558.3211357723335; Tue, 26 May 2026 01:21:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0H-0005Dd-Q7; Tue, 26 May 2026 04:19:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0G-0005Cu-8H for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0D-0007Xu-JX for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:08 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-617-w6RaSJohOEeZpyeJWMdP2Q-1; Tue, 26 May 2026 04:19:02 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4687F195608E; Tue, 26 May 2026 08:19:01 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C33641800577; Tue, 26 May 2026 08:18:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783544; 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=qrnseKuv3x4/lbCdy5/Oq2+oy5HacRijNtMBdoT6X7E=; b=ccCNgc/8uQxoAiLox3+gybcbebqGkWmE5Q7Lb99N7EsYU0eyl85nC7ZGRoRA+rn+QlMWaS /jZ0f97kUTGe97o7KQ78zW6Tt5q3oxpqW/lufWpXZ6SSm+ZnBDAebu2hm3/Ok3LlEOagpa JWoSSxZcIQxalnPhxQJ5LNcFzW4/sAc= X-MC-Unique: w6RaSJohOEeZpyeJWMdP2Q-1 X-Mimecast-MFC-AGG-ID: w6RaSJohOEeZpyeJWMdP2Q_1779783541 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: William de Abreu Pinho , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 04/37] hw/arm/aspeed: add anacapa-bmc machine Date: Tue, 26 May 2026 10:18:15 +0200 Message-ID: <20260526081848.651835-5-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783698314158500 From: William de Abreu Pinho Add the Facebook Anacapa BMC machine. The I2C topology is based on the Linux kernel device tree [1]. Hardware strap register values are taken from real hardware. A functional test is included using the OpenBMC image built from [2], similar to the tests for bletchley-bmc and catalina-bmc. [1]: https://github.com/torvalds/linux/blob/76b4ec8efdc3887cdbf730da2e55881= fc1a18770/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-anacapa.dts [2]: https://github.com/openbmc/openbmc/commit/8e22df918eaaa5d83143471d24ef= 0eeb1c1e3c7c Signed-off-by: William de Abreu Pinho Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260519-add-anacapa-machine-v3-2-= 56c23993a20a@gmail.com [ clg: docs/system/arm/aspeed.rst : fixed 'Aspeed family boards' title chan= ge ] Signed-off-by: C=C3=A9dric Le Goater --- docs/system/arm/aspeed.rst | 5 +- hw/arm/aspeed_ast2600_anacapa.c | 153 ++++++++++++++++++++ hw/arm/meson.build | 1 + tests/functional/arm/meson.build | 2 + tests/functional/arm/test_aspeed_anacapa.py | 25 ++++ 5 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 hw/arm/aspeed_ast2600_anacapa.c create mode 100644 tests/functional/arm/test_aspeed_anacapa.py diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst index df2f539b0257..a2eccf54892d 100644 --- a/docs/system/arm/aspeed.rst +++ b/docs/system/arm/aspeed.rst @@ -1,5 +1,5 @@ -Aspeed family boards (``ast2500-evb``, ``ast2600-evb``, ``bletchley-bmc``,= ``fuji-bmc``, ``gb200nvl-bmc``, ``fby35-bmc``, ``g220a-bmc``, ``palmetto-b= mc``, ``quanta-q71l-bmc``, ``rainier-bmc``, ``romulus-bmc``, ``supermicrox1= 1-bmc``, ``supermicrox11spi-bmc``, ``tiogapass-bmc``, ``witherspoon-bmc``, = ``yosemitev2-bmc``) -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Aspeed family boards (``anacapa-bmc``, ``ast2500-evb``, ``ast2600-evb``, `= `bletchley-bmc``, ``fuji-bmc``, ``gb200nvl-bmc``, ``fby35-bmc``, ``g220a-bm= c``, ``palmetto-bmc``, ``quanta-q71l-bmc``, ``rainier-bmc``, ``romulus-bmc`= `, ``supermicrox11-bmc``, ``supermicrox11spi-bmc``, ``tiogapass-bmc``, ``wi= therspoon-bmc``, ``yosemitev2-bmc``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 The QEMU Aspeed machines model BMCs of various OpenPOWER systems and Aspeed evaluation boards. They are based on different releases of the @@ -33,6 +33,7 @@ AST2600 SoC based machines : - ``fuji-bmc`` Facebook Fuji BMC - ``bletchley-bmc`` Facebook Bletchley BMC - ``fby35-bmc`` Facebook fby35 BMC +- ``anacapa-bmc`` Facebook Anacapa BMC - ``gb200nvl-bmc`` Nvidia GB200nvl BMC =20 Supported devices diff --git a/hw/arm/aspeed_ast2600_anacapa.c b/hw/arm/aspeed_ast2600_anacap= a.c new file mode 100644 index 000000000000..c24f00d44cde --- /dev/null +++ b/hw/arm/aspeed_ast2600_anacapa.c @@ -0,0 +1,153 @@ +/* + * Facebook Anacapa + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "hw/arm/machines-qom.h" +#include "hw/arm/aspeed.h" +#include "hw/arm/aspeed_soc.h" +#include "hw/i2c/i2c_mux_pca954x.h" +#include "hw/gpio/pca9552.h" +#include "hw/nvram/eeprom_at24c.h" + +/* Anacapa hardware value */ +#define ANACAPA_BMC_HW_STRAP1 0x00002002 +#define ANACAPA_BMC_HW_STRAP2 0x00000000 +#define ANACAPA_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB) + +static void anacapa_bmc_i2c_init(AspeedMachineState *bmc) +{ + /* Reference: aspeed-bmc-facebook-anacapa.dts */ + + AspeedSoCState *soc =3D bmc->soc; + I2CBus *i2c[16] =3D {}; + I2CSlave *i2c_mux; + + for (int i =3D 0; i < ARRAY_SIZE(i2c); i++) { + i2c[i] =3D aspeed_i2c_get_bus(&soc->i2c, i); + } + + /* &i2c0 */ + /* eeprom@50 */ + at24c_eeprom_init(i2c[0], 0x50, 256 * KiB); + /* i2c-mux@70 */ + i2c_slave_create_simple(i2c[0], TYPE_PCA9546, 0x70); + + /* &i2c1 */ + /* eeprom@50 */ + at24c_eeprom_init(i2c[1], 0x50, 256 * KiB); + /* i2c-mux@70 (PCA9546) =E2=80=94 4 channels, empty */ + i2c_slave_create_simple(i2c[1], TYPE_PCA9546, 0x70); + + /* &i2c4 */ + /* i2c-mux@70 (PCA9548) */ + i2c_slave_create_simple(i2c[4], TYPE_PCA9548, 0x70); + + /* &i2c6 */ + /* eeprom@50 */ + at24c_eeprom_init(i2c[6], 0x50, 32 * KiB); + + /* &i2c8 */ + /* i2c-mux@72 (PCA9546) */ + i2c_mux =3D i2c_slave_create_simple(i2c[8], TYPE_PCA9546, 0x72); + + /* i2c8mux ch0 */ + /* adc128d818@1f =E2=80=94 no model */ + /* pca9555@22 */ + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 0), + TYPE_PCA9552, 0x22); + /* pca9555@24 */ + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 0), + TYPE_PCA9552, 0x24); + /* eeprom@50 */ + at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 0), 0x50, 16 * KiB); + + /* i2c8mux ch1 */ + /* pca9555@22 */ + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 1), + TYPE_PCA9552, 0x22); + /* pca9555@24 */ + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 1), + TYPE_PCA9552, 0x24); + /* eeprom@50 */ + at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 1), 0x50, 16 * KiB); + + /* &i2c9 */ + /* eeprom@50 */ + at24c_eeprom_init(i2c[9], 0x50, 16 * KiB); + /* eeprom@56 */ + at24c_eeprom_init(i2c[9], 0x56, 8 * KiB); + + /* &i2c10 */ + /* i2c-mux@71 (PCA9548) */ + i2c_mux =3D i2c_slave_create_simple(i2c[10], TYPE_PCA9548, 0x71); + + /* i2c10mux ch5 */ + /* pca9555@22*/ + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 5), + TYPE_PCA9552, 0x22); + /* eeprom@52 */ + at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 5), 0x52, 32 * KiB); + + /* &i2c11 */ + /* i2c-mux@71 (PCA9548) */ + i2c_mux =3D i2c_slave_create_simple(i2c[11], TYPE_PCA9548, 0x71); + + /* i2c11mux ch0-ch4 =E2=80=94 empty */ + + /* i2c11mux ch5 */ + /* pca9555@22 */ + i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 5), + TYPE_PCA9552, 0x22); + /* eeprom@52 */ + at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 5), 0x52, 32 * KiB); + + /* &i2c13 */ + /* i2c-mux@70 (PCA9548) */ + i2c_mux =3D i2c_slave_create_simple(i2c[13], TYPE_PCA9548, 0x70); + + /* i2c13mux ch3 */ + /* adc128d818@1f - no model */ + + /* i2c13mux ch4 */ + /* eeprom@51 */ + at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 4), 0x51, 32 * KiB); + + /* i2c13mux ch7 */ + /* nfc@28 =E2=80=94 no model */ +} + +static void aspeed_machine_anacapa_class_init(ObjectClass *oc, + const void *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + AspeedMachineClass *amc =3D ASPEED_MACHINE_CLASS(oc); + + mc->desc =3D "Facebook Anacapa BMC (Cortex-A7)"; + amc->soc_name =3D "ast2600-a3"; + amc->hw_strap1 =3D ANACAPA_BMC_HW_STRAP1; + amc->hw_strap2 =3D ANACAPA_BMC_HW_STRAP2; + amc->fmc_model =3D "mx66l1g45g"; + amc->spi_model =3D NULL; + amc->num_cs =3D 2; + amc->macs_mask =3D ASPEED_MAC2_ON; + amc->i2c_init =3D anacapa_bmc_i2c_init; + mc->default_ram_size =3D ANACAPA_BMC_RAM_SIZE; + aspeed_machine_class_init_cpus_defaults(mc); +} + +static const TypeInfo aspeed_ast2600_anacapa_types[] =3D { + { + .name =3D MACHINE_TYPE_NAME("anacapa-bmc"), + .parent =3D TYPE_ASPEED_MACHINE, + .class_init =3D aspeed_machine_anacapa_class_init, + .interfaces =3D arm_machine_interfaces, + } +}; + +DEFINE_TYPES(aspeed_ast2600_anacapa_types) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 80068f70bb9c..4fe7efd189e2 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -54,6 +54,7 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files( 'aspeed_ast2500_witherspoon.c', 'aspeed_ast2500_yosemitev2.c', 'aspeed_ast2600.c', + 'aspeed_ast2600_anacapa.c', 'aspeed_ast2600_bletchley.c', 'aspeed_ast2600_catalina.c', 'aspeed_ast2600_evb.c', diff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.= build index 2f538f29a2de..959179a56f6d 100644 --- a/tests/functional/arm/meson.build +++ b/tests/functional/arm/meson.build @@ -12,6 +12,7 @@ test_arm_timeouts =3D { 'aspeed_ast2600_sdk' : 720, 'aspeed_ast2600_sdk_515' : 720, 'aspeed_ast2600_sdk_otp' : 720, + 'aspeed_anacapa' : 480, 'aspeed_bletchley' : 480, 'aspeed_catalina' : 480, 'aspeed_gb200nvl_bmc' : 480, @@ -45,6 +46,7 @@ tests_arm_system_thorough =3D [ 'aspeed_ast2600_sdk', 'aspeed_ast2600_sdk_515', 'aspeed_ast2600_sdk_otp', + 'aspeed_anacapa', 'aspeed_bletchley', 'aspeed_catalina', 'aspeed_gb200nvl_bmc', diff --git a/tests/functional/arm/test_aspeed_anacapa.py b/tests/functional= /arm/test_aspeed_anacapa.py new file mode 100644 index 000000000000..27f8bd8b56a8 --- /dev/null +++ b/tests/functional/arm/test_aspeed_anacapa.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED machines +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from aspeed import FacebookAspeedTest + + +class AnacapaMachine(FacebookAspeedTest): + + ASSET_ANACAPA_FLASH =3D Asset( + 'https://github.com/legoater/qemu-aspeed-boot/raw/3fa3212827b04be4= 034d43b5adeef57c27d6ab18/images/anacapa-bmc/openbmc-20260512025228/obmc-pho= sphor-image-anacapa-20260512025228.static.mtd.xz', + '2232e241abcfb6d4f6b82cb6c378ce5ce05e364aac6d118785c2b6cc33fe43f3') + + def test_arm_ast2600_anacapa_openbmc(self): + image_path =3D self.uncompress(self.ASSET_ANACAPA_FLASH) + + self.do_test_arm_aspeed_openbmc('anacapa-bmc', image=3Dimage_path, + uboot=3D'2019.04', cpu_id=3D'0xf00= ', + soc=3D'AST2600 rev A3') + +if __name__ =3D=3D '__main__': + FacebookAspeedTest.main() --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779784058; cv=none; d=zohomail.com; s=zohoarc; b=KGhvfYh3F+TZ44jczLNw5E+P5STKVrgXZixMO68bu44vWk0YH7LUgQ85OHrgJok08M9KQGhxFeptCnmlENQhR6iHT/DdW1/1TeMXQrUGV+Xxhyx8cCHhz1Z/K7Up7c7hwZ/oTkcIvqVR5L4FP9CibriYkTH0RPuj+36MNLenb0M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779784058; 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=nsZ4c4IahTTnDOY15MyAbWhe223pG0fyhiIrF8LxD2Y=; b=ULXG3jwozO2EdT7NQxbs9O57rBtt4MIRqH8WMbxL4tXwpIk88s72NzY0AjVrtGgZlTNntWXwxL4gsznL9RIpJs3ElJFpOhVSeJ0d1aD2KetspY7Vd41oezz9rWeHJHwQzHk/nJ5CMUvuxRFbAoEmblmGxHT/PM0dqXIMKxDqU2w= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779784058446801.518490436886; Tue, 26 May 2026 01:27:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0L-0005G3-Tv; Tue, 26 May 2026 04:19:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0K-0005Es-2g for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:12 -0400 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 1wRn0H-0007Yr-H3 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:11 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-134-3xcHmhMXOzS6Y3gdp1MB4w-1; Tue, 26 May 2026 04:19:04 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3AE9019560B3; Tue, 26 May 2026 08:19:03 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B8DA51800760; Tue, 26 May 2026 08:19:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783548; 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=nsZ4c4IahTTnDOY15MyAbWhe223pG0fyhiIrF8LxD2Y=; b=gd0euKJSULBG8L+p/QO4y7jOTop1N56AhZlwlpLTYrbN+TGqvBJss/lkHU2DnVNyE8IDmk MKyuDkTuRgdUS+MN+Br3RNpaAqqaIr7J6dQ+oAelOR6MXltGh3FynAUHbhzIrcFF6PcSLb GuH1WgHTt6iyuK4Exuf+Hi+JCTaLYyQ= X-MC-Unique: 3xcHmhMXOzS6Y3gdp1MB4w-1 X-Mimecast-MFC-AGG-ID: 3xcHmhMXOzS6Y3gdp1MB4w_1779783543 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: William de Abreu Pinho , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 05/37] hw/arm/aspeed: anacapa: add FRU EEPROM data Date: Tue, 26 May 2026 10:18:16 +0200 Message-ID: <20260526081848.651835-6-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779784059974158500 From: William de Abreu Pinho Use frugen to generate FRU data for the following components: HPM MB, R-PDB, L-PDB, SCM, BSM, R Bridge Board, L Bridge Board, and HPM board ID. Signed-off-by: William de Abreu Pinho Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260519-add-anacapa-machine-v3-3-= 56c23993a20a@gmail.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast2600_anacapa.c | 225 ++++++++++++++++++++++++++++++-- 1 file changed, 217 insertions(+), 8 deletions(-) diff --git a/hw/arm/aspeed_ast2600_anacapa.c b/hw/arm/aspeed_ast2600_anacap= a.c index c24f00d44cde..a1c8111a9344 100644 --- a/hw/arm/aspeed_ast2600_anacapa.c +++ b/hw/arm/aspeed_ast2600_anacapa.c @@ -20,6 +20,207 @@ #define ANACAPA_BMC_HW_STRAP2 0x00000000 #define ANACAPA_BMC_RAM_SIZE ASPEED_RAM_SIZE(2 * GiB) =20 +/* + * "Anacapa HPM (MB)" FRU data. Generated with frugen. + * + * { + * "board": { "mfg": "Inventec", "pname": "Anacapa QEMU MB EVT2", + * "pn": "00000000000", "serial": "00000000000000" }, + * "product": { "mfg": "Inventec", "pname": "CI-Anacapa", + * "pn": "10000000001", "ver": "MP", + * "serial": "10000000000000", "atag": "QEMU" } + * } + */ +static const uint8_t hpm_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xf6, 0x01, 0x07, 0x19, 0xb4, + 0xa4, 0xf2, 0xc8, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x65, 0x63, 0xd4, + 0x41, 0x6e, 0x61, 0x63, 0x61, 0x70, 0x61, 0x20, 0x51, 0x45, 0x4d, 0x55, + 0x20, 0x4d, 0x42, 0x20, 0x45, 0x56, 0x54, 0x32, 0x47, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xc0, + 0xc1, 0x00, 0x00, 0xb8, 0x01, 0x06, 0x19, 0xc8, 0x49, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x65, 0x63, 0xca, 0x43, 0x49, 0x2d, 0x41, 0x6e, 0x61, 0x63, + 0x61, 0x70, 0x61, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x82, 0x2d, + 0x0c, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x71, 0xd9, + 0xd6, 0xc0, 0xc1, 0x0e +}; +static const size_t hpm_eeprom_len =3D sizeof(hpm_eeprom); + +/* + * "Anacapa R-PDB" FRU data. Generated with frugen. + * + * { + * "board": { "mfg": "Inventec", "pname": "Anacapa QEMU RPDB", + * "pn": "00000000000", "serial": "00000000000000" }, + * "product": { "mfg": "Inventec", "pname": "CI-Anacapa", + * "pn": "10000000001", "ver": "MP", + * "serial": "10000000000000", "atag": "QEMU" } + * } + */ +static const uint8_t rpdb_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xf6, 0x01, 0x07, 0x19, 0x41, + 0x2d, 0xf2, 0xc8, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x65, 0x63, 0xd1, + 0x41, 0x6e, 0x61, 0x63, 0x61, 0x70, 0x61, 0x20, 0x51, 0x45, 0x4d, 0x55, + 0x20, 0x52, 0x50, 0x44, 0x42, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xc0, 0xc1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x4d, 0x01, 0x06, 0x19, 0xc8, 0x49, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x65, 0x63, 0xca, 0x43, 0x49, 0x2d, 0x41, 0x6e, 0x61, 0x63, + 0x61, 0x70, 0x61, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x82, 0x2d, + 0x0c, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x71, 0xd9, + 0xd6, 0xc0, 0xc1, 0x0e +}; +static const size_t rpdb_eeprom_len =3D sizeof(rpdb_eeprom); + +/* + * "Anacapa L-PDB" FRU data. Generated with frugen. + * + * { + * "board": { "mfg": "Inventec", "pname": "Anacapa QEMU LPDB", + * "pn": "00000000000", "serial": "00000000000000" }, + * "product": { "mfg": "Inventec", "pname": "CI-Anacapa", + * "pn": "10000000001", "ver": "MP", + * "serial": "10000000000000", "atag": "QEMU" } + * } + */ +static const uint8_t lpdb_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xf6, 0x01, 0x07, 0x19, 0x41, + 0x2d, 0xf2, 0xc8, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x65, 0x63, 0xd1, + 0x41, 0x6e, 0x61, 0x63, 0x61, 0x70, 0x61, 0x20, 0x51, 0x45, 0x4d, 0x55, + 0x20, 0x4c, 0x50, 0x44, 0x42, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xc0, 0xc1, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x53, 0x01, 0x06, 0x19, 0xc8, 0x49, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x65, 0x63, 0xca, 0x43, 0x49, 0x2d, 0x41, 0x6e, 0x61, 0x63, + 0x61, 0x70, 0x61, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x82, 0x2d, + 0x0c, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x71, 0xd9, + 0xd6, 0xc0, 0xc1, 0x0e +}; +static const size_t lpdb_eeprom_len =3D sizeof(lpdb_eeprom); + +/* + * "Anacapa SCM" FRU data. Generated with frugen. + * + * { + * "board": { "mfg": "Quanta", "pname": "Anacapa SCM", + * "pn": "00000000000", "serial": "00000000000000" }, + * "product": { "mfg": "Quanta", "pname": "CI-Anacapa", + * "pn": "10000000001", "ver": "MP", + * "serial": "10000000000000", "atag": "QEMU" } + * } + */ +static const uint8_t scm_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x07, 0x00, 0x00, 0xf7, 0x01, 0x06, 0x19, 0x41, + 0x2d, 0xf2, 0xc6, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xcb, 0x41, 0x6e, + 0x61, 0x63, 0x61, 0x70, 0x61, 0x20, 0x53, 0x43, 0x4d, 0x47, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0xc0, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5, 0x01, 0x06, 0x19, 0xc6, + 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xca, 0x43, 0x49, 0x2d, 0x41, 0x6e, + 0x61, 0x63, 0x61, 0x70, 0x61, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1a, + 0x82, 0x2d, 0x0c, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, + 0x71, 0xd9, 0xd6, 0xc0, 0xc1, 0x00, 0x00, 0xe2 +}; +static const size_t scm_eeprom_len =3D sizeof(scm_eeprom); + +/* + * "Anacapa BMC Storage Module" FRU data. Generated with frugen. + * + * { + * "board": { "mfg": "Quanta", "pname": "Anacapa BMC Storage Module", + * "pn": "00000000000", "serial": "00000000000000" }, + * "product": { "mfg": "Quanta", "pname": "CI-Anacapa", + * "pn": "10000000001", "ver": "MP", + * "serial": "10000000000000", "atag": "QEMU" } + * } + */ +static const uint8_t bsm_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x00, 0xf4, 0x01, 0x09, 0x00, 0x00, + 0x00, 0x00, 0xc6, 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xda, 0x41, 0x6e, + 0x61, 0x63, 0x61, 0x70, 0x61, 0x20, 0x42, 0x4d, 0x43, 0x20, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0xce, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0xcb, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0xc0, 0xc1, 0x00, 0x00, 0x10, 0x01, 0x08, 0x00, 0xc6, + 0x51, 0x75, 0x61, 0x6e, 0x74, 0x61, 0xca, 0x43, 0x49, 0x2d, 0x41, 0x6e, + 0x61, 0x63, 0x61, 0x70, 0x61, 0xcb, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x31, 0xc2, 0x4d, 0x50, 0xce, 0x31, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xc4, + 0x51, 0x45, 0x4d, 0x55, 0xc0, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, +}; +static const size_t bsm_eeprom_len =3D sizeof(bsm_eeprom); + +/* + * "Anacapa R Bridge Board" FRU data. Generated with frugen. + * + * { + * "board": { "mfg": "Inventec", "pname": "Anacapa QEMU RBB EVT2", + * "pn": "00000000000", "serial": "00000000000000" }, + * "product": { "mfg": "Inventec", "pname": "CI-Anacapa", + * "pn": "10000000001", "ver": "MP", + * "serial": "10000000000000", "atag": "QEMU" } + * } + */ +static const uint8_t rbb_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xf6, 0x01, 0x07, 0x19, 0xb4, + 0xa4, 0xf2, 0xc8, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x65, 0x63, 0xd5, + 0x41, 0x6e, 0x61, 0x63, 0x61, 0x70, 0x61, 0x20, 0x51, 0x45, 0x4d, 0x55, + 0x20, 0x52, 0x42, 0x42, 0x20, 0x45, 0x56, 0x54, 0x32, 0x47, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0xc0, 0xc1, 0x00, 0x70, 0x01, 0x06, 0x19, 0xc8, 0x49, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x65, 0x63, 0xca, 0x43, 0x49, 0x2d, 0x41, 0x6e, 0x61, 0x63, + 0x61, 0x70, 0x61, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x82, 0x2d, + 0x0c, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x71, 0xd9, + 0xd6, 0xc0, 0xc1, 0x0e +}; +static const size_t rbb_eeprom_len =3D sizeof(rbb_eeprom); + +/* + * "Anacapa L Bridge Board" FRU data. Generated with frugen. + * + * { + * "board": { "mfg": "Inventec", "pname": "Anacapa QEMU LBB EVT2", + * "pn": "00000000000", "serial": "00000000000000" }, + * "product": { "mfg": "Inventec", "pname": "CI-Anacapa", + * "pn": "10000000001", "ver": "MP", + * "serial": "10000000000000", "atag": "QEMU" } + * } + */ +static const uint8_t lbb_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xf6, 0x01, 0x07, 0x19, 0xb4, + 0xa4, 0xf2, 0xc8, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x65, 0x63, 0xd5, + 0x41, 0x6e, 0x61, 0x63, 0x61, 0x70, 0x61, 0x20, 0x51, 0x45, 0x4d, 0x55, + 0x20, 0x4c, 0x42, 0x42, 0x20, 0x45, 0x56, 0x54, 0x32, 0x47, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, + 0xc0, 0xc1, 0x00, 0x76, 0x01, 0x06, 0x19, 0xc8, 0x49, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x65, 0x63, 0xca, 0x43, 0x49, 0x2d, 0x41, 0x6e, 0x61, 0x63, + 0x61, 0x70, 0x61, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x82, 0x2d, + 0x0c, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x71, 0xd9, + 0xd6, 0xc0, 0xc1, 0x0e +}; +static const size_t lbb_eeprom_len =3D sizeof(lbb_eeprom); + +/* + * "Anacapa HPM BRD ID" FRU data. Generated with frugen. + * + * { + * "board": { "mfg": "Inventec", "pname": "Anacapa HPM BRD ID", + * "pn": "00000000000", "serial": "00000000000000" }, + * "product": { "mfg": "Inventec", "pname": "CI-Anacapa", + * "pn": "10000000001", "ver": "MP", + * "serial": "10000000000000", "atag": "QEMU" } + * } + */ +static const uint8_t hpm_brd_id_eeprom[] =3D { + 0x01, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0xf6, 0x01, 0x07, 0x19, 0x41, + 0x2d, 0xf2, 0xc8, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x65, 0x63, 0xd2, + 0x41, 0x6e, 0x61, 0x63, 0x61, 0x70, 0x61, 0x20, 0x48, 0x50, 0x4d, 0x20, + 0x42, 0x52, 0x44, 0x20, 0x49, 0x44, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xc0, 0xc1, 0x00, + 0x00, 0x00, 0x00, 0x42, 0x01, 0x06, 0x19, 0xc8, 0x49, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x65, 0x63, 0xca, 0x43, 0x49, 0x2d, 0x41, 0x6e, 0x61, 0x63, + 0x61, 0x70, 0x61, 0x46, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x82, 0x2d, + 0x0c, 0x47, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x71, 0xd9, + 0xd6, 0xc0, 0xc1, 0x0e +}; +static const size_t hpm_brd_id_eeprom_len =3D sizeof(hpm_brd_id_eeprom); + static void anacapa_bmc_i2c_init(AspeedMachineState *bmc) { /* Reference: aspeed-bmc-facebook-anacapa.dts */ @@ -50,7 +251,8 @@ static void anacapa_bmc_i2c_init(AspeedMachineState *bmc) =20 /* &i2c6 */ /* eeprom@50 */ - at24c_eeprom_init(i2c[6], 0x50, 32 * KiB); + at24c_eeprom_init_rom(i2c[6], 0x50, 32 * KiB, + hpm_eeprom, hpm_eeprom_len); =20 /* &i2c8 */ /* i2c-mux@72 (PCA9546) */ @@ -65,7 +267,8 @@ static void anacapa_bmc_i2c_init(AspeedMachineState *bmc) i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 0), TYPE_PCA9552, 0x24); /* eeprom@50 */ - at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 0), 0x50, 16 * KiB); + at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 0), 0x50, 16 * KiB, + rpdb_eeprom, rpdb_eeprom_len); =20 /* i2c8mux ch1 */ /* pca9555@22 */ @@ -75,13 +278,16 @@ static void anacapa_bmc_i2c_init(AspeedMachineState *b= mc) i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 1), TYPE_PCA9552, 0x24); /* eeprom@50 */ - at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 1), 0x50, 16 * KiB); + at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 1), 0x50, 16 * KiB, + lpdb_eeprom, lpdb_eeprom_len); =20 /* &i2c9 */ /* eeprom@50 */ - at24c_eeprom_init(i2c[9], 0x50, 16 * KiB); + at24c_eeprom_init_rom(i2c[9], 0x50, 16 * KiB, + scm_eeprom, scm_eeprom_len); /* eeprom@56 */ - at24c_eeprom_init(i2c[9], 0x56, 8 * KiB); + at24c_eeprom_init_rom(i2c[9], 0x56, 8 * KiB, + bsm_eeprom, bsm_eeprom_len); =20 /* &i2c10 */ /* i2c-mux@71 (PCA9548) */ @@ -92,7 +298,8 @@ static void anacapa_bmc_i2c_init(AspeedMachineState *bmc) i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 5), TYPE_PCA9552, 0x22); /* eeprom@52 */ - at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 5), 0x52, 32 * KiB); + at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 5), 0x52, 32 * KiB, + rbb_eeprom, rbb_eeprom_len); =20 /* &i2c11 */ /* i2c-mux@71 (PCA9548) */ @@ -105,7 +312,8 @@ static void anacapa_bmc_i2c_init(AspeedMachineState *bm= c) i2c_slave_create_simple(pca954x_i2c_get_bus(i2c_mux, 5), TYPE_PCA9552, 0x22); /* eeprom@52 */ - at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 5), 0x52, 32 * KiB); + at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 5), 0x52, 32 * KiB, + lbb_eeprom, lbb_eeprom_len); =20 /* &i2c13 */ /* i2c-mux@70 (PCA9548) */ @@ -116,7 +324,8 @@ static void anacapa_bmc_i2c_init(AspeedMachineState *bm= c) =20 /* i2c13mux ch4 */ /* eeprom@51 */ - at24c_eeprom_init(pca954x_i2c_get_bus(i2c_mux, 4), 0x51, 32 * KiB); + at24c_eeprom_init_rom(pca954x_i2c_get_bus(i2c_mux, 4), 0x51, 32 * KiB, + hpm_brd_id_eeprom, hpm_brd_id_eeprom_len); =20 /* i2c13mux ch7 */ /* nfc@28 =E2=80=94 no model */ --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783997; cv=none; d=zohomail.com; s=zohoarc; b=eUbwD5Fs8Goa3Ktp96ZAB1364GIDRMcHpGAPGMBLXIMEpRc3196a80OtYPVlIjj8303H8j5IvBucztjnzngenof7qOhPFbuik6H5tKQyY8NyYvsQuO4lYSqVrhyxmFwqIwPMARPjvB4+m9Vm76Il9uodd8jDgd6gt/zuXxLIn2c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783997; 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=rizq2K3PQZy6O3Z2ND0nuJ82zts+TTfxvu42v2xOi/c=; b=V4NhwWgZSeq2Iap/+lY1KCDdzMAaJSwfqm854DdjD5UgxNUvkwysJuBzvZg+SM1kSUu6bSrbHFfukdt1dFAErnVFsdAAwmLAjoWGCs8CQVaR9GXIb0ReGXOlDTye/gMAvhn8Ou4duRYRMRN9YZLc35VN9/7rPffR7O7Kb2iUql4= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783997957142.30198721189822; Tue, 26 May 2026 01:26:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0K-0005FS-WA; Tue, 26 May 2026 04:19:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0J-0005ER-2P for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0H-0007Ym-6I for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:10 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-685-Cyg0zb8CMA-yl_hTpfvCTg-1; Tue, 26 May 2026 04:19:06 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2F48A18002CB; Tue, 26 May 2026 08:19:05 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ADD6D180056E; Tue, 26 May 2026 08:19:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783548; 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=rizq2K3PQZy6O3Z2ND0nuJ82zts+TTfxvu42v2xOi/c=; b=HJCLGxYHuA6suiz/mV7ZQGEOOo2ReZrEdx7l+sD+FpyU6VhQRsisJd0YE269rfjsoJBG1M /GeZMa6XaS06xx7VYvpdsRBQ0qietk1TxOIo86U8kBaH2POH32e57ariF45X4XDNJHg151 wRwT/owP6gR6xFZUT1WX05XXh2CkJmw= X-MC-Unique: Cyg0zb8CMA-yl_hTpfvCTg-1 X-Mimecast-MFC-AGG-ID: Cyg0zb8CMA-yl_hTpfvCTg_1779783545 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 06/37] hw/arm/aspeed: Convert SRAM MemoryRegion to array type Date: Tue, 26 May 2026 10:18:17 +0200 Message-ID: <20260526081848.651835-7-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779783999779158500 From: Jamin Lin Several kinds of RAM are supported across Aspeed SoCs, including SRAM, SDRAM, HyperRAM, secure SRAM, and generic SRAM. In addition, different SoCs may expose multiple SRAM regions at different MMIO addresses. The current implementation models SRAM with a single MemoryRegion instance, which makes future expansion cumbersome when additional SRAM types or regions are introduced. Prepare for future SoC designs by converting the SRAM MemoryRegion from a single object into an array-based structure. This change introduces ASPEED_SRAM_NUM and converts existing SRAM users to reference sram[0]. No functional change. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-2-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 3 ++- hw/arm/aspeed_ast10x0.c | 5 +++-- hw/arm/aspeed_ast2400.c | 6 +++--- hw/arm/aspeed_ast2600.c | 6 +++--- hw/arm/aspeed_ast27x0.c | 4 ++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index d7b3647ca16c..e6942b2936ae 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -60,6 +60,7 @@ #define ASPEED_PCIE_NUM 3 #define ASPEED_INTC_NUM 2 #define ASPEED_IOEXP_NUM 2 +#define ASPEED_SRAM_NUM 1 =20 struct AspeedSoCState { DeviceState parent; @@ -67,7 +68,7 @@ struct AspeedSoCState { MemoryRegion *memory; MemoryRegion *dram_mr; MemoryRegion dram_container; - MemoryRegion sram; + MemoryRegion sram[ASPEED_SRAM_NUM]; MemoryRegion spi_boot_container; MemoryRegion spi_boot; MemoryRegion vbootrom; diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c index 41a4e82c1f87..3e478f752058 100644 --- a/hw/arm/aspeed_ast10x0.c +++ b/hw/arm/aspeed_ast10x0.c @@ -240,14 +240,15 @@ static bool aspeed_soc_ast10x0_realize(Aspeed10x0SoCS= tate *a, Error **errp) /* Internal SRAM */ sram_name =3D g_strdup_printf("aspeed.sram.%d", CPU(a->armv7m.cpu)->cpu_index); - memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_size, = &err); + memory_region_init_ram(&s->sram[0], OBJECT(s), sram_name, sc->sram_siz= e, + &err); if (err !=3D NULL) { error_propagate(errp, err); return false; } memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM], - &s->sram); + &s->sram[0]); memory_region_init_ram(&s->secsram, OBJECT(s), "sec.sram", sc->secsram_size, &err); if (err !=3D NULL) { diff --git a/hw/arm/aspeed_ast2400.c b/hw/arm/aspeed_ast2400.c index b1b826b7e0b1..d79aa832f3fa 100644 --- a/hw/arm/aspeed_ast2400.c +++ b/hw/arm/aspeed_ast2400.c @@ -281,12 +281,12 @@ static void aspeed_ast2400_soc_realize(DeviceState *d= ev, Error **errp) =20 /* SRAM */ sram_name =3D g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_i= ndex); - if (!memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_s= ize, - errp)) { + if (!memory_region_init_ram(&s->sram[0], OBJECT(s), sram_name, + sc->sram_size, errp)) { return; } memory_region_add_subregion(s->memory, - sc->memmap[ASPEED_DEV_SRAM], &s->sram); + sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]); =20 /* SCU */ if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) { diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index efb1d8c0637c..a69103de89ea 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -437,12 +437,12 @@ static void aspeed_soc_ast2600_realize(DeviceState *d= ev, Error **errp) =20 /* SRAM */ sram_name =3D g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_i= ndex); - if (!memory_region_init_ram(&s->sram, OBJECT(s), sram_name, sc->sram_s= ize, - errp)) { + if (!memory_region_init_ram(&s->sram[0], OBJECT(s), sram_name, + sc->sram_size, errp)) { return; } memory_region_add_subregion(s->memory, - sc->memmap[ASPEED_DEV_SRAM], &s->sram); + sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]); =20 /* DPMCU */ aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->dpmcu), diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index 87dcb82e1b01..0fb5e4b24c9d 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -778,12 +778,12 @@ static void aspeed_soc_ast2700_realize(DeviceState *d= ev, Error **errp) =20 /* SRAM */ name =3D g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_index); - if (!memory_region_init_ram(&s->sram, OBJECT(s), name, sc->sram_size, + if (!memory_region_init_ram(&s->sram[0], OBJECT(s), name, sc->sram_siz= e, errp)) { return; } memory_region_add_subregion(s->memory, - sc->memmap[ASPEED_DEV_SRAM], &s->sram); + sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]); =20 /* VBOOTROM */ if (!memory_region_init_ram(&s->vbootrom, OBJECT(s), "aspeed.vbootrom", --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783994; cv=none; d=zohomail.com; s=zohoarc; b=APD3SfSzMS30AHzZpaoSMgQ/5jRrYC3PIb9w5GHRjcDBgcDVWCMs4oXsdh3jm5CcDJwZyEVGpvjz0LQnM51jjo4ENPkS7UvNi0bSTp8fthszlySKXBEU2rXnQN/1HYVHdajxYNAsFD1BE3v4lLykaPje+os/VOCsuRPsv2bDExE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783994; 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=C3LqYBgUxfiRAj8SWlnUdZvpCGVfqmzKBwcNBEn9UIM=; b=Q8lUju84181z9ip4mawdIyrqDDRcQkDm9ktFfT9TEabfi/9UDE3zZZgI/0Vhe0oDVxLFkqy5YWB4UjsaN6pkCmiApw4gnoXfEV4qYX/J3YkndVEhxuVh03R3U3y7bnoF/8gGpyGokq80v76FLrcAp+Mn7+nKSc5EDQAOqEoCkR8= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17797839948485.196868842397862; Tue, 26 May 2026 01:26:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0O-0005Gp-Ii; Tue, 26 May 2026 04:19:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0M-0005GE-TW for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:15 -0400 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 1wRn0K-0007a0-S5 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:14 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-528-WI_BIR1hOQyO9SnpAblyuQ-1; Tue, 26 May 2026 04:19:08 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4AF9F1800611; Tue, 26 May 2026 08:19:07 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BB15A180056E; Tue, 26 May 2026 08:19:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783552; 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=C3LqYBgUxfiRAj8SWlnUdZvpCGVfqmzKBwcNBEn9UIM=; b=XR5vVaPvTrsxfuCK8pqh+69EDywX8tq9kVli4JqtqxJY4ljjMs7wURrc4jZEfhr64QFhgi 8wmGouhiZCaFKBZMXSnsmnrRMFrGYhbxFQwpxBBeXoqKF+dfQo+VjDO28HertS2agfA4cT rES7J2DD7u4yqkmCEofJwL0wJsmz/4M= X-MC-Unique: WI_BIR1hOQyO9SnpAblyuQ-1 X-Mimecast-MFC-AGG-ID: WI_BIR1hOQyO9SnpAblyuQ_1779783547 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 07/37] hw/arm/aspeed: Convert SRAM size definition to array type Date: Tue, 26 May 2026 10:18:18 +0200 Message-ID: <20260526081848.651835-8-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-0.001, SPF_PASS=-0.001 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: qemu development 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: 1779783997281154100 From: Jamin Lin Prepare the Aspeed SoC model for future platforms that may contain multiple SRAM regions with different sizes and MMIO mappings. The current implementation stores SRAM size information in a single sram_size field, which limits extensibility when additional SRAM instances are introduced. Convert sram_size into an array-based definition and update all existing users to reference sram_size[0]. This aligns with the previous SRAM MemoryRegion array conversion and provides a scalable foundation for supporting multiple SRAM regions in future SoCs. No functional change. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-3-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 2 +- hw/arm/aspeed_ast10x0.c | 8 ++++---- hw/arm/aspeed_ast2400.c | 6 +++--- hw/arm/aspeed_ast2600.c | 4 ++-- hw/arm/aspeed_ast27x0.c | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index e6942b2936ae..3a7db959a9ae 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -172,7 +172,7 @@ struct AspeedSoCClass { /** valid_cpu_types: NULL terminated array of a single CPU type. */ const char * const *valid_cpu_types; uint32_t silicon_rev; - uint64_t sram_size; + uint64_t sram_size[ASPEED_SRAM_NUM]; uint64_t secsram_size; int pcie_num; int spis_num; diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c index 3e478f752058..9e597a75ec53 100644 --- a/hw/arm/aspeed_ast10x0.c +++ b/hw/arm/aspeed_ast10x0.c @@ -240,8 +240,8 @@ static bool aspeed_soc_ast10x0_realize(Aspeed10x0SoCSta= te *a, Error **errp) /* Internal SRAM */ sram_name =3D g_strdup_printf("aspeed.sram.%d", CPU(a->armv7m.cpu)->cpu_index); - memory_region_init_ram(&s->sram[0], OBJECT(s), sram_name, sc->sram_siz= e, - &err); + memory_region_init_ram(&s->sram[0], OBJECT(s), sram_name, + sc->sram_size[0], &err); if (err !=3D NULL) { error_propagate(errp, err); return false; @@ -493,7 +493,7 @@ static void aspeed_soc_ast1030_class_init(ObjectClass *= klass, const void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST1030_A1_SILICON_REV; - sc->sram_size =3D 0xc0000; + sc->sram_size[0] =3D 0xc0000; sc->secsram_size =3D 0x40000; /* 256 * KiB */ sc->spis_num =3D 2; sc->ehcis_num =3D 0; @@ -521,7 +521,7 @@ static void aspeed_soc_ast1060_class_init(ObjectClass *= klass, const void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST1060_A2_SILICON_REV; - sc->sram_size =3D 0xc0000; + sc->sram_size[0] =3D 0xc0000; sc->secsram_size =3D 0x40000; /* 256 * KiB */ sc->spis_num =3D 2; sc->wdts_num =3D 4; diff --git a/hw/arm/aspeed_ast2400.c b/hw/arm/aspeed_ast2400.c index d79aa832f3fa..c4e5388999e6 100644 --- a/hw/arm/aspeed_ast2400.c +++ b/hw/arm/aspeed_ast2400.c @@ -282,7 +282,7 @@ static void aspeed_ast2400_soc_realize(DeviceState *dev= , Error **errp) /* SRAM */ sram_name =3D g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_i= ndex); if (!memory_region_init_ram(&s->sram[0], OBJECT(s), sram_name, - sc->sram_size, errp)) { + sc->sram_size[0], errp)) { return; } memory_region_add_subregion(s->memory, @@ -533,7 +533,7 @@ static void aspeed_soc_ast2400_class_init(ObjectClass *= oc, const void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST2400_A1_SILICON_REV; - sc->sram_size =3D 0x8000; + sc->sram_size[0] =3D 0x8000; sc->spis_num =3D 1; sc->ehcis_num =3D 1; sc->wdts_num =3D 2; @@ -560,7 +560,7 @@ static void aspeed_soc_ast2500_class_init(ObjectClass *= oc, const void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST2500_A1_SILICON_REV; - sc->sram_size =3D 0x9000; + sc->sram_size[0] =3D 0x9000; sc->spis_num =3D 2; sc->ehcis_num =3D 2; sc->wdts_num =3D 3; diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index a69103de89ea..2f8f49a37689 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -438,7 +438,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev= , Error **errp) /* SRAM */ sram_name =3D g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_i= ndex); if (!memory_region_init_ram(&s->sram[0], OBJECT(s), sram_name, - sc->sram_size, errp)) { + sc->sram_size[0], errp)) { return; } memory_region_add_subregion(s->memory, @@ -764,7 +764,7 @@ static void aspeed_soc_ast2600_class_init(ObjectClass *= oc, const void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST2600_A3_SILICON_REV; - sc->sram_size =3D 0x16400; + sc->sram_size[0] =3D 0x16400; sc->spis_num =3D 2; sc->ehcis_num =3D 2; sc->wdts_num =3D 4; diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index 0fb5e4b24c9d..30883ea7ce40 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -778,8 +778,8 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev= , Error **errp) =20 /* SRAM */ name =3D g_strdup_printf("aspeed.sram.%d", CPU(&a->cpu[0])->cpu_index); - if (!memory_region_init_ram(&s->sram[0], OBJECT(s), name, sc->sram_siz= e, - errp)) { + if (!memory_region_init_ram(&s->sram[0], OBJECT(s), name, + sc->sram_size[0], errp)) { return; } memory_region_add_subregion(s->memory, @@ -1151,7 +1151,7 @@ static void aspeed_soc_ast2700a1_class_init(ObjectCla= ss *oc, const void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST2700_A1_SILICON_REV; - sc->sram_size =3D 0x20000; + sc->sram_size[0] =3D 0x20000; sc->pcie_num =3D 3; sc->spis_num =3D 3; sc->sgpio_num =3D 2; @@ -1181,7 +1181,7 @@ static void aspeed_soc_ast2700a2_class_init(ObjectCla= ss *oc, const void *data) =20 sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST2700_A2_SILICON_REV; - sc->sram_size =3D 0x20000; + sc->sram_size[0] =3D 0x20000; sc->pcie_num =3D 3; sc->spis_num =3D 3; sc->sgpio_num =3D 2; --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779784004; cv=none; d=zohomail.com; s=zohoarc; b=LKEZMTQ0KznpzZmvn5YkIEwoZkOuMoknI+hycmCvbYy1+MKzxMmISCLMFzfCZVBueJUfdtsp4a1VY2rmQiQ1M1nxWyVgsAWfcnBUqmiklpDKDklL9HUocbquDhPEcHWgabfehGKWdva2g+nUFFH9QvBF3qczlmbUj+RkqVYcBR8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779784004; 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=vCMnshIFVTDoHKDvagDdLswwZqvZhVoRLyqON9R9QLc=; b=CGui983WPtQqbm/Vi/LJg0F7P3rXfQGm6+eaitK/zjjgrFalSM2TKtVxXaLmxarBbu+Kus0fUnTj5jOISD2V1bgvOZrWX4qvLONeMSMz1i5vBx44jwEr70GchI9f4cpxmx2w3yc7MUJM7Jl670rulHdexqDNOPuIKGiGvH5X0jU= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779784004118984.7856017515742; Tue, 26 May 2026 01:26:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0O-0005Gt-KO; Tue, 26 May 2026 04:19:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0N-0005GN-1C for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:15 -0400 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 1wRn0K-0007a2-SK for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:14 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-6-HI3IrineP7OpL76pP3SCGg-1; Tue, 26 May 2026 04:19:10 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5C922180061F; Tue, 26 May 2026 08:19:09 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BE8431800357; Tue, 26 May 2026 08:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783552; 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=vCMnshIFVTDoHKDvagDdLswwZqvZhVoRLyqON9R9QLc=; b=CeVwlfXNymkH+1qtLuFGJ7jO2ZK8ET8eccU1xMybEQy79kwZH5BSYudWeGmVVbtKPUNUy0 ffL99TaL6IR7Gu2uh/OHuEW2/jIOpW42i420OzevKSX+AjTmH1thRLRaz80KEXeXsJZEuI yll//tnkYmobg6iIRTt1t6RRAJlV0Zk= X-MC-Unique: HI3IrineP7OpL76pP3SCGg-1 X-Mimecast-MFC-AGG-ID: HI3IrineP7OpL76pP3SCGg_1779783549 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 08/37] hw/arm/aspeed: Rename SRAM memmap entry for multi-SRAM support Date: Tue, 26 May 2026 10:18:19 +0200 Message-ID: <20260526081848.651835-9-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779784005901158500 From: Jamin Lin Some Aspeed SoCs contain multiple SRAM regions with different MMIO mappings, such as internal SRAM and secure SRAM. Prepare for future multi-SRAM support by renaming the SRAM memmap entry from ASPEED_DEV_SRAM to ASPEED_DEV_SRAM0. This makes the numbering explicit and aligns with the array-based SRAM representation introduced previously. No functional change. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-4-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 2 +- hw/arm/aspeed_ast10x0.c | 4 ++-- hw/arm/aspeed_ast2400.c | 6 +++--- hw/arm/aspeed_ast2600.c | 4 ++-- hw/arm/aspeed_ast27x0-ssp.c | 4 ++-- hw/arm/aspeed_ast27x0-tsp.c | 4 ++-- hw/arm/aspeed_ast27x0.c | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index 3a7db959a9ae..dda602e9f20c 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -228,7 +228,7 @@ enum { ASPEED_DEV_SECSRAM, ASPEED_DEV_EMMC_BC, ASPEED_DEV_VIDEO, - ASPEED_DEV_SRAM, + ASPEED_DEV_SRAM0, ASPEED_DEV_SDHCI, ASPEED_DEV_GPIO, ASPEED_DEV_GPIO_1_8V, diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c index 9e597a75ec53..b55f788342a6 100644 --- a/hw/arm/aspeed_ast10x0.c +++ b/hw/arm/aspeed_ast10x0.c @@ -20,7 +20,7 @@ #define ASPEED_SOC_IOMEM_SIZE 0x00200000 =20 static const hwaddr aspeed_soc_ast1030_memmap[] =3D { - [ASPEED_DEV_SRAM] =3D 0x00000000, + [ASPEED_DEV_SRAM0] =3D 0x00000000, [ASPEED_DEV_SECSRAM] =3D 0x79000000, [ASPEED_DEV_IOMEM] =3D 0x7E600000, [ASPEED_DEV_PWM] =3D 0x7E610000, @@ -247,7 +247,7 @@ static bool aspeed_soc_ast10x0_realize(Aspeed10x0SoCSta= te *a, Error **errp) return false; } memory_region_add_subregion(s->memory, - sc->memmap[ASPEED_DEV_SRAM], + sc->memmap[ASPEED_DEV_SRAM0], &s->sram[0]); memory_region_init_ram(&s->secsram, OBJECT(s), "sec.sram", sc->secsram_size, &err); diff --git a/hw/arm/aspeed_ast2400.c b/hw/arm/aspeed_ast2400.c index c4e5388999e6..79a653f65f09 100644 --- a/hw/arm/aspeed_ast2400.c +++ b/hw/arm/aspeed_ast2400.c @@ -38,7 +38,7 @@ static const hwaddr aspeed_soc_ast2400_memmap[] =3D { [ASPEED_DEV_XDMA] =3D 0x1E6E7000, [ASPEED_DEV_VIDEO] =3D 0x1E700000, [ASPEED_DEV_ADC] =3D 0x1E6E9000, - [ASPEED_DEV_SRAM] =3D 0x1E720000, + [ASPEED_DEV_SRAM0] =3D 0x1E720000, [ASPEED_DEV_SDHCI] =3D 0x1E740000, [ASPEED_DEV_GPIO] =3D 0x1E780000, [ASPEED_DEV_RTC] =3D 0x1E781000, @@ -75,7 +75,7 @@ static const hwaddr aspeed_soc_ast2500_memmap[] =3D { [ASPEED_DEV_XDMA] =3D 0x1E6E7000, [ASPEED_DEV_ADC] =3D 0x1E6E9000, [ASPEED_DEV_VIDEO] =3D 0x1E700000, - [ASPEED_DEV_SRAM] =3D 0x1E720000, + [ASPEED_DEV_SRAM0] =3D 0x1E720000, [ASPEED_DEV_SDHCI] =3D 0x1E740000, [ASPEED_DEV_GPIO] =3D 0x1E780000, [ASPEED_DEV_RTC] =3D 0x1E781000, @@ -286,7 +286,7 @@ static void aspeed_ast2400_soc_realize(DeviceState *dev= , Error **errp) return; } memory_region_add_subregion(s->memory, - sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]); + sc->memmap[ASPEED_DEV_SRAM0], &s->sram[0]); =20 /* SCU */ if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) { diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index 2f8f49a37689..d1f18e471aa0 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -23,7 +23,7 @@ =20 static const hwaddr aspeed_soc_ast2600_memmap[] =3D { [ASPEED_DEV_SPI_BOOT] =3D 0x00000000, - [ASPEED_DEV_SRAM] =3D 0x10000000, + [ASPEED_DEV_SRAM0] =3D 0x10000000, [ASPEED_DEV_DPMCU] =3D 0x18000000, /* 0x16000000 0x17FFFFFF : AHB BUS do LPC Bus bridge */ [ASPEED_DEV_IOMEM] =3D 0x1E600000, @@ -442,7 +442,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev= , Error **errp) return; } memory_region_add_subregion(s->memory, - sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]); + sc->memmap[ASPEED_DEV_SRAM0], &s->sram[0]); =20 /* DPMCU */ aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->dpmcu), diff --git a/hw/arm/aspeed_ast27x0-ssp.c b/hw/arm/aspeed_ast27x0-ssp.c index 8b84300e0f60..b3c4eb1915ed 100644 --- a/hw/arm/aspeed_ast27x0-ssp.c +++ b/hw/arm/aspeed_ast27x0-ssp.c @@ -20,7 +20,7 @@ =20 static const hwaddr aspeed_soc_ast27x0ssp_memmap[] =3D { [ASPEED_DEV_SDRAM] =3D 0x00000000, - [ASPEED_DEV_SRAM] =3D 0x70000000, + [ASPEED_DEV_SRAM0] =3D 0x70000000, [ASPEED_DEV_INTC] =3D 0x72100000, [ASPEED_DEV_SCU] =3D 0x72C02000, [ASPEED_DEV_TIMER1] =3D 0x72C10000, @@ -182,7 +182,7 @@ static void aspeed_soc_ast27x0ssp_realize(DeviceState *= dev_soc, Error **errp) /* SRAM */ memory_region_init_alias(&s->sram_alias, OBJECT(s), "sram.alias", s->sram, 0, memory_region_size(s->sram)); - memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM], + memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM0], &s->sram_alias); =20 /* SCU */ diff --git a/hw/arm/aspeed_ast27x0-tsp.c b/hw/arm/aspeed_ast27x0-tsp.c index e7c7b744919b..6098d1aae32d 100644 --- a/hw/arm/aspeed_ast27x0-tsp.c +++ b/hw/arm/aspeed_ast27x0-tsp.c @@ -20,7 +20,7 @@ =20 static const hwaddr aspeed_soc_ast27x0tsp_memmap[] =3D { [ASPEED_DEV_SDRAM] =3D 0x00000000, - [ASPEED_DEV_SRAM] =3D 0x70000000, + [ASPEED_DEV_SRAM0] =3D 0x70000000, [ASPEED_DEV_INTC] =3D 0x72100000, [ASPEED_DEV_SCU] =3D 0x72C02000, [ASPEED_DEV_TIMER1] =3D 0x72C10000, @@ -182,7 +182,7 @@ static void aspeed_soc_ast27x0tsp_realize(DeviceState *= dev_soc, Error **errp) /* SRAM */ memory_region_init_alias(&s->sram_alias, OBJECT(s), "sram.alias", s->sram, 0, memory_region_size(s->sram)); - memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM], + memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM0], &s->sram_alias); =20 /* SCU */ diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index 30883ea7ce40..d7ce14e8c563 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -30,7 +30,7 @@ static const hwaddr aspeed_soc_ast2700_memmap[] =3D { [ASPEED_DEV_VBOOTROM] =3D 0x00000000, [ASPEED_DEV_IOMEM] =3D 0x00020000, - [ASPEED_DEV_SRAM] =3D 0x10000000, + [ASPEED_DEV_SRAM0] =3D 0x10000000, [ASPEED_DEV_DPMCU] =3D 0x11000000, [ASPEED_DEV_IOMEM0] =3D 0x12000000, [ASPEED_DEV_EHCI1] =3D 0x12061000, @@ -783,7 +783,7 @@ static void aspeed_soc_ast2700_realize(DeviceState *dev= , Error **errp) return; } memory_region_add_subregion(s->memory, - sc->memmap[ASPEED_DEV_SRAM], &s->sram[0]); + sc->memmap[ASPEED_DEV_SRAM0], &s->sram[0]); =20 /* VBOOTROM */ if (!memory_region_init_ram(&s->vbootrom, OBJECT(s), "aspeed.vbootrom", --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783603; cv=none; d=zohomail.com; s=zohoarc; b=c+lwVvcik79/BTCjZwVxcd5oEuqQCKKsLWQxSFzxkpx4KV1cr7thSTV0gfixeu4kB07QcyoKRMxswlZT+i8y+L2npOI/GyjKVTbJEutA77U/reEiLFmfgRUqLtHQ3omXzjA68cEYWt1/m321aMjm2eCFaOqz+o3AXV2FH4UX9+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783603; 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=U/3pptQ2qnZ2YhvRFjOnsHg+qVvQb2qB6bEVoqGtxAY=; b=SLN4ReF0gku9FFbVZvixYdHyymvop5fKLy1xVADkUKu0WrA9ryn02KRlk2PDK6inqX9RnApaaBxtmB3VP820zt8b4iMIxZAsVm/SO+gzBnjCQIchwFuMkebhMNYVO+NvW2sEm8hERhuTtn0N3TsMth+eWjS4ulZzuSiVhsEH5mU= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783603870509.0334332444845; Tue, 26 May 2026 01:20:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0R-0005Hp-QO; Tue, 26 May 2026 04:19:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0O-0005Gz-SN for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:17 -0400 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 1wRn0N-0007aW-7P for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:16 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-8-ADHpbhqCMd6w0jzkZw92cg-1; Tue, 26 May 2026 04:19:12 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 53FCC195609E; Tue, 26 May 2026 08:19:11 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D0AD01800357; Tue, 26 May 2026 08:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783554; 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=U/3pptQ2qnZ2YhvRFjOnsHg+qVvQb2qB6bEVoqGtxAY=; b=PNalxMQYvLxVR5i0bRdV/V97V7s7VPwqOsQyEATh2ryFfzBjnHhDBe6/Wb/2WulLkHV8Mg +sylEkUyWW1lmBv82NmKesLR9KTsLc0Jgj1+GBiEsC+OXmKnp3pGPmMs31yDerI/H1VZN/ b0nHbzTrZQ8JSSsmJqfsEeIZRQPBt/I= X-MC-Unique: ADHpbhqCMd6w0jzkZw92cg-1 X-Mimecast-MFC-AGG-ID: ADHpbhqCMd6w0jzkZw92cg_1779783551 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 09/37] hw/arm/aspeed: Consolidate secure SRAM into SRAM array Date: Tue, 26 May 2026 10:18:20 +0200 Message-ID: <20260526081848.651835-10-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783606579158500 From: Jamin Lin Some Aspeed SoCs contain multiple SRAM regions with different sizes and MMIO mappings, such as internal SRAM and secure SRAM. The current implementation models secure SRAM separately from the generic SRAM representation, which complicates future multi-SRAM support and expansion. Increase ASPEED_SRAM_NUM to 2 and migrate secure SRAM to use the common SRAM array representation. Rename the secure SRAM memmap entry to ASPEED_DEV_SRAM1 and update AST10x0 to initialize both SRAM regions through sram[] and sram_size[]. This unifies SRAM-like regions under a common representation and prepares for future SoCs with additional SRAM regions. No functional change. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-5-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/arm/aspeed_soc.h | 6 ++---- hw/arm/aspeed_ast10x0.c | 16 +++++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index dda602e9f20c..3aac144cd408 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -60,7 +60,7 @@ #define ASPEED_PCIE_NUM 3 #define ASPEED_INTC_NUM 2 #define ASPEED_IOEXP_NUM 2 -#define ASPEED_SRAM_NUM 1 +#define ASPEED_SRAM_NUM 2 =20 struct AspeedSoCState { DeviceState parent; @@ -89,7 +89,6 @@ struct AspeedSoCState { AspeedSBCState sbc; AspeedSLIState sli; AspeedSLIState sliio; - MemoryRegion secsram; UnimplementedDeviceState sbc_unimplemented; AspeedSDMCState sdmc; AspeedPWMState pwm; @@ -173,7 +172,6 @@ struct AspeedSoCClass { const char * const *valid_cpu_types; uint32_t silicon_rev; uint64_t sram_size[ASPEED_SRAM_NUM]; - uint64_t secsram_size; int pcie_num; int spis_num; int sgpio_num; @@ -225,10 +223,10 @@ enum { ASPEED_DEV_SCU, ASPEED_DEV_ADC, ASPEED_DEV_SBC, - ASPEED_DEV_SECSRAM, ASPEED_DEV_EMMC_BC, ASPEED_DEV_VIDEO, ASPEED_DEV_SRAM0, + ASPEED_DEV_SRAM1, ASPEED_DEV_SDHCI, ASPEED_DEV_GPIO, ASPEED_DEV_GPIO_1_8V, diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c index b55f788342a6..93c81195b56a 100644 --- a/hw/arm/aspeed_ast10x0.c +++ b/hw/arm/aspeed_ast10x0.c @@ -21,7 +21,7 @@ =20 static const hwaddr aspeed_soc_ast1030_memmap[] =3D { [ASPEED_DEV_SRAM0] =3D 0x00000000, - [ASPEED_DEV_SECSRAM] =3D 0x79000000, + [ASPEED_DEV_SRAM1] =3D 0x79000000, /* SEC SRAM */ [ASPEED_DEV_IOMEM] =3D 0x7E600000, [ASPEED_DEV_PWM] =3D 0x7E610000, [ASPEED_DEV_FMC] =3D 0x7E620000, @@ -249,14 +249,16 @@ static bool aspeed_soc_ast10x0_realize(Aspeed10x0SoCS= tate *a, Error **errp) memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM0], &s->sram[0]); - memory_region_init_ram(&s->secsram, OBJECT(s), "sec.sram", - sc->secsram_size, &err); + + /* Internal SEC SRAM */ + memory_region_init_ram(&s->sram[1], OBJECT(s), "sec.sram", + sc->sram_size[1], &err); if (err !=3D NULL) { error_propagate(errp, err); return false; } - memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SECSRAM], - &s->secsram); + memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM1], + &s->sram[1]); =20 /* SCU */ if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) { @@ -494,7 +496,7 @@ static void aspeed_soc_ast1030_class_init(ObjectClass *= klass, const void *data) sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST1030_A1_SILICON_REV; sc->sram_size[0] =3D 0xc0000; - sc->secsram_size =3D 0x40000; /* 256 * KiB */ + sc->sram_size[1] =3D 0x40000; /* SEC SRAM 256 * KiB */ sc->spis_num =3D 2; sc->ehcis_num =3D 0; sc->wdts_num =3D 4; @@ -522,7 +524,7 @@ static void aspeed_soc_ast1060_class_init(ObjectClass *= klass, const void *data) sc->valid_cpu_types =3D valid_cpu_types; sc->silicon_rev =3D AST1060_A2_SILICON_REV; sc->sram_size[0] =3D 0xc0000; - sc->secsram_size =3D 0x40000; /* 256 * KiB */ + sc->sram_size[1] =3D 0x40000; /* SEC SRAM 256 * KiB */ sc->spis_num =3D 2; sc->wdts_num =3D 4; sc->uarts_num =3D 1; --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783949; cv=none; d=zohomail.com; s=zohoarc; b=VIp9cjDlfhYl080EJ1JCI51Aec9EgJMLe/iNwoHg3Co7m4JTEcXNFKepLT7hx74oWz/8+763uQmGpr84TG5J67teNefN3v1dHiPpnnx2ojiMPE1Nd8wpodz3Z/CMSfS1lHn6DU9m0L0fQbyVmAC1jgw02Jj11EbX0CeelWEnmeY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783949; 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=bui/K17RaBQuaVs2RPcRTR3xgVMLDsmbQnKiLegjCQg=; b=XZmETGr7yc2DXI1aaEavt75ih8OeqEA7cGpoq6puB50b7FOn+B4jVbiwIiWBjJR8aUhV42oo1sOidQ/8MOSXT/oVDoBMsRP68ye5KIuxrO5XXPy3DZ59g4OYZJfDf+GiAZ3ldi9Mb7fzs5tFIxDsvGgI10/8rzf1nupKBjKax5g= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783949688782.4767351433638; Tue, 26 May 2026 01:25:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0U-0005J6-6A; Tue, 26 May 2026 04:19:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0S-0005IM-DA for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0Q-0007dC-Sr for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:20 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-711-KzLbYMH0NHOQ_cDHO3xhaw-1; Tue, 26 May 2026 04:19:14 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 49409195609F; Tue, 26 May 2026 08:19:13 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C6AC7180056E; Tue, 26 May 2026 08:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783558; 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=bui/K17RaBQuaVs2RPcRTR3xgVMLDsmbQnKiLegjCQg=; b=E4USYzQp8dY1F5GkibSIZ1JKUebV7tTV0EyOn+KFr5AEmNXZRxTL05xlSiUoRO+IgZicu1 yappEBfSTUQLSf0Eu4/x8029jNNy3Lz8JArKgx3JHQs/6ZApxp0u2LXmAupErHB8/BrUzt uGb29Puytat1TJVj/p+H5nRGRZix5dw= X-MC-Unique: KzLbYMH0NHOQ_cDHO3xhaw-1 X-Mimecast-MFC-AGG-ID: KzLbYMH0NHOQ_cDHO3xhaw_1779783553 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 10/37] hw/misc/aspeed_scu: Add AST1040 A0 silicon revision ID Date: Tue, 26 May 2026 10:18:21 +0200 Message-ID: <20260526081848.651835-11-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783951505158500 From: Jamin Lin Add the AST1040 A0 silicon revision definition and register it in the supported Aspeed silicon revision table. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-6-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- include/hw/misc/aspeed_scu.h | 1 + hw/misc/aspeed_scu.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/hw/misc/aspeed_scu.h b/include/hw/misc/aspeed_scu.h index d003955428a5..c30940ab7683 100644 --- a/include/hw/misc/aspeed_scu.h +++ b/include/hw/misc/aspeed_scu.h @@ -46,6 +46,7 @@ struct AspeedSCUState { #define AST2600_A3_SILICON_REV 0x05030303U #define AST1030_A1_SILICON_REV 0x80010000U #define AST1060_A2_SILICON_REV 0xA0030000U +#define AST1040_A0_SILICON_REV 0x81000000U #define AST2700_A1_SILICON_REV 0x06010103U #define AST2700_A2_SILICON_REV 0x06020103U =20 diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index 9d9f43e6b563..c9b73a114805 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -562,6 +562,7 @@ static uint32_t aspeed_silicon_revs[] =3D { AST1060_A2_SILICON_REV, AST2700_A1_SILICON_REV, AST2700_A2_SILICON_REV, + AST1040_A0_SILICON_REV, }; =20 bool is_supported_silicon_rev(uint32_t silicon_rev) --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779784011; cv=none; d=zohomail.com; s=zohoarc; b=At7aIfTdNUGDoF2aoucl93NFo6POSfKXvj+LkxKth13fLxpu7A9t4WR2aZgbE/7g9KK5kqvkMCo7j5iPNAjuLUvKkgiCGQs1F1i1thOGyNmKx9EZKl7AgkmEQokCuGZ2X6xpAnwyhkRxKK2VX6oQeujUmbiLtctt7Szi3cbPqfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779784011; 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=+HENlz6rGBDfEWGkKzrLllBmuGN58CBILanrFl7SOck=; b=ekdhG3j+Msl49ShcrHhHGLNMB2cFzhzvVkNEXO53t5j2Opm1s2UExtMaVtWpcE+e7nTOtolJjzd4o58S4KCa3cEANHpmRAvSbW/y0W5N94D8+d2DY/u5AL1zKMnI0IyUaQyy4k/JdzcywaRePOWrGBBXY08Ozv9qpn5Br2++x6w= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779784011436266.66215605347725; Tue, 26 May 2026 01:26:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0W-0005LB-41; Tue, 26 May 2026 04:19:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0U-0005J8-5x for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:22 -0400 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 1wRn0R-0007do-9z for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:21 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-412-Kby3isAYOECMCT-9sBdSqg-1; Tue, 26 May 2026 04:19:16 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3FBB219560AF; Tue, 26 May 2026 08:19:15 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BCCF7180075B; Tue, 26 May 2026 08:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783558; 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=+HENlz6rGBDfEWGkKzrLllBmuGN58CBILanrFl7SOck=; b=TiTl1uL9wIBk0pSaM3BuDWTpDtMUXbPPg9mY0Ky0GysNFfQE7Tvkaaf4m189QPMVC9X9pI r2mVQoCNq/eGAtwgQDh6B2gOhZ9CRx5N8zXxXXbDX9fyUac9RGRGLPtIwXobVtGqKVYHnR B0KSzlj1IQOSdVjIP+KGpIrli2eK3jU= X-MC-Unique: Kby3isAYOECMCT-9sBdSqg-1 X-Mimecast-MFC-AGG-ID: Kby3isAYOECMCT-9sBdSqg_1779783555 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 11/37] hw/arm/aspeed: Introduce AST1040 A0 SoC model Date: Tue, 26 May 2026 10:18:22 +0200 Message-ID: <20260526081848.651835-12-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779784013440154100 From: Jamin Lin The AST1040 is based on an ARM Cortex-M4F CPU core. Since QEMU currently does not provide Cortex-M4F support, use the existing Cortex-M4 CPU model as a temporary replacement. This initial implementation provides the basic infrastructure required to boot firmware and run a minimal firmware shell, including: - ARM Cortex-M4 CPU integration - NVIC interrupt controller support - Internal HyperRAM and SRAM memory regions - SCU integration - UART devices and interrupt wiring AST1040 SCU behavior is compatible with the AST2700 SCUIO model, so reuse the existing AST2700 SCUIO implementation directly instead of introducing another identical SCU model. This reduces duplicate code and helps minimize long-term codebase maintenance. Several peripherals are currently modeled as unimplemented devices and can be added incrementally in future updates. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-7-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast1040.c | 254 ++++++++++++++++++++++++++++++++++++++++ hw/arm/meson.build | 3 +- 2 files changed, 256 insertions(+), 1 deletion(-) create mode 100644 hw/arm/aspeed_ast1040.c diff --git a/hw/arm/aspeed_ast1040.c b/hw/arm/aspeed_ast1040.c new file mode 100644 index 000000000000..8efcdad8f6a0 --- /dev/null +++ b/hw/arm/aspeed_ast1040.c @@ -0,0 +1,254 @@ +/* + * ASPEED AST1040 SoC + * + * Copyright (C) 2026 ASPEED Technology Inc. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "system/address-spaces.h" +#include "system/system.h" +#include "hw/core/qdev-clock.h" +#include "hw/misc/unimp.h" +#include "hw/arm/aspeed_soc.h" + +static const hwaddr aspeed_soc_ast1040_memmap[] =3D { + [ASPEED_DEV_SRAM1] =3D 0x00000000, /* Hyper RAM */ + [ASPEED_DEV_FMC] =3D 0x74000000, + [ASPEED_DEV_SPI0] =3D 0x74010000, + [ASPEED_DEV_SPI1] =3D 0x74020000, + [ASPEED_DEV_PWM] =3D 0x740C0000, + [ASPEED_DEV_UDC] =3D 0x74120000, + [ASPEED_DEV_SRAM0] =3D 0x74B80000, + [ASPEED_DEV_ADC] =3D 0x74C00000, + [ASPEED_DEV_JTAG0] =3D 0x74C01000, + [ASPEED_DEV_SCU] =3D 0x74C02000, + [ASPEED_DEV_ESPI] =3D 0x74C05000, + [ASPEED_DEV_JTAG1] =3D 0x74C09000, + [ASPEED_DEV_GPIO] =3D 0x74C0B000, + [ASPEED_DEV_SGPIOM0] =3D 0x74C0C000, + [ASPEED_DEV_SGPIOM1] =3D 0x74C0D000, + [ASPEED_DEV_I2C] =3D 0x74C0F000, + [ASPEED_DEV_I3C] =3D 0x74C20000, + [ASPEED_DEV_UART0] =3D 0x74C33000, + [ASPEED_DEV_UART1] =3D 0x74C33100, + [ASPEED_DEV_UART2] =3D 0x74C33200, + [ASPEED_DEV_UART3] =3D 0x74C33300, + [ASPEED_DEV_UART4] =3D 0x74C33400, + [ASPEED_DEV_UART5] =3D 0x74C33500, + [ASPEED_DEV_UART6] =3D 0x74C33600, + [ASPEED_DEV_UART7] =3D 0x74C33700, + [ASPEED_DEV_UART8] =3D 0x74C33800, + [ASPEED_DEV_UART9] =3D 0x74C33900, + [ASPEED_DEV_UART10] =3D 0x74C33A00, + [ASPEED_DEV_UART11] =3D 0x74C33B00, + [ASPEED_DEV_UART12] =3D 0x74C33C00, + [ASPEED_DEV_WDT] =3D 0x74C37000, + [ASPEED_DEV_TIMER1] =3D 0x74C3A000, +}; + +static const int aspeed_soc_ast1040_irqmap[] =3D { + [ASPEED_DEV_ESPI] =3D 10, + [ASPEED_DEV_I2C] =3D 64, /* 64 ~ 77 */ + [ASPEED_DEV_ADC] =3D 80, + [ASPEED_DEV_GPIO] =3D 82, + [ASPEED_DEV_SGPIOM0] =3D 85, + [ASPEED_DEV_TIMER1] =3D 92, + [ASPEED_DEV_I3C] =3D 96, /* 96 ~ 103 */ + [ASPEED_DEV_WDT] =3D 112, + [ASPEED_DEV_FMC] =3D 121, + [ASPEED_DEV_SPI0] =3D 122, + [ASPEED_DEV_SPI1] =3D 123, + [ASPEED_DEV_PWM] =3D 125, + [ASPEED_DEV_UART0] =3D 135, + [ASPEED_DEV_UART1] =3D 136, + [ASPEED_DEV_UART2] =3D 137, + [ASPEED_DEV_UART3] =3D 138, + [ASPEED_DEV_UART4] =3D 139, + [ASPEED_DEV_UART5] =3D 140, + [ASPEED_DEV_UART6] =3D 141, + [ASPEED_DEV_UART7] =3D 142, + [ASPEED_DEV_UART8] =3D 143, + [ASPEED_DEV_UART9] =3D 144, + [ASPEED_DEV_UART10] =3D 145, + [ASPEED_DEV_UART11] =3D 146, + [ASPEED_DEV_UART12] =3D 147, + [ASPEED_DEV_JTAG0] =3D 162, +}; + +static qemu_irq aspeed_soc_ast1040_get_irq(AspeedSoCState *s, int dev) +{ + Aspeed10x0SoCState *a =3D ASPEED10X0_SOC(s); + AspeedSoCClass *sc =3D ASPEED_SOC_GET_CLASS(s); + + return qdev_get_gpio_in(DEVICE(&a->armv7m), sc->irqmap[dev]); +} + +static void aspeed_soc_ast1040_init(Object *obj) +{ + Aspeed10x0SoCState *a =3D ASPEED10X0_SOC(obj); + AspeedSoCState *s =3D ASPEED_SOC(obj); + AspeedSoCClass *sc =3D ASPEED_SOC_GET_CLASS(s); + int i; + object_initialize_child(obj, "armv7m", &a->armv7m, TYPE_ARMV7M); + + s->sysclk =3D qdev_init_clock_in(DEVICE(s), "sysclk", NULL, NULL, 0); + + /* AST1040 uses the AST2700 SCUIO model */ + object_initialize_child(obj, "scu", &s->scu, TYPE_ASPEED_2700_SCUIO); + qdev_prop_set_uint32(DEVICE(&s->scu), "silicon-rev", sc->silicon_rev); + + object_property_add_alias(obj, "hw-strap1", OBJECT(&s->scu), "hw-strap= 1"); + object_property_add_alias(obj, "hw-strap2", OBJECT(&s->scu), "hw-strap= 2"); + + for (i =3D 0; i < sc->uarts_num; i++) { + object_initialize_child(obj, "uart[*]", &s->uart[i], TYPE_SERIAL_M= M); + } + + object_initialize_child(obj, "pwm", &s->pwm, TYPE_UNIMPLEMENTED_DEVICE= ); + object_initialize_child(obj, "espi", &s->espi, TYPE_UNIMPLEMENTED_DEVI= CE); + object_initialize_child(obj, "udc", &s->udc, TYPE_UNIMPLEMENTED_DEVICE= ); + object_initialize_child(obj, "sgpiom[0]", &s->sgpiom[0], + TYPE_UNIMPLEMENTED_DEVICE); + object_initialize_child(obj, "sgpiom[1]", &s->sgpiom[1], + TYPE_UNIMPLEMENTED_DEVICE); + object_initialize_child(obj, "jtag[0]", &s->jtag[0], + TYPE_UNIMPLEMENTED_DEVICE); + object_initialize_child(obj, "jtag[1]", &s->jtag[1], + TYPE_UNIMPLEMENTED_DEVICE); +} + +static void aspeed_soc_ast1040_realize(DeviceState *dev_soc, Error **errp) +{ + Aspeed10x0SoCState *a =3D ASPEED10X0_SOC(dev_soc); + AspeedSoCState *s =3D ASPEED_SOC(dev_soc); + AspeedSoCClass *sc =3D ASPEED_SOC_GET_CLASS(s); + g_autofree char *hyperram_name =3D NULL; + g_autofree char *sram_name =3D NULL; + DeviceState *armv7m; + Error *err =3D NULL; + int uart; + int i; + + if (!clock_has_source(s->sysclk)) { + error_setg(errp, "sysclk clock must be wired up by the board code"= ); + return; + } + + /* AST1040 CPU Core */ + armv7m =3D DEVICE(&a->armv7m); + qdev_prop_set_uint32(armv7m, "num-irq", 256); + qdev_prop_set_string(armv7m, "cpu-type", + aspeed_soc_cpu_type(sc->valid_cpu_types)); + qdev_connect_clock_in(armv7m, "cpuclk", s->sysclk); + object_property_set_link(OBJECT(&a->armv7m), "memory", + OBJECT(s->memory), &error_abort); + sysbus_realize(SYS_BUS_DEVICE(&a->armv7m), &error_abort); + + /* Internal SRAM */ + sram_name =3D g_strdup_printf("aspeed.sram.%d", + CPU(a->armv7m.cpu)->cpu_index); + memory_region_init_ram(&s->sram[0], OBJECT(s), sram_name, + sc->sram_size[0], &err); + if (err) { + error_propagate(errp, err); + return; + } + memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM0], + &s->sram[0]); + + /* Internal Hyper RAM */ + hyperram_name =3D g_strdup_printf("aspeed.hyperram.%d", + CPU(a->armv7m.cpu)->cpu_index); + memory_region_init_ram(&s->sram[1], OBJECT(s), hyperram_name, + sc->sram_size[1], &err); + if (err) { + error_propagate(errp, err); + return; + } + memory_region_add_subregion(s->memory, sc->memmap[ASPEED_DEV_SRAM1], + &s->sram[1]); + + /* SCU */ + if (!sysbus_realize(SYS_BUS_DEVICE(&s->scu), errp)) { + return; + } + aspeed_mmio_map(s->memory, SYS_BUS_DEVICE(&s->scu), 0, + sc->memmap[ASPEED_DEV_SCU]); + + /* UART */ + for (i =3D 0, uart =3D sc->uarts_base; i < sc->uarts_num; i++, uart++)= { + if (!aspeed_soc_uart_realize(s->memory, &s->uart[i], + sc->memmap[uart], errp)) { + return; + } + sysbus_connect_irq(SYS_BUS_DEVICE(&s->uart[i]), 0, + aspeed_soc_ast1040_get_irq(s, uart)); + } + + /* Unimplemented peripherals */ + aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->pwm), + "aspeed.pwm", + sc->memmap[ASPEED_DEV_PWM], 0x10000); + + aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->espi), + "aspeed.espi", + sc->memmap[ASPEED_DEV_ESPI], 0x1000); + + aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->udc), + "aspeed.udc", + sc->memmap[ASPEED_DEV_UDC], 0x4000); + + aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->sgpiom[0]), + "aspeed.sgpiom0", + sc->memmap[ASPEED_DEV_SGPIOM0], 0x1000); + + aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->sgpiom[1]), + "aspeed.sgpiom1", + sc->memmap[ASPEED_DEV_SGPIOM1], 0x1000); + + aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->jtag[0]), + "aspeed.jtag0", + sc->memmap[ASPEED_DEV_JTAG0], 0x100); + + aspeed_mmio_map_unimplemented(s->memory, SYS_BUS_DEVICE(&s->jtag[1]), + "aspeed.jtag1", + sc->memmap[ASPEED_DEV_JTAG1], 0x100); +} + +static void aspeed_soc_ast1040_class_init(ObjectClass *klass, const void *= data) +{ + static const char * const valid_cpu_types[] =3D { + ARM_CPU_TYPE_NAME("cortex-m4"), /* TODO cortex-m4f */ + NULL + }; + DeviceClass *dc =3D DEVICE_CLASS(klass); + AspeedSoCClass *sc =3D ASPEED_SOC_CLASS(dc); + + /* Reason: The Aspeed SoC can only be instantiated from a board */ + dc->user_creatable =3D false; + dc->realize =3D aspeed_soc_ast1040_realize; + + sc->valid_cpu_types =3D valid_cpu_types; + sc->silicon_rev =3D AST1040_A0_SILICON_REV; + sc->sram_size[0] =3D 128 * KiB; + sc->sram_size[1] =3D 16 * MiB; /* Hyper RAM */ + sc->uarts_num =3D 13; + sc->uarts_base =3D ASPEED_DEV_UART0; + sc->irqmap =3D aspeed_soc_ast1040_irqmap; + sc->memmap =3D aspeed_soc_ast1040_memmap; + sc->num_cpus =3D 1; +} + +static const TypeInfo aspeed_soc_ast1040_types[] =3D { + { + .name =3D "ast1040-a0", + .parent =3D TYPE_ASPEED10X0_SOC, + .instance_init =3D aspeed_soc_ast1040_init, + .class_init =3D aspeed_soc_ast1040_class_init, + } +}; + +DEFINE_TYPES(aspeed_soc_ast1040_types) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 4fe7efd189e2..1da08d198bee 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -63,7 +63,8 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files( 'aspeed_ast2600_gb200nvl.c', 'aspeed_ast2600_rainier.c', 'aspeed_ast10x0.c', - 'aspeed_ast10x0_evb.c')) + 'aspeed_ast10x0_evb.c', + 'aspeed_ast1040.c')) arm_common_ss.add(when: ['CONFIG_ASPEED_SOC', 'TARGET_AARCH64'], if_true: = files( 'aspeed_ast1700.c', 'aspeed_ast27x0.c', --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783821; cv=none; d=zohomail.com; s=zohoarc; b=IqUBMpTW3ZubQLmbaCCcI7Mvj+BVjCc5kfzTZH+5gJKOTujQuYQvCXDOMbsmUPnYhdxfaEB5v5wfurbMSdowr6ns4gzab4zgbRY207keJVGyg02eLP0CnIj7y1gTAleX0i1eUVCTttpxthN0kiSKEthIlr82vTmJZhJAUT4puwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783821; 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=AQ84ZUCdRMHtrAzzN1AYmiHiROWg5wDN6WXkCLnqlsE=; b=jracxdTF/MWfwZG2JfUDKUxtV0yinc0TYdqGpG1HJMgw2m4+LS5vJpNJsMxCGJmkVMqR3obTUswUSLg3mXtPxwaIIrYeVzMiX9fnTq46oLFNKvFv06aWMYLZK9XdJ2KobexrbmVbqOH7NiBCBnj9BmpiFSPM6Ko7vVWEhaOxsDc= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783821037710.7384160172095; Tue, 26 May 2026 01:23:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0Z-0005On-5N; Tue, 26 May 2026 04:19:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0W-0005LG-GN for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:24 -0400 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 1wRn0U-0007i8-Hx for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:24 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-468-jZSkN3JGPeWCWBDHEHtG5A-1; Tue, 26 May 2026 04:19:18 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3AA9B18002EE; Tue, 26 May 2026 08:19:17 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B357C1800357; Tue, 26 May 2026 08:19:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783562; 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=AQ84ZUCdRMHtrAzzN1AYmiHiROWg5wDN6WXkCLnqlsE=; b=F6mbeHdSkthwezT1mxuEoE1S093KAHoPJMwcXwebemqu3I69WiLsPkMdt2nmCl8NBljP+z VmY7ANOBv2G18+NqVdrkRVBSuWCqznQBxB0BJCOqdST+q6r+fG5OI2yCeLoMHS6VEKROgy jDsy4E3D1yvIRqCMoFiwco65OWIjx68= X-MC-Unique: jZSkN3JGPeWCWBDHEHtG5A-1 X-Mimecast-MFC-AGG-ID: jZSkN3JGPeWCWBDHEHtG5A_1779783557 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 12/37] hw/arm/aspeed: Add AST1040 EVB machine model Date: Tue, 26 May 2026 10:18:23 +0200 Message-ID: <20260526081848.651835-13-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-0.001, SPF_PASS=-0.001 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: qemu development 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: 1779783822797158500 From: Jamin Lin AST1040 is the next-generation device following AST1030 and is primarily designed as a bridge/BIC controller platform. Introduce a dedicated AST1040 EVB machine implementation for firmware development and validation. Although the existing ast10x0 EVB machine code already provides a reusable minibmc initialization flow, AST1040 requires different platform settings, including: - Different SYSCLK frequency - Different internal flash size To avoid overloading the existing AST1030-specific helper, introduce a separate aspeed_bic_machine_init() implementation in a dedicated source file. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-8-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/arm/aspeed_ast1040_evb.c | 73 +++++++++++++++++++++++++++++++++++++ hw/arm/meson.build | 3 +- 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 hw/arm/aspeed_ast1040_evb.c diff --git a/hw/arm/aspeed_ast1040_evb.c b/hw/arm/aspeed_ast1040_evb.c new file mode 100644 index 000000000000..1d9b55247f07 --- /dev/null +++ b/hw/arm/aspeed_ast1040_evb.c @@ -0,0 +1,73 @@ +/* + * ASPEED AST1040 EVB + * + * Copyright (C) 2026 ASPEED Technology Inc. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "hw/arm/boot.h" +#include "hw/arm/machines-qom.h" +#include "hw/arm/aspeed.h" +#include "hw/arm/aspeed_soc.h" +#include "hw/core/qdev-clock.h" +#include "system/system.h" + +#define AST1040_INTERNAL_FLASH_SIZE (4 * MiB) +/* Main SYSCLK frequency in Hz (400MHz) */ +#define SYSCLK_FRQ 400000000ULL + +static void aspeed_bic_machine_init(MachineState *machine) +{ + AspeedMachineState *bmc =3D ASPEED_MACHINE(machine); + AspeedMachineClass *amc =3D ASPEED_MACHINE_GET_CLASS(machine); + Clock *sysclk; + + sysclk =3D clock_new(OBJECT(machine), "SYSCLK"); + clock_set_hz(sysclk, SYSCLK_FRQ); + + bmc->soc =3D ASPEED_SOC(object_new(amc->soc_name)); + object_property_add_child(OBJECT(machine), "soc", OBJECT(bmc->soc)); + object_unref(OBJECT(bmc->soc)); + qdev_connect_clock_in(DEVICE(bmc->soc), "sysclk", sysclk); + + object_property_set_link(OBJECT(bmc->soc), "memory", + OBJECT(get_system_memory()), &error_abort); + aspeed_connect_serial_hds_to_uarts(bmc); + qdev_realize(DEVICE(bmc->soc), NULL, &error_abort); + + armv7m_load_kernel(ARM_CPU(first_cpu), + machine->kernel_filename, + 0, + AST1040_INTERNAL_FLASH_SIZE); +} + +static void aspeed_machine_ast1040_evb_class_init(ObjectClass *oc, + const void *data) +{ + MachineClass *mc =3D MACHINE_CLASS(oc); + AspeedMachineClass *amc =3D ASPEED_MACHINE_CLASS(oc); + + mc->desc =3D "Aspeed AST1040 BIC EVB (Cortex-M4F)"; + amc->soc_name =3D "ast1040-a0"; + amc->hw_strap1 =3D 0; + amc->hw_strap2 =3D 0; + mc->init =3D aspeed_bic_machine_init; + mc->default_ram_size =3D 0; + amc->macs_mask =3D 0; + amc->uart_default =3D ASPEED_DEV_UART12; + aspeed_machine_class_init_cpus_defaults(mc); +} + +static const TypeInfo aspeed_ast1040_evb_types[] =3D { + { + .name =3D MACHINE_TYPE_NAME("ast1040-evb"), + .parent =3D TYPE_ASPEED_MACHINE, + .class_init =3D aspeed_machine_ast1040_evb_class_init, + .interfaces =3D arm_machine_interfaces, + } +}; + +DEFINE_TYPES(aspeed_ast1040_evb_types) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 1da08d198bee..68d204bb4ebf 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -64,7 +64,8 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files( 'aspeed_ast2600_rainier.c', 'aspeed_ast10x0.c', 'aspeed_ast10x0_evb.c', - 'aspeed_ast1040.c')) + 'aspeed_ast1040.c', + 'aspeed_ast1040_evb.c')) arm_common_ss.add(when: ['CONFIG_ASPEED_SOC', 'TARGET_AARCH64'], if_true: = files( 'aspeed_ast1700.c', 'aspeed_ast27x0.c', --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783805; cv=none; d=zohomail.com; s=zohoarc; b=b/74bU6PvS9udJx3EJyeR4v4z+e2it9sG1pQYu9oxrYkomC75y8cgzJfajEenYqzrPq10MGUN2tibj3O/1OU3fs0mQ36XlZclp2eRsSnCVaWhYFhMse18k7uDqLIrwpI7/L+SYliwwCplMjLxzNosQgUwk7keP9BPWdzK5nPdS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783805; 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=CFhFJk4wW847wXcDxweUhmJvk4UnLP+9BFlsu69yODg=; b=QA2zdEotY69VZEJPRmD046B0+/O4+K2dz7JrPcvy6mob9sZHRI+1zILu2SbGGm8kD6aPOXV/PRJvMygPLiHWU7NDBryykjZa4/3fkCTq13MFVLw4N7fb+eBb1D6a+hkPkkD8HacPC01SNa+L/O4+x63cjHmrBSifoXhwl7K+gfs= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783805084831.4126236531778; Tue, 26 May 2026 01:23:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0d-0005Rz-Qn; Tue, 26 May 2026 04:19:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0W-0005LK-O6 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0V-0007iZ-24 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:24 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-259-SgLOwYwKN0uYm44Y1GCM0g-1; Tue, 26 May 2026 04:19:20 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2E8A91956067; Tue, 26 May 2026 08:19:19 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ACF151800267; Tue, 26 May 2026 08:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783562; 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=CFhFJk4wW847wXcDxweUhmJvk4UnLP+9BFlsu69yODg=; b=Lhek2G/70CS4iHlCy3sQl25IZkIVM2A/5ag73ueHsSsMofp3IFXjb1HrAXLw4b7P8qvjzA /eComKe4b2mvIYBx272qiWK1qDYtx+hIuTNQmCKsL/SmAoA//MAYEvm2yAWeDlCyb7lh9Q hl0FL4ApfmykSHXqem0tOKlBAzUzY8U= X-MC-Unique: SgLOwYwKN0uYm44Y1GCM0g-1 X-Mimecast-MFC-AGG-ID: SgLOwYwKN0uYm44Y1GCM0g_1779783559 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 13/37] tests/function/aspeed: Add AST1040 functional test Date: Tue, 26 May 2026 10:18:24 +0200 Message-ID: <20260526081848.651835-14-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783806692158500 From: Jamin Lin Add a new functional test for the ast1040-evb machine to validate Zephyr firmware boot flow in QEMU. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-9-jamin_lin= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- tests/functional/arm/meson.build | 1 + tests/functional/arm/test_aspeed_ast1040.py | 35 +++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/functional/arm/test_aspeed_ast1040.py diff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.= build index 959179a56f6d..61b00932db93 100644 --- a/tests/functional/arm/meson.build +++ b/tests/functional/arm/meson.build @@ -34,6 +34,7 @@ tests_arm_system_quick =3D [ =20 tests_arm_system_thorough =3D [ 'aspeed_ast1030', + 'aspeed_ast1040', 'aspeed_ast1060', 'aspeed_palmetto', 'aspeed_romulus', diff --git a/tests/functional/arm/test_aspeed_ast1040.py b/tests/functional= /arm/test_aspeed_ast1040.py new file mode 100644 index 000000000000..e4d8ecb37a58 --- /dev/null +++ b/tests/functional/arm/test_aspeed_ast1040.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# +# Functional test that boots the ASPEED SoCs with firmware +# +# Copyright (C) 2026 ASPEED Technology Inc +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from aspeed import AspeedTest +from qemu_test import Asset, exec_command_and_wait_for_pattern + + +class AST1040Machine(AspeedTest): + + ASSET_ZEPHYR_3_07 =3D Asset( + ('https://github.com/AspeedTech-BMC' + '/zephyr/releases/download/v00.03.07/ast1040-evb-demo.zip'), + 'b5189797c22c2d732ddc27670c1efdeba821a2747c9c7434f190791125baa121= ') + + def test_arm_ast1040_zephyros(self): + self.set_machine('ast1040-evb') + + kernel_name =3D "zephyr.bin" + kernel_file =3D self.archive_extract( + self.ASSET_ZEPHYR_3_07, member=3Dkernel_name) + + self.vm.set_console() + self.vm.add_args('-kernel', kernel_file, '-nographic') + self.vm.launch() + self.wait_for_console_pattern("uart:~$") + exec_command_and_wait_for_pattern(self, "help", + "Available commands") + +if __name__ =3D=3D '__main__': + AspeedTest.main() --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783655; cv=none; d=zohomail.com; s=zohoarc; b=heuXh80bmO2T8/P5o4fhIAHeLnn3/LHbILpkK7RnsRQe1K3t+7LAGJWOOBmoqVIkLu/R8Gq2C25v/vd3uZuST2X9x8+HzDP2QeY0mZC0EeaN8V03RPA6ngvezFpDD/6m6y2jPEylA7fZpagjgyn+gYqhykKJ8LvfY/3YhxBWaYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783655; 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=CyaVP63uw41aQRZ1cguSKQ8Eh0uX5EWMSBBwc7dF8BQ=; b=iasz3HBveoz4tb78GozaYANKE6BO9+KRpI1EVIGR14/de9sVnMoRqZkJqfpwbxkqEJ8vTRJXRKbKcyk6AW3dpnI9UdjN2nN5oBmzc2pO0Ke+7U1U8st2IJj35p3PG2a3Ta43pA8s8zBePP60fhNEpizPll6IRxM3fsTGiZzE1Ys= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783655765906.9511265434888; Tue, 26 May 2026 01:20:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0l-0005UN-7i; Tue, 26 May 2026 04:19:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0b-0005RU-M9 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:30 -0400 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 1wRn0Z-0007lA-Jo for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:29 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-580-W7jRnSlzPu-pzaj6jrupkg-1; Tue, 26 May 2026 04:19:22 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 24F021956088; Tue, 26 May 2026 08:19:21 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A2401180056E; Tue, 26 May 2026 08:19:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783567; 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=CyaVP63uw41aQRZ1cguSKQ8Eh0uX5EWMSBBwc7dF8BQ=; b=CaYcOBLBtid88wh+zXPQxLFZM1ZCVABuFCknREyKSyTxkjKOMWmf+dXrDu+/pXij5fOjbo +DELR44naJHkjRnC/MhRm6FUVY91S9UkNqMrL8Qq2hzYyUvHl9ekHMhKZ5uAP7ZApfjEOU es3W2yi+CL3AHsfsAzKCsFF5B+34t0k= X-MC-Unique: W7jRnSlzPu-pzaj6jrupkg-1 X-Mimecast-MFC-AGG-ID: W7jRnSlzPu-pzaj6jrupkg_1779783561 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 14/37] docs/system/arm/aspeed: Add AST1040 Bridge IC evaluation board Date: Tue, 26 May 2026 10:18:25 +0200 Message-ID: <20260526081848.651835-15-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783657768154100 From: Jamin Lin Update the Aspeed AST10x0 documentation to include the AST1040 evaluation board and clarify the AST10x0 family classification. The documentation now describes: - AST1030 and AST1040 as Bridge IC devices - AST1060 as a Platform Root of Trust processor - AST1040 Cortex-M4F CPU frequency running at 400 MHz Also add the ast1040-evb machine entry to the supported AST10x0 SoC based machine list. Signed-off-by: Jamin Lin Reviewed-by: C=C3=A9dric Le Goater Link: https://lore.kernel.org/qemu-devel/20260525053036.3305181-10-jamin_li= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- docs/system/arm/aspeed.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/system/arm/aspeed.rst b/docs/system/arm/aspeed.rst index a2eccf54892d..2d51ceeb8443 100644 --- a/docs/system/arm/aspeed.rst +++ b/docs/system/arm/aspeed.rst @@ -441,18 +441,26 @@ Use ``tio`` or another terminal emulator to connect t= o the consoles: $ tio /dev/pts/57 =20 =20 -Aspeed MiniBMC and Platform Root of Trust processor family boards (``ast10= 30-evb``, ``ast1060-evb``) -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D +Aspeed Bridge IC and Platform Root of Trust processor family boards (``ast= 1030-evb``, ``ast1040-evb``, ``ast1060-evb``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 -The QEMU Aspeed machines model mini BMCs and Platform Root of Trust proces= sors of various Aspeed -evaluation boards. They are based on different releases of the Aspeed SoC = : the AST1030 (MiniBMC) -and AST1060 (Platform Root of Trust Processor), both integrating an Arm Co= rtex M4F CPU (200MHz). +The QEMU Aspeed machines model Bridge ICs and Platform Root of Trust proce= ssors +of various Aspeed evaluation boards. They are based on different members of +the Aspeed AST10x0 SoC family: + +- AST1030 : Bridge IC +- AST1040 : Bridge IC +- AST1060 : Platform Root of Trust processor + +The AST1030 and AST1060 integrate an Arm Cortex-M4F CPU running at 200 MHz. +The AST1040 integrates an Arm Cortex-M4F CPU running at 400 MHz. =20 The SoC comes with SRAM, SPI, I2C, etc. =20 AST10x0 SoC based machines : =20 - ``ast1030-evb`` Aspeed AST1030 Evaluation board (Cortex-M4F) +- ``ast1040-evb`` Aspeed AST1040 Evaluation board (Cortex-M4F) - ``ast1060-evb`` Aspeed AST1060 Evaluation board (Cortex-M4F) =20 Supported devices --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783646; cv=none; d=zohomail.com; s=zohoarc; b=XPv196RyXQght2h1tH7xbjhYkFaGIKeCnDbL5d138aaDzY/l1Qw7CgnZbcyYKdPtyEx2u2CTAlk2gHzVl0NUdXPXeFKnMQ1aEWCyMlQyurxxH6W88141540hlAF0NrH+I0dlSrdFDLNZLGLmjNeGmlQW10PUld2gXU9lgIxbg/M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783646; 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=Rs1GiuulTGAv8k3bjh/h1igrVI4gOhusMUZtlPfsJhk=; b=l9YG1xpX2vZf8ckVcMt/u+72pr/seZUPvOL+RNk14rSR9mOB2Ull9tES4p+0g4xm1bqm9NvOyMeECqIrOp6G8jmoD930nqbWeLPp32OS4zsmro5IsQgBys9lmQKdFiu/e9fmaPI94NeuT+bK93NeOew79sphBwH84YE91BQDFxE= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783646601754.3411176275044; Tue, 26 May 2026 01:20:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0u-0005X8-5F; Tue, 26 May 2026 04:19:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0e-0005Td-LM for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:34 -0400 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 1wRn0d-0007lu-8J for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:32 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-22rEAoP0OeCQBDcRA3G3nA-1; Tue, 26 May 2026 04:19:24 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 55C7B18005B3; Tue, 26 May 2026 08:19:23 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 973C0180056E; Tue, 26 May 2026 08:19:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783570; 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=Rs1GiuulTGAv8k3bjh/h1igrVI4gOhusMUZtlPfsJhk=; b=fzur+hG+OFl8lBLojIKMukP44v3scOjYD9uwSbnbPUPmb5CLnInCwKoH52P9cA4brUcC89 CPMP9Pb2LiAxwd5PS946KmSzwvFRxeWn+k5lypuF/g9NDcapCg1dD2txXDBlJ3bDAnRSzO UlP7ZSoMZE8fQR6UShya1aq+W/GnW68= X-MC-Unique: 22rEAoP0OeCQBDcRA3G3nA-1 X-Mimecast-MFC-AGG-ID: 22rEAoP0OeCQBDcRA3G3nA_1779783563 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 15/37] hw/misc/aspeed_pwm: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:26 +0200 Message-ID: <20260526081848.651835-16-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-0.001, SPF_PASS=-0.001 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: qemu development 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: 1779783647736154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane-Chen-AS Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-2-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_pwm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_pwm.c b/hw/misc/aspeed_pwm.c index ee3d5884be22..673a0f1346f0 100644 --- a/hw/misc/aspeed_pwm.c +++ b/hw/misc/aspeed_pwm.c @@ -65,9 +65,9 @@ static const MemoryRegionOps aspeed_pwm_ops =3D { }, }; =20 -static void aspeed_pwm_reset(DeviceState *dev) +static void aspeed_pwm_reset_hold(Object *obj, ResetType type) { - struct AspeedPWMState *s =3D ASPEED_PWM(dev); + AspeedPWMState *s =3D ASPEED_PWM(obj); =20 memset(s->regs, 0, sizeof(s->regs)); } @@ -98,9 +98,10 @@ static const VMStateDescription vmstate_aspeed_pwm =3D { static void aspeed_pwm_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_pwm_realize; - device_class_set_legacy_reset(dc, aspeed_pwm_reset); + rc->phases.hold =3D aspeed_pwm_reset_hold; dc->desc =3D "Aspeed PWM Controller"; dc->vmsd =3D &vmstate_aspeed_pwm; } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783744; cv=none; d=zohomail.com; s=zohoarc; b=Cmbn+YiN14THVwNHIMyBrRp8BpSFk/fVlNodI5dgCmAH+2pMz+0Fr9h540RC7QRymCkqIBkLF6kzz9axayv9ZNGwMzJHp6Tg0d3fsgYbuOUqIM0bfjnY+1wivj2S+oBp/M8LRFGk7jDh2hPo7pO6AGL12Y7501eEnxyLAlXKoU4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783744; 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=cTwgf1J+6VJ/GIyAISjrd9Aw3fFT8/2a6+CR3dAfHc8=; b=P02fRED95ADGv6bavNzrZqif7W9Q8lGK5pby+tBKOShlo6rTL2hrVJB1aWXTknNv8FnEEs86npubA7o+e3Sw7qjlRGd8ZW0fLOzpx2MFiRzTIaJ57oRCKFjMzKykIiHqTl7ux9moTsBgEC3AdSgNgBGhCZNtrFS0Qngyrx1Pegg= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783744036234.2746143143729; Tue, 26 May 2026 01:22:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0x-0005Z9-Q9; Tue, 26 May 2026 04:19:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0e-0005TO-EL for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:34 -0400 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 1wRn0c-0007lo-Sf for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:32 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-L-Dtm7K4PJWXxFmJj0zHaw-1; Tue, 26 May 2026 04:19:26 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A327A1956053; Tue, 26 May 2026 08:19:25 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C7DC21800357; Tue, 26 May 2026 08:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783570; 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=cTwgf1J+6VJ/GIyAISjrd9Aw3fFT8/2a6+CR3dAfHc8=; b=Y8XGmVi6nFyrI+uk1h4cX5haHl0jL/n7fIzm4U/T8hSbeLjN+IK8IXRiH4hi943COh12uN m6ssLk8LAJIbrp2e3iy9m+VidBO+yFR/izbZWsuO39I6EcQAk9PAVV0MTJAV8YrW1/3JPO XCCXLxarJnRsUzsx/+GWFSM/70bqZ40= X-MC-Unique: L-Dtm7K4PJWXxFmJj0zHaw-1 X-Mimecast-MFC-AGG-ID: L-Dtm7K4PJWXxFmJj0zHaw_1779783565 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 16/37] hw/misc/aspeed_peci: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:27 +0200 Message-ID: <20260526081848.651835-17-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783745120154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-3-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_peci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_peci.c b/hw/misc/aspeed_peci.c index 0569ee57d1fa..7469f82fad19 100644 --- a/hw/misc/aspeed_peci.c +++ b/hw/misc/aspeed_peci.c @@ -123,9 +123,9 @@ static void aspeed_peci_realize(DeviceState *dev, Error= **errp) sysbus_init_irq(sbd, &s->irq); } =20 -static void aspeed_peci_reset(DeviceState *dev) +static void aspeed_peci_reset_hold(Object *obj, ResetType type) { - AspeedPECIState *s =3D ASPEED_PECI(dev); + AspeedPECIState *s =3D ASPEED_PECI(obj); =20 memset(s->regs, 0, sizeof(s->regs)); } @@ -133,9 +133,10 @@ static void aspeed_peci_reset(DeviceState *dev) static void aspeed_peci_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_peci_realize; - device_class_set_legacy_reset(dc, aspeed_peci_reset); + rc->phases.hold =3D aspeed_peci_reset_hold; dc->desc =3D "Aspeed PECI Controller"; } =20 --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783810; cv=none; d=zohomail.com; s=zohoarc; b=E9pxAnotHJwgNa0E8BGMcY4ugByPRwk8/1lO86oMdojMvqz011L31YZUm5x/Cl7FXnWY8RM9cpSjvecJLX2YKZpOQNTLs/R/yUtpyiE0UcM5JJVbjaOHsZWY09HpAww+BUGJlLEWSjL6w0FtpJh7GDGKHzg0LEgrhC560KYe/HU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783810; 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=ZyRVmGnrNvnGVo1aN8QoAL7XFUp9wCzrhcQDpiUE1Qs=; b=in1fXOzK4ccvkp44kj4YOGpvbf9bVF9n1501YWNpPQ3Mjc6RPKZxhMillTFE8S+5Ey34SagYqxGxCvgM7GB4N66xCYreLSuZ5SoD2Cbs7uGX9CJ/ZkmcfuTjIfpHZ43fvT3bJCHVWUvz/2JuMUq7EbjbemE6FLk84Ex2fiZ8eoU= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783810479595.8211814234825; Tue, 26 May 2026 01:23:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0z-0005aM-5e; Tue, 26 May 2026 04:19:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0h-0005To-Fq for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:36 -0400 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 1wRn0g-0007pm-24 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:35 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-Oi-myXdvNaS3KH1DuAm6Ww-1; Tue, 26 May 2026 04:19:28 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D3D1418002F1; Tue, 26 May 2026 08:19:27 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2255F180056E; Tue, 26 May 2026 08:19:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783573; 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=ZyRVmGnrNvnGVo1aN8QoAL7XFUp9wCzrhcQDpiUE1Qs=; b=RJad9ps5NiFyrv3bIU8G2u45ZoeaVrQ7Bvy7FzN3KYPOVuc3E2qsPEadII/SfsZAM/Uywo nTGonwrT6HpasvLwnBTmrnZTJJPX7CNtD4ElxxqGz0CyIoj9ScB2eSnJKxIOn9xe/AsgPn dQoa2pqJj3+oxOZqsszYy9suNEUmB5g= X-MC-Unique: Oi-myXdvNaS3KH1DuAm6Ww-1 X-Mimecast-MFC-AGG-ID: Oi-myXdvNaS3KH1DuAm6Ww_1779783567 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 17/37] hw/misc/aspeed_hace: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:28 +0200 Message-ID: <20260526081848.651835-18-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779783810864158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-4-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_hace.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index a322905cb37b..4c9e913f6c66 100644 --- a/hw/misc/aspeed_hace.c +++ b/hw/misc/aspeed_hace.c @@ -624,9 +624,9 @@ static const MemoryRegionOps aspeed_hace_ops =3D { }, }; =20 -static void aspeed_hace_reset(DeviceState *dev) +static void aspeed_hace_reset_hold(Object *obj, ResetType type) { - struct AspeedHACEState *s =3D ASPEED_HACE(dev); + AspeedHACEState *s =3D ASPEED_HACE(obj); AspeedHACEClass *ahc =3D ASPEED_HACE_GET_CLASS(s); =20 if (s->hash_ctx !=3D NULL) { @@ -687,10 +687,11 @@ static void aspeed_hace_unrealize(DeviceState *dev) static void aspeed_hace_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_hace_realize; dc->unrealize =3D aspeed_hace_unrealize; - device_class_set_legacy_reset(dc, aspeed_hace_reset); + rc->phases.hold =3D aspeed_hace_reset_hold; device_class_set_props(dc, aspeed_hace_properties); dc->vmsd =3D &vmstate_aspeed_hace; } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779784006; cv=none; d=zohomail.com; s=zohoarc; b=QQr5V5ywCkT/ENBwffApqo2tiDLXbMf2b8tkzqSgmypIuVUv+be3C5r0xkimk0mJdfIOMz9KVgnwMRj98q6h2Nwo8T7mLiRcgWktZmLDV1ovs2mUlztop7ymLcEBkgVWwQAlG+KquLz0PLxxMCyaK0vg5F5EwYynSUImQ1Um1nI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779784006; 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=bS7rxvtohKHPAQPZPBhGugcovi5Pw9w4A8+8QFhy8uM=; b=A0FlQMmqCOTeh5XJr5s6Ihl3uSHvIXtrOIO5CHSCYmcf6pM1jYuebHyHC/PhjLWa6qCtYw1XUrRA2ZAqIT5UO6tXau8OsYexK1aVHfNzMMOUNZi0wWo96R6QnMuasY20ukuvo6Vdm01XTMddMREBcKU2fUZhhC8S7zPxz6nhs9Q= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779784006950538.3271899008968; Tue, 26 May 2026 01:26:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0v-0005XR-HB; Tue, 26 May 2026 04:19:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0k-0005V9-5M for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:39 -0400 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 1wRn0i-0007uA-Kr for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:37 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-56-7XX_J_aPM3mFQic8dJiCHQ-1; Tue, 26 May 2026 04:19:31 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1248F195608E; Tue, 26 May 2026 08:19:30 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 543431800357; Tue, 26 May 2026 08:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783576; 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=bS7rxvtohKHPAQPZPBhGugcovi5Pw9w4A8+8QFhy8uM=; b=CGbZlKUBqSqvVwXLcUaipraNl0CFoCgTBrjs/vdDzTD9W8U9rvTnGBh5PaxdBeFe+dvQA1 Je70nuh+uEWI2b4Mx0+nwX7RGGelD5JMPXV+x50x2MdszSMA/Ds65LG4H7QuJAH/J6P4jE s+nAEbdLKl4TahvbhhXq5praw/n1GLM= X-MC-Unique: 7XX_J_aPM3mFQic8dJiCHQ-1 X-Mimecast-MFC-AGG-ID: 7XX_J_aPM3mFQic8dJiCHQ_1779783570 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 18/37] hw/misc/aspeed_sbc: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:29 +0200 Message-ID: <20260526081848.651835-19-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779784009303154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-5-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_sbc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_sbc.c b/hw/misc/aspeed_sbc.c index e5dab1c7bb7c..6125d2f134e8 100644 --- a/hw/misc/aspeed_sbc.c +++ b/hw/misc/aspeed_sbc.c @@ -261,9 +261,9 @@ static const MemoryRegionOps aspeed_sbc_ops =3D { }, }; =20 -static void aspeed_sbc_reset(DeviceState *dev) +static void aspeed_sbc_reset_hold(Object *obj, ResetType type) { - struct AspeedSBCState *s =3D ASPEED_SBC(dev); + AspeedSBCState *s =3D ASPEED_SBC(obj); =20 memset(s->regs, 0, sizeof(s->regs)); =20 @@ -330,9 +330,10 @@ static const Property aspeed_sbc_properties[] =3D { static void aspeed_sbc_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_sbc_realize; - device_class_set_legacy_reset(dc, aspeed_sbc_reset); + rc->phases.hold =3D aspeed_sbc_reset_hold; dc->vmsd =3D &vmstate_aspeed_sbc; device_class_set_props(dc, aspeed_sbc_properties); } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779784039; cv=none; d=zohomail.com; s=zohoarc; b=dKMHgHKNIyRDBWx8gD0DWPewYn4YF57+je2lWU1gsQekdRaUGnOVStjC/oXy9D4t4LhlT5LDgDR1UtersXrsDvHQCHNnlq9HA0qSd3y7o48oEe4lrU0VpyqakCocLhMpu8oU6IaY0QoQQBq85BrpLd23LtesNDh2/QN6dvUDIIY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779784039; 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=62fXpGFEzN7ecT2Aa1RSAiGPJvlFQxz9MHAABa6W9Rg=; b=SwwBY9sYopiLcFHvmHQ9/dZdEWpImcRqAE0uRmNvcpQwYogbXmLW3xxxNkgHpa3Fa8Ryc9bveU3N3K7sQznl3jKa40dGwM1eMaRR1bxPireJ80gws+YeUBtlRy/2dc+3Qzo1VbvR//6o/2gr0S9igNhKtwjRmpkadpltawkqh0Y= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779784039975622.6591259338379; Tue, 26 May 2026 01:27:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn15-0005ev-6t; Tue, 26 May 2026 04:19:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0l-0005VH-PY for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0j-0007wE-UP for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:39 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-551-1ei3KDQoOZeZnV-8glxpNg-1; Tue, 26 May 2026 04:19:33 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 430CE19560B2; Tue, 26 May 2026 08:19:32 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 85A5E1800577; Tue, 26 May 2026 08:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783577; 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=62fXpGFEzN7ecT2Aa1RSAiGPJvlFQxz9MHAABa6W9Rg=; b=MLFqbPNA5Xz+t9qz7hvP5to5bLAdvKCK7h9/lFTMXEhnOicD4lwnOpZyrnru+mu0RxovC/ HpKOR4dIG3BxBWyoHwkLudi1Q+ve8z4omqTvgIptuanAaesD0RIcxTALD3YrCIcdVKQ9oY 4bxI3qxCoSeKA1hInjYWOJzRdkHTaTk= X-MC-Unique: 1ei3KDQoOZeZnV-8glxpNg-1 X-Mimecast-MFC-AGG-ID: 1ei3KDQoOZeZnV-8glxpNg_1779783572 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 19/37] hw/misc/aspeed_xdma: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:30 +0200 Message-ID: <20260526081848.651835-20-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779784043771154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-6-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_xdma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_xdma.c b/hw/misc/aspeed_xdma.c index 3e2beafcedfb..80b32593336c 100644 --- a/hw/misc/aspeed_xdma.c +++ b/hw/misc/aspeed_xdma.c @@ -129,9 +129,9 @@ static void aspeed_xdma_realize(DeviceState *dev, Error= **errp) sysbus_init_mmio(sbd, &xdma->iomem); } =20 -static void aspeed_xdma_reset(DeviceState *dev) +static void aspeed_xdma_reset_hold(Object *obj, ResetType type) { - AspeedXDMAState *xdma =3D ASPEED_XDMA(dev); + AspeedXDMAState *xdma =3D ASPEED_XDMA(obj); AspeedXDMAClass *axc =3D ASPEED_XDMA_GET_CLASS(xdma); =20 xdma->bmc_cmdq_readp_set =3D 0; @@ -220,9 +220,10 @@ static const TypeInfo aspeed_2400_xdma_info =3D { static void aspeed_xdma_class_init(ObjectClass *classp, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(classp); + ResettableClass *rc =3D RESETTABLE_CLASS(classp); =20 dc->realize =3D aspeed_xdma_realize; - device_class_set_legacy_reset(dc, aspeed_xdma_reset); + rc->phases.hold =3D aspeed_xdma_reset_hold; dc->vmsd =3D &aspeed_xdma_vmstate; } =20 --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783910; cv=none; d=zohomail.com; s=zohoarc; b=me9tx4FsFp2lRBfhgwzr+RkmhZWB3mcgb0TvIuS52gQl7AH+WF24jta+uPqeKX1hX9td4hCQcyeyJMMiP+hQfORHUVoy363tNBYY34/mKUBk2qOJmx4X+wgwjEw+hGu+itnlj5pPl2xW1sMgMHO1gxdLBro8yn38ycZCXFIkFSw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783910; 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=Aw65fdKEGXApZ8i+29RcYoETsBo9oKGZoBtpJu+eUws=; b=hYvIliMZdFPuoB7PZBBCNkxtky+Bssg9c7PnNdqyZ1TPtBDssdyboL10VBTkwkSNMIZOgM9gX2/iYruiKaqLJ9XUgXWv+EUPs9tYItOZ//c9bNH3GSV6q7peXOgoqy/K8nqWFL+lF2KUdQa3DwkqcZlZ90ojrmasTvNDm5suqOo= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783910873966.0704434480893; Tue, 26 May 2026 01:25:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0y-0005ZZ-BT; Tue, 26 May 2026 04:19:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0o-0005Vg-Aj for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:43 -0400 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 1wRn0m-0007xo-VB for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:42 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-5DPUHQwnPUWfAOFV7bw7fg-1; Tue, 26 May 2026 04:19:35 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7671A19560B7; Tue, 26 May 2026 08:19:34 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B6F141800577; Tue, 26 May 2026 08:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783579; 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=Aw65fdKEGXApZ8i+29RcYoETsBo9oKGZoBtpJu+eUws=; b=UiXlbwbVjZLIJgHdYQbJweGNzzIAtlqc1BrBO+6GHqw9Ji+SpPvOOWrlvkVGQLUar+a5Ox oa4d3DpbxS2Fbo42hbJHn7PE3aB1BVJJZQMFbm4a3U3bJdKo5JgBKvFGHuPZ1f+Gx8oUkz Fr4UHY5GCLO0yPHDEs7HInjxwg/ne3w= X-MC-Unique: 5DPUHQwnPUWfAOFV7bw7fg-1 X-Mimecast-MFC-AGG-ID: 5DPUHQwnPUWfAOFV7bw7fg_1779783574 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 20/37] hw/misc/aspeed_lpc: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:31 +0200 Message-ID: <20260526081848.651835-21-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783911321158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-7-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_lpc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_lpc.c b/hw/misc/aspeed_lpc.c index 68f0f6334bc3..f69c48da125c 100644 --- a/hw/misc/aspeed_lpc.c +++ b/hw/misc/aspeed_lpc.c @@ -384,9 +384,9 @@ static const MemoryRegionOps aspeed_lpc_ops =3D { }, }; =20 -static void aspeed_lpc_reset(DeviceState *dev) +static void aspeed_lpc_reset_hold(Object *obj, ResetType type) { - struct AspeedLPCState *s =3D ASPEED_LPC(dev); + AspeedLPCState *s =3D ASPEED_LPC(obj); =20 s->subdevice_irqs_pending =3D 0; =20 @@ -461,9 +461,10 @@ static const Property aspeed_lpc_properties[] =3D { static void aspeed_lpc_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_lpc_realize; - device_class_set_legacy_reset(dc, aspeed_lpc_reset); + rc->phases.hold =3D aspeed_lpc_reset_hold; dc->desc =3D "Aspeed LPC Controller", dc->vmsd =3D &vmstate_aspeed_lpc; device_class_set_props(dc, aspeed_lpc_properties); --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783718; cv=none; d=zohomail.com; s=zohoarc; b=XzwHcqaWiIzbSG2PkdyU9PwkFyT/EUuxFJVds8cTlCF4/h0FXsHzSorGr/UWtgxFvSzQypaGNNK8Ywh8bqq5wn9suWICC1OoxdAoG/YQey88m0v8MUr7grVIxrN72RGF3HfHixmgUOiFRPK1LUjii2AMWo+9vqc5o2oz6HnEGvA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783718; 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=gb28ja1ucqIZVYvC5RV6pk6ujAMhjB1kNORkPPT5Yj8=; b=n4MJmTdS0dHHFI4xIAZDnllME8E5cTd2N+0MX6px7yjwQAaTZf80Mnt9+dpKYpjSLKqfQnR3aNxUp6BOd2frEuMaspQSNC10APdIVdZjQSouKJJ097TcbUD8IgAgvh5t+PXleN2HjGn0MDGDp4/QLqVxbudgTuY8e1O28CZV8OE= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783718280118.57714696916719; Tue, 26 May 2026 01:21:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn0z-0005am-Bk; Tue, 26 May 2026 04:19:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0r-0005WW-2G for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0p-0007yb-CX for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:44 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-139-xXNHSh02MaaMk3GrVTgoLA-1; Tue, 26 May 2026 04:19:37 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A8F0718005B8; Tue, 26 May 2026 08:19:36 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E96FA1800357; Tue, 26 May 2026 08:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783582; 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=gb28ja1ucqIZVYvC5RV6pk6ujAMhjB1kNORkPPT5Yj8=; b=B0I3PENQkWaPxk/JyJmryj3nIsfuhmONr9kRdu+e8hmOdmBWnDl92GWvYC8C4Ffgl2LaMm qImZaZyHv3yl8aiL6j99M52SRiLHZ/I4PZ8eQRxFIfwP0QgMZe9yfRSXOOBD0oDkHriTKP Z+5hsafhVvg8wAT6a5D1XLWbud882Ak= X-MC-Unique: xXNHSh02MaaMk3GrVTgoLA-1 X-Mimecast-MFC-AGG-ID: xXNHSh02MaaMk3GrVTgoLA_1779783576 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 21/37] hw/misc/aspeed_sdmc: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:32 +0200 Message-ID: <20260526081848.651835-22-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779783720308158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-8-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_sdmc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c index 59b4a9a42647..055abf7f50f0 100644 --- a/hw/misc/aspeed_sdmc.c +++ b/hw/misc/aspeed_sdmc.c @@ -199,9 +199,9 @@ static const MemoryRegionOps aspeed_sdmc_ops =3D { .valid.max_access_size =3D 4, }; =20 -static void aspeed_sdmc_reset(DeviceState *dev) +static void aspeed_sdmc_reset_hold(Object *obj, ResetType type) { - AspeedSDMCState *s =3D ASPEED_SDMC(dev); + AspeedSDMCState *s =3D ASPEED_SDMC(obj); AspeedSDMCClass *asc =3D ASPEED_SDMC_GET_CLASS(s); =20 memset(s->regs, 0, sizeof(s->regs)); @@ -302,8 +302,9 @@ static const Property aspeed_sdmc_properties[] =3D { static void aspeed_sdmc_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); dc->realize =3D aspeed_sdmc_realize; - device_class_set_legacy_reset(dc, aspeed_sdmc_reset); + rc->phases.hold =3D aspeed_sdmc_reset_hold; dc->desc =3D "ASPEED SDRAM Memory Controller"; dc->vmsd =3D &vmstate_aspeed_sdmc; device_class_set_props(dc, aspeed_sdmc_properties); @@ -560,9 +561,9 @@ static const TypeInfo aspeed_2600_sdmc_info =3D { .class_init =3D aspeed_2600_sdmc_class_init, }; =20 -static void aspeed_2700_sdmc_reset(DeviceState *dev) +static void aspeed_2700_sdmc_reset_hold(Object *obj, ResetType type) { - AspeedSDMCState *s =3D ASPEED_SDMC(dev); + AspeedSDMCState *s =3D ASPEED_SDMC(obj); AspeedSDMCClass *asc =3D ASPEED_SDMC_GET_CLASS(s); =20 memset(s->regs, 0, sizeof(s->regs)); @@ -676,10 +677,11 @@ static const uint64_t static void aspeed_2700_sdmc_class_init(ObjectClass *klass, const void *da= ta) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedSDMCClass *asc =3D ASPEED_SDMC_CLASS(klass); =20 dc->desc =3D "ASPEED 2700 SDRAM Memory Controller"; - device_class_set_legacy_reset(dc, aspeed_2700_sdmc_reset); + rc->phases.hold =3D aspeed_2700_sdmc_reset_hold; =20 asc->is_bus64bit =3D true; asc->max_ram_size =3D 8 * GiB; --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783638; cv=none; d=zohomail.com; s=zohoarc; b=cHw9xBJn0x1+Ot/TtWhnBsf5jePI5PatfWokXGKpfizKxxM7iXfEwJxygEC1bXOjmuKSZK0F6hDYfUeJ2DURj4paSqS0kwHOst7HnObr5N3+CFW5eCkRY8wqnswKPYNDzdhzMWTRww5Px1Xxc9mjmN1rzqMzhqjmNbYKIka82wI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783638; 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=xpWglAaYDX5VZ5D1owjf88VBRiED1GxTE8Bt/hsgKDU=; b=djG/+jNnIRQlXJngUEYSphC7lBQ6VwBbmIJrKahPSdtJatwmOcVRWQyVgCgEUqWlb2Qs8oNh3wUz6xq+dBJIPvUASWlDzfQ6P1uipS59iTbf7DoTg7eC29wQ2tm6YTocFd58t5ci/9rLQZeqWUIoPnm203JebOIpAjjHQktA558= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783638589930.4592465933807; Tue, 26 May 2026 01:20:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn19-0005jX-4v; Tue, 26 May 2026 04:20:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0u-0005XL-8k for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:48 -0400 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 1wRn0r-0007yw-3U for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:47 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-18-6Gc6MrdvP4aj4CjsQFz3Bg-1; Tue, 26 May 2026 04:19:40 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DB62A18002F0; Tue, 26 May 2026 08:19:38 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 278BE1800267; Tue, 26 May 2026 08:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783584; 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=xpWglAaYDX5VZ5D1owjf88VBRiED1GxTE8Bt/hsgKDU=; b=K8qREpatwSereLn0VGNRtn/rtXAiwAeR6tjXq9TGKYVOiCbKdE0ZD7oNgJ04j0U1CNCoQr YeiOqNWSJuCmu3kiaA39FquzHIrX+uv6FaFjurOFfBNWpbsF/BM79lcCa8XSayZx0Kfyud ZaLszY759CiSKQuKj1MjV2pa4BInqOA= X-MC-Unique: 6Gc6MrdvP4aj4CjsQFz3Bg-1 X-Mimecast-MFC-AGG-ID: 6Gc6MrdvP4aj4CjsQFz3Bg_1779783579 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 22/37] hw/misc/aspeed_scu: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:33 +0200 Message-ID: <20260526081848.651835-23-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779783641810154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-9-kane_chen= @aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_scu.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index c9b73a114805..19da6c075fae 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -542,10 +542,10 @@ static uint32_t aspeed_2600_scu_calc_hpll(AspeedSCUSt= ate *s, uint32_t hpll_reg) return clkin * multiplier; } =20 -static void aspeed_scu_reset(DeviceState *dev) +static void aspeed_scu_reset_hold(Object *obj, ResetType type) { - AspeedSCUState *s =3D ASPEED_SCU(dev); - AspeedSCUClass *asc =3D ASPEED_SCU_GET_CLASS(dev); + AspeedSCUState *s =3D ASPEED_SCU(obj); + AspeedSCUClass *asc =3D ASPEED_SCU_GET_CLASS(obj); =20 memcpy(s->regs, asc->resets, asc->nr_regs * 4); s->regs[SILICON_REV] =3D s->silicon_rev; @@ -616,8 +616,9 @@ static const Property aspeed_scu_properties[] =3D { static void aspeed_scu_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); dc->realize =3D aspeed_scu_realize; - device_class_set_legacy_reset(dc, aspeed_scu_reset); + rc->phases.hold =3D aspeed_scu_reset_hold; dc->desc =3D "ASPEED System Control Unit"; dc->vmsd =3D &vmstate_aspeed_scu; device_class_set_props(dc, aspeed_scu_properties); @@ -822,10 +823,10 @@ static const uint32_t ast2600_a3_resets[ASPEED_AST260= 0_SCU_NR_REGS] =3D { [AST2600_CHIP_ID1] =3D 0x88884444, }; =20 -static void aspeed_ast2600_scu_reset(DeviceState *dev) +static void aspeed_ast2600_scu_reset_hold(Object *obj, ResetType type) { - AspeedSCUState *s =3D ASPEED_SCU(dev); - AspeedSCUClass *asc =3D ASPEED_SCU_GET_CLASS(dev); + AspeedSCUState *s =3D ASPEED_SCU(obj); + AspeedSCUClass *asc =3D ASPEED_SCU_GET_CLASS(obj); =20 memcpy(s->regs, asc->resets, asc->nr_regs * 4); =20 @@ -844,10 +845,11 @@ static void aspeed_ast2600_scu_reset(DeviceState *dev) static void aspeed_2600_scu_class_init(ObjectClass *klass, const void *dat= a) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedSCUClass *asc =3D ASPEED_SCU_CLASS(klass); =20 dc->desc =3D "ASPEED 2600 System Control Unit"; - device_class_set_legacy_reset(dc, aspeed_ast2600_scu_reset); + rc->phases.hold =3D aspeed_ast2600_scu_reset_hold; asc->resets =3D ast2600_a3_resets; asc->calc_hpll =3D aspeed_2600_scu_calc_hpll; asc->get_apb =3D aspeed_2600_scu_get_apb_freq; @@ -950,10 +952,10 @@ static const uint32_t ast2700_a0_resets[ASPEED_AST270= 0_SCU_NR_REGS] =3D { [AST2700_SCU_VGA_SCRATCH_0] =3D 0x00000040, }; =20 -static void aspeed_ast2700_scu_reset(DeviceState *dev) +static void aspeed_ast2700_scu_reset_hold(Object *obj, ResetType type) { - AspeedSCUState *s =3D ASPEED_SCU(dev); - AspeedSCUClass *asc =3D ASPEED_SCU_GET_CLASS(dev); + AspeedSCUState *s =3D ASPEED_SCU(obj); + AspeedSCUClass *asc =3D ASPEED_SCU_GET_CLASS(obj); =20 memcpy(s->regs, asc->resets, asc->nr_regs * 4); s->regs[AST2700_SILICON_REV] =3D s->silicon_rev; @@ -963,10 +965,11 @@ static void aspeed_ast2700_scu_reset(DeviceState *dev) static void aspeed_2700_scu_class_init(ObjectClass *klass, const void *dat= a) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedSCUClass *asc =3D ASPEED_SCU_CLASS(klass); =20 dc->desc =3D "ASPEED 2700 System Control Unit"; - device_class_set_legacy_reset(dc, aspeed_ast2700_scu_reset); + rc->phases.hold =3D aspeed_ast2700_scu_reset_hold; asc->resets =3D ast2700_a0_resets; asc->calc_hpll =3D aspeed_2600_scu_calc_hpll; asc->get_apb =3D aspeed_2700_scu_get_apb_freq; @@ -1082,10 +1085,11 @@ static const uint32_t ast2700_a0_resets_io[ASPEED_A= ST2700_SCU_NR_REGS] =3D { static void aspeed_2700_scuio_class_init(ObjectClass *klass, const void *d= ata) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedSCUClass *asc =3D ASPEED_SCU_CLASS(klass); =20 dc->desc =3D "ASPEED 2700 System Control Unit I/O"; - device_class_set_legacy_reset(dc, aspeed_ast2700_scu_reset); + rc->phases.hold =3D aspeed_ast2700_scu_reset_hold; asc->resets =3D ast2700_a0_resets_io; asc->calc_hpll =3D aspeed_2600_scu_calc_hpll; asc->get_apb =3D aspeed_2700_scuio_get_apb_freq; @@ -1123,10 +1127,10 @@ static const uint32_t ast1030_a1_resets[ASPEED_AST2= 600_SCU_NR_REGS] =3D { [AST2600_CHIP_ID1] =3D 0x0BADCAFE, }; =20 -static void aspeed_ast1030_scu_reset(DeviceState *dev) +static void aspeed_ast1030_scu_reset_hold(Object *obj, ResetType type) { - AspeedSCUState *s =3D ASPEED_SCU(dev); - AspeedSCUClass *asc =3D ASPEED_SCU_GET_CLASS(dev); + AspeedSCUState *s =3D ASPEED_SCU(obj); + AspeedSCUClass *asc =3D ASPEED_SCU_GET_CLASS(obj); =20 memcpy(s->regs, asc->resets, asc->nr_regs * 4); =20 @@ -1140,10 +1144,11 @@ static void aspeed_ast1030_scu_reset(DeviceState *d= ev) static void aspeed_1030_scu_class_init(ObjectClass *klass, const void *dat= a) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedSCUClass *asc =3D ASPEED_SCU_CLASS(klass); =20 dc->desc =3D "ASPEED 1030 System Control Unit"; - device_class_set_legacy_reset(dc, aspeed_ast1030_scu_reset); + rc->phases.hold =3D aspeed_ast1030_scu_reset_hold; asc->resets =3D ast1030_a1_resets; asc->calc_hpll =3D aspeed_2600_scu_calc_hpll; asc->get_apb =3D aspeed_1030_scu_get_apb_freq; --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779784033; cv=none; d=zohomail.com; s=zohoarc; b=KWFhC13Araskm/J0fCee1+QR8GmRkD2MVCE61w59sxc0teBdip/xX4lrHlQehaIPzitkISDXTfFjUQ4ATfFQSCrjLReq8WsDFX8eG9ncV1DOmEPpFEAhqYaVcbDlY8Y9QPDj9zCZAOe6oJIsclP/quwoEzI/ZLoTZmp7QtYyK/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779784033; 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=14mRsPRZK2QqrpEXjGl3a+l1x3Aqq07PIKVHurU1EBw=; b=P0Z2KXAQ+GgRxVCXN4NliIvXhI9zPWmtqwt68HlWeIwKAn0to0poYQEGniVsp/H1y3ObUzLctB+OYD9i1QcaZvMxIeKNadAvB5Qh9mvzSN76nyjf1aEUddkD8YPf1gT0RgON1dNaqI3sTsacWToOmgdOuE5I0IxGjxe2ahc9378= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779784033743570.5583186874164; Tue, 26 May 2026 01:27:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn16-0005gA-4H; Tue, 26 May 2026 04:20:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0s-0005Wl-6y for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0q-0007yp-Na for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:45 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-651-mRfgIzcfO1m4RMB5T1HVpw-1; Tue, 26 May 2026 04:19:42 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 368F019560B0; Tue, 26 May 2026 08:19:41 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5AC181800357; Tue, 26 May 2026 08:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783584; 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=14mRsPRZK2QqrpEXjGl3a+l1x3Aqq07PIKVHurU1EBw=; b=DbwknZeoUO0B255oUz7GENJSr2FPthFxiELS0SMIRoGE5pdFg+tcxOWB1WWyHGjxb6CSIf V9L/1b8QumsMHYLiW3luL2Fup3Mm0uu8ym8hszc/a/Jd1YLXUF+QpgJL/LAYGJp0Qx/T24 j2aP0bkFoxYSE67kZW/JUx0k31SAzt0= X-MC-Unique: mRfgIzcfO1m4RMB5T1HVpw-1 X-Mimecast-MFC-AGG-ID: mRfgIzcfO1m4RMB5T1HVpw_1779783581 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 23/37] hw/misc/aspeed_ltpi: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:34 +0200 Message-ID: <20260526081848.651835-24-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779784035640154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-10-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/misc/aspeed_ltpi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/aspeed_ltpi.c b/hw/misc/aspeed_ltpi.c index 131cea9c6b8b..956e91d14361 100644 --- a/hw/misc/aspeed_ltpi.c +++ b/hw/misc/aspeed_ltpi.c @@ -112,9 +112,9 @@ static const MemoryRegionOps aspeed_ltpi_ctrl_ops =3D { }, }; =20 -static void aspeed_ltpi_reset(DeviceState *dev) +static void aspeed_ltpi_reset_hold(Object *obj, ResetType type) { - AspeedLTPIState *s =3D ASPEED_LTPI(dev); + AspeedLTPIState *s =3D ASPEED_LTPI(obj); =20 memset(s->ctrl_regs, 0, sizeof(s->ctrl_regs)); memset(s->phy_regs, 0, sizeof(s->phy_regs)); @@ -173,9 +173,10 @@ static void aspeed_ltpi_realize(DeviceState *dev, Erro= r **errp) static void aspeed_ltpi_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); dc->realize =3D aspeed_ltpi_realize; dc->vmsd =3D &vmstate_aspeed_ltpi; - device_class_set_legacy_reset(dc, aspeed_ltpi_reset); + rc->phases.hold =3D aspeed_ltpi_reset_hold; } =20 static const TypeInfo aspeed_ltpi_info =3D { --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783994; cv=none; d=zohomail.com; s=zohoarc; b=D4fx42vXTtuOfw4Vqh23wdPmGAks2Ay9Md34CDIRWUQn0nSRqbaqynbMHms1+Ap5I2TTNZDFjrXezfebSTesLrDKmE/349oS+FeHRStv8YrcuhN5WzFsajO89qId8oI4ifuVbhmFVoVaQHB8HcGFY4KtdPHeNaasYOO9i+a9mbA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783994; 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=fCgznlD0h4aDrCL60FtGy8ty0eINfhTz603sGwzZIJc=; b=dJOSsOiQxPtODR83mZa2qJ4XwM6r9T4mRIEEq2M/t2ne+PN4RM3o/U0IGDdA5Nddi0FtJi0wWcujMG71DbTj5hWBQ+Toe6AtpqZY3fhg2jYe5WAQB2dj7KAg+7ASibI3K3UvxIgaIpEkepEv2jaBta/JzasDT30HgfzpSCGKSJo= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783994211635.3838569638631; Tue, 26 May 2026 01:26:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1E-0005oP-Ma; Tue, 26 May 2026 04:20:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0w-0005YF-3S for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0u-0007zZ-2b for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:49 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-GSV4cJANMpefHJTkI8bM9w-1; Tue, 26 May 2026 04:19:44 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6865F18005B3; Tue, 26 May 2026 08:19:43 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AA76B180075B; Tue, 26 May 2026 08:19:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783586; 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=fCgznlD0h4aDrCL60FtGy8ty0eINfhTz603sGwzZIJc=; b=hOqT5Rar9TIdRRt7WLnvyo0SgIB7CyoG3kmb9o6ucvh6npA02wzW2ByzaSZsOOMsBeco/C EEFR1Car3aDukauoQ4dcqhCbD+yRxVb7U2CQAot2nYLSOHLbykFVhVR26ZKHP6fxbcXUnN Wn93zbSKp86tPyMHLR1VpWWesvYBC5A= X-MC-Unique: GSV4cJANMpefHJTkI8bM9w-1 X-Mimecast-MFC-AGG-ID: GSV4cJANMpefHJTkI8bM9w_1779783583 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 24/37] hw/pci-host/aspeed_pcie: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:35 +0200 Message-ID: <20260526081848.651835-25-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779783995112154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-11-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/pci-host/aspeed_pcie.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/hw/pci-host/aspeed_pcie.c b/hw/pci-host/aspeed_pcie.c index c150496f7b9c..186e5aeea298 100644 --- a/hw/pci-host/aspeed_pcie.c +++ b/hw/pci-host/aspeed_pcie.c @@ -613,9 +613,9 @@ static void aspeed_pcie_cfg_instance_init(Object *obj) return; } =20 -static void aspeed_pcie_cfg_reset(DeviceState *dev) +static void aspeed_pcie_cfg_reset_hold(Object *obj, ResetType type) { - AspeedPCIECfgState *s =3D ASPEED_PCIE_CFG(dev); + AspeedPCIECfgState *s =3D ASPEED_PCIE_CFG(obj); AspeedPCIECfgClass *apc =3D ASPEED_PCIE_CFG_GET_CLASS(s); =20 memset(s->regs, 0, apc->nr_regs << 2); @@ -663,12 +663,13 @@ static const Property aspeed_pcie_cfg_props[] =3D { static void aspeed_pcie_cfg_class_init(ObjectClass *klass, const void *dat= a) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedPCIECfgClass *apc =3D ASPEED_PCIE_CFG_CLASS(klass); =20 dc->desc =3D "ASPEED PCIe Config"; dc->realize =3D aspeed_pcie_cfg_realize; dc->unrealize =3D aspeed_pcie_cfg_unrealize; - device_class_set_legacy_reset(dc, aspeed_pcie_cfg_reset); + rc->phases.hold =3D aspeed_pcie_cfg_reset_hold; device_class_set_props(dc, aspeed_pcie_cfg_props); =20 apc->reg_ops =3D &aspeed_pcie_cfg_ops; @@ -870,9 +871,9 @@ static const MemoryRegionOps aspeed_pcie_phy_ops =3D { }, }; =20 -static void aspeed_pcie_phy_reset(DeviceState *dev) +static void aspeed_pcie_phy_reset_hold(Object *obj, ResetType type) { - AspeedPCIEPhyState *s =3D ASPEED_PCIE_PHY(dev); + AspeedPCIEPhyState *s =3D ASPEED_PCIE_PHY(obj); AspeedPCIEPhyClass *apc =3D ASPEED_PCIE_PHY_GET_CLASS(s); =20 memset(s->regs, 0, apc->nr_regs << 2); @@ -913,12 +914,13 @@ static const Property aspeed_pcie_phy_props[] =3D { static void aspeed_pcie_phy_class_init(ObjectClass *klass, const void *dat= a) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedPCIEPhyClass *apc =3D ASPEED_PCIE_PHY_CLASS(klass); =20 dc->desc =3D "ASPEED PCIe Phy"; dc->realize =3D aspeed_pcie_phy_realize; dc->unrealize =3D aspeed_pcie_phy_unrealize; - device_class_set_legacy_reset(dc, aspeed_pcie_phy_reset); + rc->phases.hold =3D aspeed_pcie_phy_reset_hold; device_class_set_props(dc, aspeed_pcie_phy_props); =20 apc->nr_regs =3D 0x100 >> 2; @@ -932,9 +934,9 @@ static const TypeInfo aspeed_pcie_phy_info =3D { .class_size =3D sizeof(AspeedPCIEPhyClass), }; =20 -static void aspeed_2700_pcie_phy_reset(DeviceState *dev) +static void aspeed_2700_pcie_phy_reset_hold(Object *obj, ResetType type) { - AspeedPCIEPhyState *s =3D ASPEED_PCIE_PHY(dev); + AspeedPCIEPhyState *s =3D ASPEED_PCIE_PHY(obj); AspeedPCIEPhyClass *apc =3D ASPEED_PCIE_PHY_GET_CLASS(s); =20 memset(s->regs, 0, apc->nr_regs << 2); @@ -950,10 +952,11 @@ static void aspeed_2700_pcie_phy_class_init(ObjectCla= ss *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedPCIEPhyClass *apc =3D ASPEED_PCIE_PHY_CLASS(klass); =20 dc->desc =3D "ASPEED AST2700 PCIe Phy"; - device_class_set_legacy_reset(dc, aspeed_2700_pcie_phy_reset); + rc->phases.hold =3D aspeed_2700_pcie_phy_reset_hold; =20 apc->nr_regs =3D 0x800 >> 2; } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783792; cv=none; d=zohomail.com; s=zohoarc; b=DLno5yLVTU1YVFkDK2jlnnFU8ejfS8BYiORu/uIzdEp/MQ353IrwzdtTGOIa5rhC620GqnqhbFbHp9e0btZlMq0SE+E7ZYLhDUxLK7ogSl5rJn4EZ3s1RuLZQ1JbiAA5ZDJHvQG/gEezoaAmsYQG6eH1W24JNi7gXUuA7OA/+TE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783792; 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=ArNYbH4AId59IPV/W8Pm6esd+JQiuWJyDsRXydgTNZA=; b=K5ziCFC4DUGeJ19CDpUx9+J1bA+BS8DBMfx8/r+Vamr55ifl2+eRCKKFVChAjlVP9Nr6MiFaRstaEK4ITaJHCf9OQih9/SssYPYbIy9P7Q2QeKrqpHCDSqDTpjoo/0m3Wa/r5Uz1gk10DlEGoeJpe37wa2pEdPAE97p9uruaaO8= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783792644401.70785542122405; Tue, 26 May 2026 01:23:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1X-0006OK-2Z; Tue, 26 May 2026 04:20:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn0z-0005bI-P1 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:53 -0400 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 1wRn0x-00080S-0i for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:53 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-296-3U3aUu32OZCo9Z7GzGMLsw-1; Tue, 26 May 2026 04:19:46 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9A3CF1956048; Tue, 26 May 2026 08:19:45 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DC3981800357; Tue, 26 May 2026 08:19:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783590; 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=ArNYbH4AId59IPV/W8Pm6esd+JQiuWJyDsRXydgTNZA=; b=i29i919G4k9M0ApdOWj8KgEuDsVt+QM0CRg/ArinoulKFOqViQt7wLTYXgrgpt2TppcAMi JDb4vh6GmVSpgHhpiI1LW+P2QRZXZE7enDoXdkGc6+Jo/uy3Ws3qsda+HAQsjCQZmSsg2u ic4tfYYMRKAMh+dKuPQ5x4b2Magsxms= X-MC-Unique: 3U3aUu32OZCo9Z7GzGMLsw-1 X-Mimecast-MFC-AGG-ID: 3U3aUu32OZCo9Z7GzGMLsw_1779783585 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 25/37] hw/timer/aspeed_timer: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:36 +0200 Message-ID: <20260526081848.651835-26-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783793876154101 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-12-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/timer/aspeed_timer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c index 1e954f7aec5c..69f5c89215c5 100644 --- a/hw/timer/aspeed_timer.c +++ b/hw/timer/aspeed_timer.c @@ -834,10 +834,10 @@ static void aspeed_timer_realize(DeviceState *dev, Er= ror **errp) sysbus_init_mmio(sbd, &s->iomem); } =20 -static void aspeed_timer_reset(DeviceState *dev) +static void aspeed_timer_reset_hold(Object *obj, ResetType type) { int i; - AspeedTimerCtrlState *s =3D ASPEED_TIMER(dev); + AspeedTimerCtrlState *s =3D ASPEED_TIMER(obj); =20 for (i =3D 0; i < ASPEED_TIMER_NR_TIMERS; i++) { AspeedTimer *t =3D &s->timers[i]; @@ -898,9 +898,10 @@ static const Property aspeed_timer_properties[] =3D { static void timer_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_timer_realize; - device_class_set_legacy_reset(dc, aspeed_timer_reset); + rc->phases.hold =3D aspeed_timer_reset_hold; dc->desc =3D "ASPEED Timer"; dc->vmsd =3D &vmstate_aspeed_timer_state; device_class_set_props(dc, aspeed_timer_properties); --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783845; cv=none; d=zohomail.com; s=zohoarc; b=NjOli74VJmX9pkItVVZYlks6kaTZCxdqIwqky4iVdZ53fgUg3jE7cZmRwQk/mIaDyeKXm0uqSpOnGTqsie9n+dNtRaES3NYmGqdsmQ4Ckr73Z64QA0YQvrEpZscfE9W4JBYpNYP01L0P2YaNT1UEGWpe60AkW6+9pbcK+/1cDaU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783845; 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=qM/NdvodWsHYXC/PMwTqcyWIIfMgpVYY3ClrJtVS6Wg=; b=cvxIGAvafOnw1jOhuf7ReMr9I3SwVQ2FWUMvjdZVgJ4s3xsPbR9GfZlM6cW2jaaEE2WRR1WD0Vb277Zy2Tbs/Ly24NE+Wou5mLeOHwjSLW2mDHyFTOvxAtDiPMQnro1ko9oDnPUfrNhoYRNo+LtMMiUOUd8/6gcNgoGYlz0ahK0= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783845072352.0174213589147; Tue, 26 May 2026 01:24:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1Y-0006Uw-KH; Tue, 26 May 2026 04:20:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn11-0005bk-7S for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:56 -0400 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 1wRn0z-00081P-Fb for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:54 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-434-gc5OedO5PrmKiVH2ouzvsA-1; Tue, 26 May 2026 04:19:48 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CD8CB18002E0; Tue, 26 May 2026 08:19:47 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1A03D1800577; Tue, 26 May 2026 08:19:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783592; 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=qM/NdvodWsHYXC/PMwTqcyWIIfMgpVYY3ClrJtVS6Wg=; b=jCniGPuJ4Tv8AI+yjgKxyj/Wgx0JDkatnxZ4BbXmi7qF1zmi24fk4qaKsgEm9lrq+Xatre zHN9s4nN720QavJAPhd0pmvlIU3JJbPRzBgLm++02NIuc2TvUXKonjt3wDnRRG+G+vynb0 zFP2aXpYKjNxrE6KpdpItMGYRdkr4a0= X-MC-Unique: gc5OedO5PrmKiVH2ouzvsA-1 X-Mimecast-MFC-AGG-ID: gc5OedO5PrmKiVH2ouzvsA_1779783587 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 26/37] hw/gpio/aspeed_gpio: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:37 +0200 Message-ID: <20260526081848.651835-27-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-0.001, SPF_PASS=-0.001 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: qemu development 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: 1779783846863158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-13-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/gpio/aspeed_gpio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c index 7d0f87e90c39..ef321b738620 100644 --- a/hw/gpio/aspeed_gpio.c +++ b/hw/gpio/aspeed_gpio.c @@ -1430,9 +1430,9 @@ static const MemoryRegionOps aspeed_gpio_2700_ops =3D= { .valid.max_access_size =3D 4, }; =20 -static void aspeed_gpio_reset(DeviceState *dev) +static void aspeed_gpio_reset_hold(Object *obj, ResetType type) { - AspeedGPIOState *s =3D ASPEED_GPIO(dev); + AspeedGPIOState *s =3D ASPEED_GPIO(obj); =20 /* TODO: respect the reset tolerance registers */ memset(s->sets, 0, sizeof(s->sets)); @@ -1533,9 +1533,10 @@ static const VMStateDescription vmstate_aspeed_gpio = =3D { static void aspeed_gpio_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_gpio_realize; - device_class_set_legacy_reset(dc, aspeed_gpio_reset); + rc->phases.hold =3D aspeed_gpio_reset_hold; dc->desc =3D "Aspeed GPIO Controller"; dc->vmsd =3D &vmstate_aspeed_gpio; } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779784043; cv=none; d=zohomail.com; s=zohoarc; b=CT50Up+Q2qb7O+10bdRyuHqJeVzXgcnTzy9AJ0HRXAcXHbKmJRjMCDc7LzWCHftjJpZwsAubW2kwHnfMwkVF6zj0Y2VsvKzWijs2TEtI+GoRdcm2Csiy1wd9GCgKthdFZbiijK3xE6OWVgYWo4SYqkpUhRLW78Oj/uhEb98AI/M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779784043; 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=H9geWdZ6SUx1UdW9pgwB4vpoDhZAR3fB3PM9kZd1U+E=; b=b0IJDDVifEqofKstNuYiyTGe0eJxZCuE50PDnJIe9KP+FnFyFSqufx8LMGnXqigJOEl3/1I0olIeAa7PstJNxbfu1gmshbJnH/teO3nh8ZKO1bw2Jepaj+1PuFu1S+Ubn2UY9YReGO17DsCE8TmvP7hyc2UEaaO3M7Rqd9e9OdQ= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779784043543400.04907926824376; Tue, 26 May 2026 01:27:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn15-0005g8-T8; Tue, 26 May 2026 04:19:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn10-0005bc-Th for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:56 -0400 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 1wRn0z-00081N-6r for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:54 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-40DIUiIQM66-q-ALW7H59g-1; Tue, 26 May 2026 04:19:51 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0AAEF18002CB; Tue, 26 May 2026 08:19:50 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4B8C1180075B; Tue, 26 May 2026 08:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783592; 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=H9geWdZ6SUx1UdW9pgwB4vpoDhZAR3fB3PM9kZd1U+E=; b=KQmnroq2lTJzgLs8O1r5usyK/QawgnHb1PB7OygbPt+/oemH4IeDK0hqJv6TT4y4W2qLHA jADfCMPp+jdYHs6V+PUN2H1kl+K3bdU1aPPAFdqOsJ04R/U9Hohkc6lD+GD2B501BovA2c PyP7GhMyPVmYBa4MF0N78AhOMUGKMyc= X-MC-Unique: 40DIUiIQM66-q-ALW7H59g-1 X-Mimecast-MFC-AGG-ID: 40DIUiIQM66-q-ALW7H59g_1779783590 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 27/37] hw/sd/aspeed_sdhci: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:38 +0200 Message-ID: <20260526081848.651835-28-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779784043901158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-14-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/sd/aspeed_sdhci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sd/aspeed_sdhci.c b/hw/sd/aspeed_sdhci.c index 6684f8221a35..d93093c4df97 100644 --- a/hw/sd/aspeed_sdhci.c +++ b/hw/sd/aspeed_sdhci.c @@ -182,9 +182,9 @@ static void aspeed_sdhci_realize(DeviceState *dev, Erro= r **errp) } } =20 -static void aspeed_sdhci_reset(DeviceState *dev) +static void aspeed_sdhci_reset_hold(Object *obj, ResetType type) { - AspeedSDHCIState *sdhci =3D ASPEED_SDHCI(dev); + AspeedSDHCIState *sdhci =3D ASPEED_SDHCI(obj); =20 memset(sdhci->regs, 0, ASPEED_SDHCI_REG_SIZE); =20 @@ -211,9 +211,10 @@ static const Property aspeed_sdhci_properties[] =3D { static void aspeed_sdhci_class_init(ObjectClass *classp, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(classp); + ResettableClass *rc =3D RESETTABLE_CLASS(classp); =20 dc->realize =3D aspeed_sdhci_realize; - device_class_set_legacy_reset(dc, aspeed_sdhci_reset); + rc->phases.hold =3D aspeed_sdhci_reset_hold; dc->vmsd =3D &vmstate_aspeed_sdhci; device_class_set_props(dc, aspeed_sdhci_properties); } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783659; cv=none; d=zohomail.com; s=zohoarc; b=MQx+Uy8erfYQfmuF7En40gZXS8o853C437E3intG7AMbYnOLyc3PxqSIq7hxgPgIMQ8fueqKvwljzSldfg2trI9natlFh/O/x/hsttTbFyu4wCsAtPWHbdt/FkVGfrKsnU/m270w1Pw3tii5G9pqyYtTYI2B1iElfdYT4zDh4XU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783659; 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=CTtkjOCxz+xtM8Lt8wBYOXT0nVoUoD9iqR3gZHc3YVo=; b=cKncCpVSFre4zdwPufm0pJZekf2Qc6QO7FHIbPEdh846BOkC7mda2fxmpWiROYk/ur8Gusf6plAku8Hpp7JSqliBnya+MpnojpL07xjcgm/wFBSMH2ju1YgS7EP4kOex9mpv5MnQg+Nx1EizrLPI5oxs6ZbFZyaGXRKxrtds3Fs= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783659625986.8411210815644; Tue, 26 May 2026 01:20:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn19-0005mG-Qx; Tue, 26 May 2026 04:20:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn16-0005gB-3d for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn14-00086X-Bt for qemu-devel@nongnu.org; Tue, 26 May 2026 04:19:59 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-519-LFhJrDAKOfKdYG60GPArTA-1; Tue, 26 May 2026 04:19:53 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3CC69180034A; Tue, 26 May 2026 08:19:52 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7D4BB180056E; Tue, 26 May 2026 08:19:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783597; 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=CTtkjOCxz+xtM8Lt8wBYOXT0nVoUoD9iqR3gZHc3YVo=; b=IGyr178Di5Q1YMbS20mhBGv0+BXMTRlMYSxyJ5Udnx7EaACKCmwcPT/GH7wSE7blkPide2 KQ7vPJcXEcnnjfqw8y5M19wiUiY9rqAaGK/rso3cPv7sfhAd9aLU3QZe/m7xg4o2fPRY1Z ISeK9EsBAvhk3XMr86RVwqBWZktiMMo= X-MC-Unique: LFhJrDAKOfKdYG60GPArTA-1 X-Mimecast-MFC-AGG-ID: LFhJrDAKOfKdYG60GPArTA_1779783592 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 28/37] hw/ssi/aspeed_smc: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:39 +0200 Message-ID: <20260526081848.651835-29-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.29 Precedence: list List-Id: qemu development 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: 1779783660031158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-15-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/ssi/aspeed_smc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index f0deeea996c3..3767ad0c7a3e 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -713,9 +713,9 @@ static void aspeed_smc_flash_update_ctrl(AspeedSMCFlash= *fl, uint32_t value) } } =20 -static void aspeed_smc_reset(DeviceState *d) +static void aspeed_smc_reset_hold(Object *obj, ResetType type) { - AspeedSMCState *s =3D ASPEED_SMC(d); + AspeedSMCState *s =3D ASPEED_SMC(obj); AspeedSMCClass *asc =3D ASPEED_SMC_GET_CLASS(s); int i; =20 @@ -1304,9 +1304,10 @@ static const Property aspeed_smc_properties[] =3D { static void aspeed_smc_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_smc_realize; - device_class_set_legacy_reset(dc, aspeed_smc_reset); + rc->phases.hold =3D aspeed_smc_reset_hold; device_class_set_props(dc, aspeed_smc_properties); dc->vmsd =3D &vmstate_aspeed_smc; } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783646; cv=none; d=zohomail.com; s=zohoarc; b=mmeiHspTLpJhmPNJZVkqbG9nD+HHfRnyhCsL5sOXhToMnJZKnXsMBTE7Knboi6EH+w2NakQMc5zosaiGMOvE2Vx2pyc7TacSuBaASaQ+LGTnxzYlypa5S87sHvUkMTJ9pMtw9HiyovOYI60FIIAlNDTL+v3KNl2/znAWd1xBF3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783646; 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=CNR+v2xJbWUIaPMe4qgACVmR6FI8fj3yQqtNT+oBfbg=; b=dA4U3232yjJAiAguG9V39F8XbsngR9spi6qYZN/7zUaHADzl2f5Uoi5mJLfulnyrY7ZXa/pJWBuiJJ83OqLo9k6UK23+/OyPxRtpu7i7Vq3hZKCMAAxeBBmpbYOeyc4xWR4GSRVN+tOXxfH25nCVw9NP5BcYM+y2gbn6HHDpT7g= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783646916355.94528993010897; Tue, 26 May 2026 01:20:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1Y-0006St-Ag; Tue, 26 May 2026 04:20:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn18-0005h3-06 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn16-00086q-EX for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:01 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-59-G8bw92EVM86X2fS9LJvmQA-1; Tue, 26 May 2026 04:19:55 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8489F1956058; Tue, 26 May 2026 08:19:54 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AF679180056E; Tue, 26 May 2026 08:19:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783599; 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=CNR+v2xJbWUIaPMe4qgACVmR6FI8fj3yQqtNT+oBfbg=; b=jSrVLsM6NFhyBNmhb7VBAmAmOG4QfmXPDljIICatnVoT6Y54iIUhJwc2GRc4qjw5M2wAOz o3QapetpgxD2LdUxab1QbUzNXw51ZHuNwBgrvtLkPb6xhw6sXxCuaCRhY23IaS719Na+wd DAMj+3rVxH3wg0VGso5PwAGH3eBeRfw= X-MC-Unique: G8bw92EVM86X2fS9LJvmQA-1 X-Mimecast-MFC-AGG-ID: G8bw92EVM86X2fS9LJvmQA_1779783594 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 29/37] hw/intc/aspeed_vic: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:40 +0200 Message-ID: <20260526081848.651835-30-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783647756154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-16-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/intc/aspeed_vic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/intc/aspeed_vic.c b/hw/intc/aspeed_vic.c index b0a9a3970552..13d8423d835a 100644 --- a/hw/intc/aspeed_vic.c +++ b/hw/intc/aspeed_vic.c @@ -291,9 +291,9 @@ static const MemoryRegionOps aspeed_vic_ops =3D { .valid.unaligned =3D false, }; =20 -static void aspeed_vic_reset(DeviceState *dev) +static void aspeed_vic_reset_hold(Object *obj, ResetType type) { - AspeedVICState *s =3D ASPEED_VIC(dev); + AspeedVICState *s =3D ASPEED_VIC(obj); =20 s->level =3D 0; s->raw =3D 0; @@ -342,8 +342,9 @@ static const VMStateDescription vmstate_aspeed_vic =3D { static void aspeed_vic_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); dc->realize =3D aspeed_vic_realize; - device_class_set_legacy_reset(dc, aspeed_vic_reset); + rc->phases.hold =3D aspeed_vic_reset_hold; dc->desc =3D "ASPEED Interrupt Controller (New)"; dc->vmsd =3D &vmstate_aspeed_vic; } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783955; cv=none; d=zohomail.com; s=zohoarc; b=Er3oQbbp1NblFCK3niac5gXRA1eO4bagjTrd0BU6C1eC7w/j61YJr4JDPQ0fwONZbw8POA6/K39HNRvz5vVjdqpTp92QN5flIULref5YIy24uYY5pJG7F3qVCUH6CDYKzzq5ZXWBXm2USlIDqgoCpfbVK8qQqppHxZcX15z1tSg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783955; 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=Ra5wuvWUGCMJ11x8BdsPZvQImTaq3ZoVqRRB2z5dPX8=; b=E/SOojdMba+zobmQju5piPBJBzOQv/0jJxTznXvJICUKAYKPItNhl++5j8UoKcKgS2db67IQmb29xcnxNGtIHNzYDRfrmtwic5bYMAaVdAY3E7GxjdBhuB7fgW6MNrMi+GsTVcmOBe5gul6F0j4hh8URWouoXM6G+CcwZbUdGmQ= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783955794746.9747855065771; Tue, 26 May 2026 01:25:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1b-0006fU-5N; Tue, 26 May 2026 04:20:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1D-0005pM-4x for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:08 -0400 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 1wRn1A-00088o-T3 for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:06 -0400 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-158-NUokxBExNneSbYdDzMejhg-1; Tue, 26 May 2026 04:19:57 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A0332195608D; Tue, 26 May 2026 08:19:56 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E16731800357; Tue, 26 May 2026 08:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783602; 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=Ra5wuvWUGCMJ11x8BdsPZvQImTaq3ZoVqRRB2z5dPX8=; b=Q7f/mR+GNmKqwJqtFgq/2DFreuNfoyOkBtlRCSOBZiNt8PA+Ezkk+GHOd9GCzObf0yPGUE Vp5YbQWVrwzd1u7PM3KLlYRZd25dn0QTZn9c3BKKBekldEKwTRmShP35myiyum3qx5Y91G F19an/AWVjW8v4hI6u8ooBKXzliv2s8= X-MC-Unique: NUokxBExNneSbYdDzMejhg-1 X-Mimecast-MFC-AGG-ID: NUokxBExNneSbYdDzMejhg_1779783596 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 30/37] hw/intc/aspeed_intc: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:41 +0200 Message-ID: <20260526081848.651835-31-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783957697158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-17-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/intc/aspeed_intc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/intc/aspeed_intc.c b/hw/intc/aspeed_intc.c index 52f2f946d59e..389280943091 100644 --- a/hw/intc/aspeed_intc.c +++ b/hw/intc/aspeed_intc.c @@ -692,9 +692,9 @@ static void aspeed_intc_instance_init(Object *obj) } } =20 -static void aspeed_intc_reset(DeviceState *dev) +static void aspeed_intc_reset_hold(Object *obj, ResetType type) { - AspeedINTCState *s =3D ASPEED_INTC(dev); + AspeedINTCState *s =3D ASPEED_INTC(obj); AspeedINTCClass *aic =3D ASPEED_INTC_GET_CLASS(s); =20 memset(s->regs, 0, aic->nr_regs << 2); @@ -746,12 +746,13 @@ static void aspeed_intc_unrealize(DeviceState *dev) static void aspeed_intc_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); AspeedINTCClass *aic =3D ASPEED_INTC_CLASS(klass); =20 dc->desc =3D "ASPEED INTC Controller"; dc->realize =3D aspeed_intc_realize; dc->unrealize =3D aspeed_intc_unrealize; - device_class_set_legacy_reset(dc, aspeed_intc_reset); + rc->phases.hold =3D aspeed_intc_reset_hold; dc->vmsd =3D NULL; =20 aic->reg_ops =3D &aspeed_intc_ops; --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783832; cv=none; d=zohomail.com; s=zohoarc; b=YBwMPi2Pz79AHmopQHdGqgTETdhA8UPIOf4HDxY0zNr9ZQWiJmW6to12AKlzZCZcAQIlRDpk6CNJOaiQByGtACyWU3lEWzGDHYjd7Z4kI3v3/KECIageWCvHPjEN2qvAVNT2UWH0E/6KSa1/15jz297BjyNUs619eLPhvRB5+wA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783832; 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=kZIgNaP/z4JcrQB/kcoUTBVDabVpUlUR46Tv7Yeawvs=; b=HXUripRlUz7NLHECYhGUZ/x0KC1u9YaDMI7up1198/vAeuZADhadcCNHEtd3bJaSDfmfiqRCXtr+yAc3zrEUJxJh7P9IkDgRbWgb7YMLoVr4aBrfvYOrub5OQORW0Xrg1Q06hL6jJW8MaGJZiK+puEFZXLozlpKODx/hLw9ZnvE= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783832967881.0259417775015; Tue, 26 May 2026 01:23:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1c-0006lz-Cx; Tue, 26 May 2026 04:20:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1D-0005ps-Qf for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:08 -0400 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 1wRn1A-000894-UI for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:07 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-608-ORDEsMSsM-epRHQj92L46Q-1; Tue, 26 May 2026 04:20:00 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EE2DF19560B4; Tue, 26 May 2026 08:19:58 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1EC7B1800357; Tue, 26 May 2026 08:19:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783603; 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=kZIgNaP/z4JcrQB/kcoUTBVDabVpUlUR46Tv7Yeawvs=; b=dio7TLUlvunQ7YijCRnhLZ1NXDUDx0I8NQM+VxQxBAL7iDXM8IKnkyYOKsuRdxYBR3pEpg tscG8nZOVS8prsPGPnQUWT6OsmLBBWfeJVGxSUWM2V0zPRQpWDtm9ipT9G6/gkm0EaggaO a4gHXcFxeq4ObmViByj8jBXQm0BW1Tc= X-MC-Unique: ORDEsMSsM-epRHQj92L46Q-1 X-Mimecast-MFC-AGG-ID: ORDEsMSsM-epRHQj92L46Q_1779783599 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 31/37] hw/i3c/aspeed_i3c: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:42 +0200 Message-ID: <20260526081848.651835-32-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783834807158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-18-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/i3c/aspeed_i3c.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i3c/aspeed_i3c.c b/hw/i3c/aspeed_i3c.c index bac8c55bb091..de61d67dfdee 100644 --- a/hw/i3c/aspeed_i3c.c +++ b/hw/i3c/aspeed_i3c.c @@ -162,9 +162,9 @@ I3CBus *aspeed_i3c_get_bus(AspeedI3CState *s, uint8_t b= us_num) g_assert_not_reached(); } =20 -static void aspeed_i3c_reset(DeviceState *dev) +static void aspeed_i3c_reset_hold(Object *obj, ResetType type) { - AspeedI3CState *s =3D ASPEED_I3C(dev); + AspeedI3CState *s =3D ASPEED_I3C(obj); memset(s->regs, 0, sizeof(s->regs)); } =20 @@ -238,9 +238,10 @@ static const VMStateDescription vmstate_aspeed_i3c =3D= { static void aspeed_i3c_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_i3c_realize; - device_class_set_legacy_reset(dc, aspeed_i3c_reset); + rc->phases.hold =3D aspeed_i3c_reset_hold; dc->desc =3D "Aspeed I3C Controller"; dc->vmsd =3D &vmstate_aspeed_i3c; } --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783651; cv=none; d=zohomail.com; s=zohoarc; b=PauuCYMSsKnGUcNSLNckGbOdApeqREfi2nNzTzCf2oaQdCyndpZZwopASdS9N/Al8T7/52sGeJcQ8XWoXg6JesUwNffWOS+ZkoZgDwaTl4a2sjvSV/EJQCOEeUze0Br3pPYlgiPh/GRbOX7dzeGA2ts5R2PWrcslpoZzISsgDmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783651; 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=mh8uk8O98sGKKsdKFs9tZfoYXDEU/HSSldFTkWwlD50=; b=i5g7JpubmX3yyhuGZ90nWUs4dKxhNlddaNphkKKZQbY+CtG1Kw/CzKrWUO7OtodtmnJz1tzuSmxizHQoLsOHtXRPJiUj0tGmN5Vhxalw5RKiYLQwmijeQ+NEdVTGInU5ouig3aDoQLkQzc78MOwufUs5iUOGPExy9LA9UD7QIAY= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783651579967.4871684544353; Tue, 26 May 2026 01:20:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1Z-0006a2-Si; Tue, 26 May 2026 04:20:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1G-0005rJ-Lr for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1F-0008C8-0f for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:10 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-121-xP7oUhyAOyS5-UX1N_wYKQ-1; Tue, 26 May 2026 04:20:02 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2B1EA180047F; Tue, 26 May 2026 08:20:01 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6D0131800357; Tue, 26 May 2026 08:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783608; 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=mh8uk8O98sGKKsdKFs9tZfoYXDEU/HSSldFTkWwlD50=; b=O1wgsQX0f5z9CoURtWGJBVguGslAFoOH1xbGguHiUCztyS+1pYVpc6LPAiX9IBgX0E31CS zuep6AfYdtqlZgxPaycexQdbRViok4UdXDuWgSAIgNPL0FrjuAoyJaOmlZMBZEXJPBPKKU e42zgErPMj6gVNtN6vOfF2cYz8GtAV0= X-MC-Unique: xP7oUhyAOyS5-UX1N_wYKQ-1 X-Mimecast-MFC-AGG-ID: xP7oUhyAOyS5-UX1N_wYKQ_1779783601 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 32/37] hw/watchdog/wdt_aspeed: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:43 +0200 Message-ID: <20260526081848.651835-33-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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: qemu development 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: 1779783652252158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-19-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/watchdog/wdt_aspeed.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/watchdog/wdt_aspeed.c b/hw/watchdog/wdt_aspeed.c index 26506f3c33f9..ae411593c583 100644 --- a/hw/watchdog/wdt_aspeed.c +++ b/hw/watchdog/wdt_aspeed.c @@ -247,9 +247,9 @@ static const MemoryRegionOps aspeed_wdt_ops =3D { .valid.unaligned =3D false, }; =20 -static void aspeed_wdt_reset(DeviceState *dev) +static void aspeed_wdt_reset_hold(Object *obj, ResetType type) { - AspeedWDTState *s =3D ASPEED_WDT(dev); + AspeedWDTState *s =3D ASPEED_WDT(obj); AspeedWDTClass *awc =3D ASPEED_WDT_GET_CLASS(s); =20 s->regs[WDT_STATUS] =3D awc->default_status; @@ -310,10 +310,11 @@ static const Property aspeed_wdt_properties[] =3D { static void aspeed_wdt_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->desc =3D "ASPEED Watchdog Controller"; dc->realize =3D aspeed_wdt_realize; - device_class_set_legacy_reset(dc, aspeed_wdt_reset); + rc->phases.hold =3D aspeed_wdt_reset_hold; set_bit(DEVICE_CATEGORY_WATCHDOG, dc->categories); dc->vmsd =3D &vmstate_aspeed_wdt; device_class_set_props(dc, aspeed_wdt_properties); --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783955; cv=none; d=zohomail.com; s=zohoarc; b=A8Dg6bNIIdAfvrP6fQI9CTDotW7MnppENS8t1PJZskqBAVnK7Of8RCng4to6LrnJMD6UNsh+Z4hs3TL7hrfPH3C6UkUXrtNCWEIdDZz03qsJE6cU8nvUfeMzzyr5aQG3BMQvpd3Zseeh18q19XjMdfVuGb2iMlEC+LOtuos7plw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783955; 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=vxt9/kOpjBY3Tyx41ZaMqB7n8sh4/A1mKGT/vjjNipU=; b=aOSQdpuucyl1bVsxPlcElwmQp/1BuFkS72VOO1TIX5nTRtZw6SGEVLtM9Jl4apmXI46ll1ZpG07Fz1AJzHGd89zhKWnu5b+v/r+dDH29tifz18x9gKoLAqvhrf4JyunfdiziaQhOesVoM/aQDtsMUvaU7z2tq2XdiijpyBh3ZN8= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783955477475.95406799071964; Tue, 26 May 2026 01:25:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1b-0006gu-Co; Tue, 26 May 2026 04:20:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1H-0005sG-1X for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1F-0008CA-4m for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:10 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-xfH2I5WOPYyFKmL30q8jYA-1; Tue, 26 May 2026 04:20:04 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5AAA61956061; Tue, 26 May 2026 08:20:03 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9D0CE180056E; Tue, 26 May 2026 08:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783608; 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=vxt9/kOpjBY3Tyx41ZaMqB7n8sh4/A1mKGT/vjjNipU=; b=XfXRWrBm48HR9iFFeSdwhvC6fBDt6jrKJjDXA3HYPPzkrwZLnGCSw3RVzadgyDvCg2u0FC +NRa+YdYXHTFL7u0fqWPozv/RpXpUsWoECKFfcgYoQ0e8cdESeWXGHq04yjXGPVEzZL1eM 13mD+YF9+gdQ3/thQjYnttEhJ/Jyw8k= X-MC-Unique: xfH2I5WOPYyFKmL30q8jYA-1 X-Mimecast-MFC-AGG-ID: xfH2I5WOPYyFKmL30q8jYA_1779783603 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 33/37] hw/net/ftgmac100: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:44 +0200 Message-ID: <20260526081848.651835-34-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783956549154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-20-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/net/ftgmac100.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/net/ftgmac100.c b/hw/net/ftgmac100.c index b3da48c343c7..2bec817b9dec 100644 --- a/hw/net/ftgmac100.c +++ b/hw/net/ftgmac100.c @@ -723,9 +723,9 @@ static void ftgmac100_do_reset(FTGMAC100State *s, bool = sw_reset) phy_reset(s); } =20 -static void ftgmac100_reset(DeviceState *d) +static void ftgmac100_reset_hold(Object *obj, ResetType type) { - ftgmac100_do_reset(FTGMAC100(d), false); + ftgmac100_do_reset(FTGMAC100(obj), false); } =20 static uint64_t ftgmac100_read(void *opaque, hwaddr addr, unsigned size) @@ -1269,9 +1269,10 @@ static const Property ftgmac100_properties[] =3D { static void ftgmac100_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->vmsd =3D &vmstate_ftgmac100; - device_class_set_legacy_reset(dc, ftgmac100_reset); + rc->phases.hold =3D ftgmac100_reset_hold; device_class_set_props(dc, ftgmac100_properties); set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); dc->realize =3D ftgmac100_realize; @@ -1387,9 +1388,9 @@ static const MemoryRegionOps aspeed_mii_ops =3D { .endianness =3D DEVICE_LITTLE_ENDIAN, }; =20 -static void aspeed_mii_reset(DeviceState *dev) +static void aspeed_mii_reset_hold(Object *obj, ResetType type) { - AspeedMiiState *s =3D ASPEED_MII(dev); + AspeedMiiState *s =3D ASPEED_MII(obj); =20 s->phycr =3D 0; s->phydata =3D 0; @@ -1428,9 +1429,10 @@ static const Property aspeed_mii_properties[] =3D { static void aspeed_mii_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->vmsd =3D &vmstate_aspeed_mii; - device_class_set_legacy_reset(dc, aspeed_mii_reset); + rc->phases.hold =3D aspeed_mii_reset_hold; dc->realize =3D aspeed_mii_realize; dc->desc =3D "Aspeed MII controller"; device_class_set_props(dc, aspeed_mii_properties); --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783868; cv=none; d=zohomail.com; s=zohoarc; b=NPDVutIQWYhKXvTZKgbbIi0tV71HJqY7OzSb6JEITfmeXBYQAtlviRy4rg9VvC5neAK22Zkc+BifznQ8r0UzsCZRPfbU+Sy1NLH7N+sVR1kwhHzbTh5ygUdNvxkbmNFdOEW25srYi4SptY/ZOMC1p7BU4WfY/LOu2ypvHSRf+V4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783868; 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=81yuRk5BTo2jsqkuZt7x9ZDYXxHHocOZ3uwomcAb0Wk=; b=YPZxYiEEzHgKblfk8pxz0zsDjMU6h/NIzHpg4F/DtJcVlqTE8i4uvw8aoPok97/Eb4r1/K6bb1IcrCCCKGql59eFRgBJ89In5VD2LaV56b//BpseHVCsl+xPpfAY8+SoVhlaFI6aTP4Nr4izEkV514QR3tWblPMtSm5BMFIwU+0= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783868535457.9359875165659; Tue, 26 May 2026 01:24:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1e-00070Z-R3; Tue, 26 May 2026 04:20:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1K-0005ye-OH for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1H-0008Cl-Kp for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:13 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-649-pie4UaOnPGWiwfvG17yCFg-1; Tue, 26 May 2026 04:20:06 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8CC6219560B7; Tue, 26 May 2026 08:20:05 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CD3D1180056E; Tue, 26 May 2026 08:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783610; 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=81yuRk5BTo2jsqkuZt7x9ZDYXxHHocOZ3uwomcAb0Wk=; b=U4Uje5/pAdq8mqy2NQTf12SPPRTaoHZtshnD08/Hf6b78jmMiI6pN+wcKqETUcMfnOzTol MPxX+rx0HdjnEhsffFGk7nYrG0kqQt1PmMKt/DvSlVOwFopd9eGZ5D7OWOtLmkXz7A//zT N9BjePx+a1azZ6u5TigTMc+2bk/8Kvk= X-MC-Unique: pie4UaOnPGWiwfvG17yCFg-1 X-Mimecast-MFC-AGG-ID: pie4UaOnPGWiwfvG17yCFg_1779783605 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 34/37] hw/fsi/aspeed_apb2opb: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:45 +0200 Message-ID: <20260526081848.651835-35-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783868991158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-21-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/fsi/aspeed_apb2opb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/fsi/aspeed_apb2opb.c b/hw/fsi/aspeed_apb2opb.c index 058abc86452d..f2d9a9669ada 100644 --- a/hw/fsi/aspeed_apb2opb.c +++ b/hw/fsi/aspeed_apb2opb.c @@ -302,9 +302,9 @@ static void fsi_aspeed_apb2opb_realize(DeviceState *dev= , Error **errp) } } =20 -static void fsi_aspeed_apb2opb_reset(DeviceState *dev) +static void fsi_aspeed_apb2opb_reset_hold(Object *obj, ResetType type) { - AspeedAPB2OPBState *s =3D ASPEED_APB2OPB(dev); + AspeedAPB2OPBState *s =3D ASPEED_APB2OPB(obj); =20 memcpy(s->regs, aspeed_apb2opb_reset, ASPEED_APB2OPB_NR_REGS); } @@ -312,10 +312,11 @@ static void fsi_aspeed_apb2opb_reset(DeviceState *dev) static void fsi_aspeed_apb2opb_class_init(ObjectClass *klass, const void *= data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->desc =3D "ASPEED APB2OPB Bridge"; dc->realize =3D fsi_aspeed_apb2opb_realize; - device_class_set_legacy_reset(dc, fsi_aspeed_apb2opb_reset); + rc->phases.hold =3D fsi_aspeed_apb2opb_reset_hold; } =20 static const TypeInfo aspeed_apb2opb_info =3D { --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783689; cv=none; d=zohomail.com; s=zohoarc; b=PG8ZkaWtw3qwEgsJiHF+Mn1CZa8K5g734AybBDS+Ye1adQ1/j6uclEhAeGm3kMym5nUorn2q86D5O/hHvWcAYAcbqjpQpXQ8upXgXLR1bRRNWffMDjRe0fvs00Vbsr2zEJ6Ls4jtYyXZelNZQ0rhQ4d25Sy+5ZiEnWR3nqA290U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783689; 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=f1QWfeIUPzpW/TT4Eho6egcL6OEbsFR2owTq3V9KXl8=; b=BDpNM0xXCsZS2V61qcrQ3tD8GIROUglxUxbH/Z/Wyf2/E8IBe1wogM0CAQXr27oYL6zpkEejB4+kZAoVj/U0eVxNSmf8TKwwgES0rM0V2xbab/mHTk1sya7kvEoibpSIUWcWqflbOm8rh/KciK8WM93fuT87tYJuRK8JvTgaYh0= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783689378461.3402940959694; Tue, 26 May 2026 01:21:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1g-00078u-6M; Tue, 26 May 2026 04:20:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1N-0005zI-7T for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:20 -0400 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 1wRn1L-0008D7-2Q for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:16 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-460-igc9GeU5N9SMvfXSUxSYQg-1; Tue, 26 May 2026 04:20:08 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BCB1218005BE; Tue, 26 May 2026 08:20:07 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0B97D180056E; Tue, 26 May 2026 08:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783612; 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=f1QWfeIUPzpW/TT4Eho6egcL6OEbsFR2owTq3V9KXl8=; b=h65FQiWYFsoW8pnM0NbkIK2ys8PfkI18XRUS1WBk0zIsQPUiS/KNXsIUzcM8ID6VJDCa7G ydD/K2XNGQQwuiL6S1edlfDke967BXnNmds8S90gfkxZ1BlnpGb0FSxgNaxy263Qo5UpBI cpy90OaiFnzS4HxUxpgeq6FI6vGtr+c= X-MC-Unique: igc9GeU5N9SMvfXSUxSYQg-1 X-Mimecast-MFC-AGG-ID: igc9GeU5N9SMvfXSUxSYQg_1779783607 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 35/37] hw/rtc/aspeed_rtc: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:46 +0200 Message-ID: <20260526081848.651835-36-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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_PASS=-0.001, SPF_PASS=-0.001 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: qemu development 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: 1779783690302158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-22-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/rtc/aspeed_rtc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/rtc/aspeed_rtc.c b/hw/rtc/aspeed_rtc.c index 6793e253f472..5245f3f95633 100644 --- a/hw/rtc/aspeed_rtc.c +++ b/hw/rtc/aspeed_rtc.c @@ -120,9 +120,9 @@ static void aspeed_rtc_write(void *opaque, hwaddr addr, trace_aspeed_rtc_write(addr, val); } =20 -static void aspeed_rtc_reset(DeviceState *d) +static void aspeed_rtc_reset_hold(Object *obj, ResetType type) { - AspeedRtcState *rtc =3D ASPEED_RTC(d); + AspeedRtcState *rtc =3D ASPEED_RTC(obj); =20 rtc->offset =3D 0; memset(rtc->reg, 0, sizeof(rtc->reg)); @@ -159,10 +159,11 @@ static void aspeed_rtc_realize(DeviceState *dev, Erro= r **errp) static void aspeed_rtc_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_rtc_realize; dc->vmsd =3D &vmstate_aspeed_rtc; - device_class_set_legacy_reset(dc, aspeed_rtc_reset); + rc->phases.hold =3D aspeed_rtc_reset_hold; } =20 static const TypeInfo aspeed_rtc_info =3D { --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783814; cv=none; d=zohomail.com; s=zohoarc; b=Hld+R7q6Vq7NnmEPJTFkU6GC9uw0lfiSSb/Ir/lJkVinACa+EDnaxo2Li/iOr8w+i08A4y9azD4F+bMulo1Saz0fVllJ0FjW+GcdXbLOhEuGG3laPDM6kPUnjSmSUejriCRDVGpBFYLoWELSuGpDUpo9HEJqfVx/xzc3l2dpnpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783814; 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=o94XXg3c1Xwm3N9QS+YUpmxRDpXkWvX5QEbgC2ype0k=; b=ZP34d4WXpoDYkgaTpximWz6j6U2OgpTQaJdaA1C0uHmxLQRM1lJ9c1MqxNyxO1icfN3N1TB4+DMdQe4jRKt2XaqoTz43keedBHRpF3gL6AyqDvZHKwjd0aUbLFB8x+0Qd8oHBIrLS6bocWuiH/NJe6CVhznR1z6s90d5y1oVzNI= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1779783814138530.2509886678966; Tue, 26 May 2026 01:23:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1e-0006vx-Os; Tue, 26 May 2026 04:20:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1O-000659-Ev for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:22 -0400 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 1wRn1M-0008DJ-6O for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:17 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-466-iAAyWa4GOyGRtkkT-K9Lgg-1; Tue, 26 May 2026 04:20:11 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EFE1319560B5; Tue, 26 May 2026 08:20:09 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C8851800357; Tue, 26 May 2026 08:20:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783614; 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=o94XXg3c1Xwm3N9QS+YUpmxRDpXkWvX5QEbgC2ype0k=; b=PPkvaqar7aJspMm7XI35cxKBZ0yZLVjA09hBIPVBFdDNlt7nGSFq3kue8GahlO+W4DtmUj QPq68Kh1bhqZL2tzidUpN7nJs0RUDc5EZfHMvSjvZP+SBMr89RhINyfwGBYbry6zrkXq/f zgRUwFKCRBxmEtOMYyGX85TJ30lG3PY= X-MC-Unique: iAAyWa4GOyGRtkkT-K9Lgg-1 X-Mimecast-MFC-AGG-ID: iAAyWa4GOyGRtkkT-K9Lgg_1779783610 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 36/37] hw/adc/aspeed_adc: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:47 +0200 Message-ID: <20260526081848.651835-37-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783814699158500 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-23-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/adc/aspeed_adc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/adc/aspeed_adc.c b/hw/adc/aspeed_adc.c index 3cc75bbcd6e2..18b74898e16b 100644 --- a/hw/adc/aspeed_adc.c +++ b/hw/adc/aspeed_adc.c @@ -253,9 +253,9 @@ static const uint32_t aspeed_adc_resets[ASPEED_ADC_NR_R= EGS] =3D { [CLOCK_CONTROL] =3D 0x0000000f, }; =20 -static void aspeed_adc_engine_reset(DeviceState *dev) +static void aspeed_adc_engine_reset_hold(Object *obj, ResetType type) { - AspeedADCEngineState *s =3D ASPEED_ADC_ENGINE(dev); + AspeedADCEngineState *s =3D ASPEED_ADC_ENGINE(obj); =20 memcpy(s->regs, aspeed_adc_resets, sizeof(aspeed_adc_resets)); } @@ -295,9 +295,10 @@ static const Property aspeed_adc_engine_properties[] = =3D { static void aspeed_adc_engine_class_init(ObjectClass *klass, const void *d= ata) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->realize =3D aspeed_adc_engine_realize; - device_class_set_legacy_reset(dc, aspeed_adc_engine_reset); + rc->phases.hold =3D aspeed_adc_engine_reset_hold; device_class_set_props(dc, aspeed_adc_engine_properties); dc->desc =3D "Aspeed Analog-to-Digital Engine"; dc->vmsd =3D &vmstate_aspeed_adc_engine; --=20 2.54.0 From nobody Sat May 30 17:44:05 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1779783871; cv=none; d=zohomail.com; s=zohoarc; b=SGI5/416FuHEDPHOXdbAfxcAY7CPlzwOprOUlGMomHV05HqZJGcykv8Zdk3oedkYGXfUtq8R5YiHSvwLDPBqijEkRjcYPijqBuadSkRaBb9zt2CvMyN6qFXfDjv8tCvY5MRCuYxs1cefOAo9Jor44gT1nxua0RbvFdD4FZaRiRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1779783871; 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=h11gBrQjDc1xp7lwgLlMFe1x0NpMNhYNvv5wr5xATZU=; b=Uww+l+34J2zkYmo9Wza3Q3ipkZVO+NliE0iSf31ctfXyYD18gqcTcOEd1pQUz/9982qpKAqlarYKiHtT1s5T8O6XB+dUO6AFhpvRUH8huxergMGy7k5jqOgZoE3cKwA5+Hu0DXYvcAbt1TVPUz/lFdwXoixxwcFglWP2uoOALv0= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177978387190914.191031208600293; Tue, 26 May 2026 01:24:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wRn1a-0006du-VN; Tue, 26 May 2026 04:20:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wRn1Q-0006Ek-6i for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:22 -0400 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 1wRn1O-0008Ds-2t for qemu-devel@nongnu.org; Tue, 26 May 2026 04:20:19 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-458-A4VfRvp8MYueMsZGVw5cXw-1; Tue, 26 May 2026 04:20:13 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 32929195609F; Tue, 26 May 2026 08:20:12 +0000 (UTC) Received: from corto.redhat.com (unknown [10.44.32.30]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6EB5C1800357; Tue, 26 May 2026 08:20:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779783617; 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=h11gBrQjDc1xp7lwgLlMFe1x0NpMNhYNvv5wr5xATZU=; b=YhYcZjHR4DWHKH32fqd41GP9HrPOPM8E0A6+L+YQYjnl6RFdzG/c03Ida2Wx0ECY54ceqF x/6Xh8woWq947R2oQt7ir6Paf8cU4c/ZDW1YOYxWXLfVIz0fBTxzx+zsskRFc8tso2rux+ KJGVXeH4tDbP1w/uqLbZDJAkzDTeH+k= X-MC-Unique: A4VfRvp8MYueMsZGVw5cXw-1 X-Mimecast-MFC-AGG-ID: A4VfRvp8MYueMsZGVw5cXw_1779783612 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: Kane Chen , Jamin Lin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 37/37] hw/i2c/aspeed_i2c: convert to use Resettable interface Date: Tue, 26 May 2026 10:18:48 +0200 Message-ID: <20260526081848.651835-38-clg@redhat.com> In-Reply-To: <20260526081848.651835-1-clg@redhat.com> References: <20260526081848.651835-1-clg@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=clg@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1779783875176154100 From: Kane Chen Replace the legacy reset callback registered via device_class_set_legacy_reset() with the Resettable interface. Signed-off-by: Kane Chen Reviewed-by: Jamin Lin Link: https://lore.kernel.org/qemu-devel/20260525044129.3133916-24-kane_che= n@aspeedtech.com Signed-off-by: C=C3=A9dric Le Goater --- hw/i2c/aspeed_i2c.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c index 90f83a03fd4f..80c445750059 100644 --- a/hw/i2c/aspeed_i2c.c +++ b/hw/i2c/aspeed_i2c.c @@ -1160,9 +1160,9 @@ static const VMStateDescription aspeed_i2c_vmstate = =3D { } }; =20 -static void aspeed_i2c_reset(DeviceState *dev) +static void aspeed_i2c_reset_hold(Object *obj, ResetType type) { - AspeedI2CState *s =3D ASPEED_I2C(dev); + AspeedI2CState *s =3D ASPEED_I2C(obj); =20 s->intr_status =3D 0; } @@ -1363,9 +1363,10 @@ static const Property aspeed_i2c_properties[] =3D { static void aspeed_i2c_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->vmsd =3D &aspeed_i2c_vmstate; - device_class_set_legacy_reset(dc, aspeed_i2c_reset); + rc->phases.hold =3D aspeed_i2c_reset_hold; device_class_set_props(dc, aspeed_i2c_properties); dc->realize =3D aspeed_i2c_realize; dc->desc =3D "Aspeed I2C Controller"; @@ -1506,9 +1507,9 @@ static const TypeInfo aspeed_i2c_bus_slave_info =3D { .class_init =3D aspeed_i2c_bus_slave_class_init, }; =20 -static void aspeed_i2c_bus_reset(DeviceState *dev) +static void aspeed_i2c_bus_reset_hold(Object *obj, ResetType type) { - AspeedI2CBus *s =3D ASPEED_I2C_BUS(dev); + AspeedI2CBus *s =3D ASPEED_I2C_BUS(obj); =20 memset(s->regs, 0, sizeof(s->regs)); s->pending_intr_sts =3D 0; @@ -1556,10 +1557,11 @@ static const Property aspeed_i2c_bus_properties[] = =3D { static void aspeed_i2c_bus_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 dc->desc =3D "Aspeed I2C Bus"; dc->realize =3D aspeed_i2c_bus_realize; - device_class_set_legacy_reset(dc, aspeed_i2c_bus_reset); + rc->phases.hold =3D aspeed_i2c_bus_reset_hold; device_class_set_props(dc, aspeed_i2c_bus_properties); } =20 --=20 2.54.0