From nobody Tue Nov 26 15:25:56 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1706888334; cv=none; d=zohomail.com; s=zohoarc; b=QkEqKNqebDs9Ifla51SPOD72T/lH6hkNGId4ACYHOB15E+TmqP7fQKV++2hKUh5aJ+Ga5TAlBEqbLcdEqe/X8Xk3QARc42yTjnin/FT2huO/iH9O5dwokAegrZPuKvNw/ZAWJS6RysGWzc8xknmoQICUm0DqNDi8XOj7kAf7X94= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706888334; h=Content-Type:Content-Transfer-Encoding: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:Cc; bh=90Q19bchD51USuhMKJ6oc+v8LKqSGaGapSq6FK0X6bc=; b=gC0rCnusYi4WM43IndDuSefMSStarsW0oRuWbx98EobPdvHtrUlJHMNB+tCKZi8dmDe2SDBcypl3FRtUOgENUoGWV/bEc4w6okbmuGUv9BQfnXZqRD/AWsPaPyL1Aud1rcBlJQ4+QVHITX88XoGTTg7TeW2Gjb0REYGC/LvDp5U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706888334845983.8237899275816; Fri, 2 Feb 2024 07:38:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVvav-0000At-FV; Fri, 02 Feb 2024 10:36:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVvau-00008v-0T for qemu-devel@nongnu.org; Fri, 02 Feb 2024 10:36:44 -0500 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVvas-0004RN-Bz for qemu-devel@nongnu.org; Fri, 02 Feb 2024 10:36:43 -0500 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50eac018059so2770019e87.0 for ; Fri, 02 Feb 2024 07:36:41 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id k2-20020a05600c1c8200b0040fafd84095sm214735wms.41.2024.02.02.07.36.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 07:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706888200; x=1707493000; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=90Q19bchD51USuhMKJ6oc+v8LKqSGaGapSq6FK0X6bc=; b=UlaSDmyX8ijizOgRy2fP018Ugd63Xo7W9rx3XUe8WlwUTHd1D8X8ro1mWe3kMD3wWY 3RgBDVjpQga5U2HezKazlR/IkAtO3IvnISzsCYq3ijML1xOoXi6fKRBBrFO/WGriwjz5 iLQ4WmKORkBmWuV8DQDO0+08PawOjEAccYvHvtRj27TxUZZQEKwiKqre+NtnS36sl9B1 uFZY8f+boWAKB/T5LizJi7RN6nYTSvFo1g73tLtlWyq4vExzOCH+ejvpDkz+Fi8IKPIz UoOY4lJInxHtdBKgj+X/gro3l/3TIvSsaVnAH13h9i8yv1wkKdkwodkY0UStIM2kWU8X CPLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706888200; x=1707493000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=90Q19bchD51USuhMKJ6oc+v8LKqSGaGapSq6FK0X6bc=; b=SRjBb6zzedbscSih8zq2+Ua+Et5Ak+0g8ZkCjd6yGwm+Zuvk868PX896xolPAI/AMG kLRSywVJvhwNa5+U4PV609aN/ZafWRkr39ZAGd/julhh+zz7jNhk+lOBRATer9rnrDLz IP+Q1plasiIpaqTRqhOlQ8zNpI4Cg1SQrieDHKev6cjLD18etm/uGHkXglh5ysA8RKTl 7P6tCLFXKKcZ8+JlXJmJpIpiJwVrQI447u4casRs/kr7hpGEbnEWV1oVkAQEUL8mucM3 ozrdoU/ZSvLbpP9Jjcg9ptsdia4wrGItlSyMihBVx88n6TNEpx0osRuGp1J09G+9CxkJ Cuww== X-Gm-Message-State: AOJu0YxHxOiaWX/wvsL3hXD3Ha+bfBX30X3dm3A8WAhJTSkHCdVf++8O x+jiRlJfVqcTWDV67f8HyfHTOWgMahAUsHFUvObdUjO4P73I6QLaGg3S76XuS+cS7qNTxZ5UEYd l X-Google-Smtp-Source: AGHT+IFBDYiBD9rkr7X7DA90g1gmK9qdSHDYwfljVwgp3MpPyLu9YL36ld7IkzDw3oHk6yxAVeEz8w== X-Received: by 2002:a19:f81a:0:b0:511:e8f:45ca with SMTP id a26-20020a19f81a000000b005110e8f45camr1680573lff.31.1706888200760; Fri, 02 Feb 2024 07:36:40 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/36] adb: Switch bus reset to 3-phase-reset Date: Fri, 2 Feb 2024 15:36:05 +0000 Message-Id: <20240202153637.3710444-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202153637.3710444-1-peter.maydell@linaro.org> References: <20240202153637.3710444-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=peter.maydell@linaro.org; helo=mail-lf1-x136.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1706888336037100001 Switch the ADB bus from using BusClass::reset to the Resettable interface. This has no behavioural change, because the BusClass code to support subclasses that use the legacy BusClass::reset will call that method in the hold phase of 3-phase reset. Signed-off-by: Peter Maydell Acked-by: Michael S. Tsirkin Acked-by: C=C3=A9dric Le Goater Acked-by: Maciej S. Szmigiero Tested-by: C=C3=A9dric Le Goater Reviewed-by: Mark Cave-Ayland Reviewed-by: Zhao Liu Message-id: 20240119163512.3810301-4-peter.maydell@linaro.org --- hw/input/adb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/input/adb.c b/hw/input/adb.c index 0f3c73d6d00..98f39b4281a 100644 --- a/hw/input/adb.c +++ b/hw/input/adb.c @@ -231,9 +231,9 @@ static const VMStateDescription vmstate_adb_bus =3D { } }; =20 -static void adb_bus_reset(BusState *qbus) +static void adb_bus_reset_hold(Object *obj) { - ADBBusState *adb_bus =3D ADB_BUS(qbus); + ADBBusState *adb_bus =3D ADB_BUS(obj); =20 adb_bus->autopoll_enabled =3D false; adb_bus->autopoll_mask =3D 0xffff; @@ -262,10 +262,11 @@ static void adb_bus_unrealize(BusState *qbus) static void adb_bus_class_init(ObjectClass *klass, void *data) { BusClass *k =3D BUS_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 k->realize =3D adb_bus_realize; k->unrealize =3D adb_bus_unrealize; - k->reset =3D adb_bus_reset; + rc->phases.hold =3D adb_bus_reset_hold; } =20 static const TypeInfo adb_bus_type_info =3D { --=20 2.34.1