Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 859A3606A31A for ; Wed, 2 Dec 2026 09:21:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=QGp8vrAW Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xYgW9-0003dV-HO; Wed, 02 Dec 2026 04:20:49 -0500 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 1xYgVb-0002HS-2X for qemu-devel@nongnu.org; Wed, 02 Dec 2026 04:20:18 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xYgVW-00006u-C0 for qemu-devel@nongnu.org; Wed, 02 Dec 2026 04:20:12 -0500 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-3b44bdcea8aso7771839a91.1 for ; Wed, 02 Dec 2026 01:20:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796203209; x=1796808009; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xEBv5T1QPLsiI2pJ41w1Ro+NUcbPAbxJ2LzKDivFnu4=; b=QGp8vrAWfndydBim18wf/HCUOjvxNDMIC1aQ55fmoYWmwggzMNaqSVy0bSuFZrfWhV FY2DwN7jAhZHfNfd9MQXMBidcaGo+3c9d+f0s4pzGzF18iEx4OBrvimHE/HyISoqJwiB h+zuoJ/jhXvpqt7bI9LaMvzs9+4PKdByqRa3YKTV5fW/onvllp+5rskSSqLv62iRYP2q R0O+XzLmVqhygPTB8JsUP2PNmxx5jsy5wmcLQy0D1gFR8Y7sLxHBcvQwNwIiHfmwRcy0 CZh0fECcfTCpEEC8pmnVao9x5ssgSUX1OSXLBgflyXUDp8LSjApXLebCPF7KHLbA7qDI 3IpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796203209; x=1796808009; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=xEBv5T1QPLsiI2pJ41w1Ro+NUcbPAbxJ2LzKDivFnu4=; b=NMJhJ6XKbG+eiDINUzmeRdVWWr4KTf57zq2a/u/GuIhQYA46FvtgQTB2B9sjvulYKf 8MPOFwgEStotKonJytToRlXGWfT4S4z8J6+aroxfo6aqV1yd2StZR8RHjd9xrO1nZubF MzdyK7IGo6g2WEKNun0V3arY8SiW+63hCouIlpnGCTq0alRq669xzK0DlBolQtcDv61s azv/ThE875OpZWB1sc7JxcwG+RP+EQ6+pN0AiWY8Vxuz9n+3VhVihZ/T8sfuFmzS0WHX OH1kbTpwxI+LdPon/GQ6wJ/iVzGcPlwTAVJqbUkRWoqwEYXF37iAiyVuJ3DvL0sIiS8T ljIw== X-Gm-Message-State: APuU4Z8diu6szIOu6/HPl11GTBPFeGLhKWpaxfme+IOOxog33q6wIHpW sjUd+thfhNJbjn6iY6URTeEFyHBw2GUnmY2iSFivVt0bSw1bGrXH5InZ X-Gm-Gg: AZFdTZcmIR9O3BguwrtbpqoqZ0xG9QGtAtxJsGvOQS3nSRAnESYKV0zW3tB9NrwlpnN d4Rb+DG9tdvWU9rBq/X0hqTQcrilxiHkxCmdCUySiPGai/laD7T+b7iP/FV6NfQl6VOTeFcxd1a 1i/+C7ym1Hm3pBHn3Pi7yxo1z2tUzXCjl+3FMeM3ktzti48bGuYow7irD9XEhgOKrBX5qY0OZbz 44QWxGvlh5kk7H0Nf31HX6XQjXT0jlmhPcKFldnqbZA48WcTLinnyTGDMJiBsE5pS6nEYUy7icJ ZIhMB4O+jlcQp5UluE8lLCP7CdgvuBwpQVEYetLNiqhdOn57R5KPVNPK7385b9nUW/MyxTK62O/ ENwKfzOmPYV4AJsMU00jASawJQUBEWWQPWG/IIFnswshEwd0gTqfuKaPXUrJxjBS/xIgzhjk7cQ 7m8ROPP481+zTlHgnAn6l2USMxEzFsRyROBHAy9osM3uELLa4DAljPO3ciP9UuE/3VJtMcR08o+ M0whvI6kGS2BuQjiKaMFY40XPwnXXk48+ntfVxT2CPHbnGzx8hRwN+JdzCHKiHCp3iGVbh7ha+d 0FyIpZmc92GQRGf240hWbsGP1RAvXrR07tIZaANz/spgBdHSzQVnN+RoLI4VkoIweW1L/fg7q9w EvhogIcJbXWnAsGXA1jajhLnaQRkglPQ= X-Received: by 2002:a17:90b:3c11:b0:3a4:7195:ecba with SMTP id 98e67ed59e1d1-3b41c907eb4mr24513538a91.20.1796203208753; Wed, 02 Dec 2026 01:20:08 -0800 (PST) Received: from cfarm136.osuosl.org (cfarm136.osuosl.org. [2605:bc80:3010:104:21e:67ff:fefd:7034]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5b59f520bsm2560807a91.15.2026.12.02.01.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 01:20:07 -0800 (PST) From: =?utf-8?q?Oscar_Alejandro_S=C3=A1nchez_Lucero?= Date: Wed, 02 Dec 2026 09:20:02 +0000 Subject: [PATCH 11/11] hw/ssi/xilinx_spips: Convert to Resettable interface X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20261202-ssi-resettable-v1-11-87fe635d023e@gmail.com> References: <20261202-ssi-resettable-v1-0-87fe635d023e@gmail.com> In-Reply-To: <20261202-ssi-resettable-v1-0-87fe635d023e@gmail.com> To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Alistair Francis , qemu-arm@nongnu.org, Alistair Francis , qemu-riscv@nongnu.org, Jean-Christophe Dubois , Subbaraya Sundeep , Nicholas Piggin , Aditya Gupta , Glenn Miles , Harsh Prateek Bora , qemu-ppc@nongnu.org, Palmer Dabbelt , "Edgar E. Iglesias" , Francisco Iglesias , =?utf-8?q?Oscar_Alejandro_S=C3=A1nchez_Lucero?= X-Mailer: b4 0.16.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=aleszlucero@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Replace the deprecated device_class_set_legacy_reset() with the Resettable interface by implementing the hold phase in xilinx_spips_reset_hold() and xlnx_zynqmp_qspips_reset_hold(), chaining the parent hold phase via resettable_class_set_parent_phases(). Signed-off-by: Oscar Alejandro Sánchez Lucero --- hw/ssi/xilinx_spips.c | 21 ++++++++++++++------- include/hw/ssi/xilinx_spips.h | 1 + 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index e4fce2c..6c5b526 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -366,9 +366,9 @@ static void xlnx_zynqmp_qspips_update_ixr(XlnxZynqMPQSPIPS *s) } } -static void xilinx_spips_reset(DeviceState *d) +static void xilinx_spips_reset_hold(Object *obj, ResetType type) { - XilinxSPIPS *s = XILINX_SPIPS(d); + XilinxSPIPS *s = XILINX_SPIPS(obj); memset(s->regs, 0, sizeof(s->regs)); @@ -392,11 +392,14 @@ static void xilinx_spips_reset(DeviceState *d) xilinx_spips_update_cs_lines(s); } -static void xlnx_zynqmp_qspips_reset(DeviceState *d) +static void xlnx_zynqmp_qspips_reset_hold(Object *obj, ResetType type) { - XlnxZynqMPQSPIPS *s = XLNX_ZYNQMP_QSPIPS(d); + XlnxZynqMPQSPIPS *s = XLNX_ZYNQMP_QSPIPS(obj); + XilinxSPIPSClass *xsc = XILINX_SPIPS_GET_CLASS(obj); - xilinx_spips_reset(d); + if (xsc->parent_phases.hold) { + xsc->parent_phases.hold(obj, type); + } memset(s->regs, 0, sizeof(s->regs)); @@ -1502,10 +1505,11 @@ static void xilinx_qspips_class_init(ObjectClass *klass, const void *data) static void xilinx_spips_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + ResettableClass *rc = RESETTABLE_CLASS(klass); XilinxSPIPSClass *xsc = XILINX_SPIPS_CLASS(klass); dc->realize = xilinx_spips_realize; - device_class_set_legacy_reset(dc, xilinx_spips_reset); + rc->phases.hold = xilinx_spips_reset_hold; device_class_set_props(dc, xilinx_spips_properties); dc->vmsd = &vmstate_xilinx_spips; @@ -1518,10 +1522,13 @@ static void xilinx_spips_class_init(ObjectClass *klass, const void *data) static void xlnx_zynqmp_qspips_class_init(ObjectClass *klass, const void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + ResettableClass *rc = RESETTABLE_CLASS(klass); XilinxSPIPSClass *xsc = XILINX_SPIPS_CLASS(klass); dc->realize = xlnx_zynqmp_qspips_realize; - device_class_set_legacy_reset(dc, xlnx_zynqmp_qspips_reset); + resettable_class_set_parent_phases(rc, NULL, + xlnx_zynqmp_qspips_reset_hold, + NULL, &xsc->parent_phases); dc->vmsd = &vmstate_xlnx_zynqmp_qspips; device_class_set_props(dc, xilinx_zynqmp_qspips_properties); xsc->reg_ops = &xlnx_zynqmp_qspips_ops; diff --git a/include/hw/ssi/xilinx_spips.h b/include/hw/ssi/xilinx_spips.h index d1eefa4..f7c1405 100644 --- a/include/hw/ssi/xilinx_spips.h +++ b/include/hw/ssi/xilinx_spips.h @@ -125,6 +125,7 @@ struct XlnxZynqMPQSPIPS { struct XilinxSPIPSClass { SysBusDeviceClass parent_class; + ResettablePhases parent_phases; const MemoryRegionOps *reg_ops; uint64_t reg_size; -- 2.53.0