From patchwork Thu Oct 19 13:35:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 735571 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1519977wro; Thu, 19 Oct 2023 06:37:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHn+MdH7AU9fnaA8WJDdUFasA3DyioxT3N9e3+xBv0HGiuUrsDLAjcYZkFCUNFovuMrakx1 X-Received: by 2002:a05:6808:a81:b0:3b2:bc91:cbc3 with SMTP id q1-20020a0568080a8100b003b2bc91cbc3mr2023072oij.50.1697722658023; Thu, 19 Oct 2023 06:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697722657; cv=none; d=google.com; s=arc-20160816; b=apSSTpVIb5/P5jx/LeJKZreRhPNoyO/NKwTFEfC0sT8OqPrZFVAQwF2N1nXFeZET1a eCWi4oK8dXptSX2vKXjAOR/MH70EvPrjWkT6HgVArxT1kZDqncaPa1B4lG8n0iIXEz1t bCSLEevgiuSZoczYnZ06IruOO/eO55fl8lgZ3PV/OTAJtm7UvUWrwq3dqKDVyZspfii9 SOs+JTQtcGkxJnJtHMukB/Yb27JbwSM0Du8R315p3FmYTT1byyhidQUBwqVIXpgrc2Eq mDuTbaGxcfvpkpwUXThjKIVgox1OeQUl82uJIeh19HxGVgpjqCdBgQZ++4DZ8Kw7RIvf 2ebQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=IBNdIJqab6Bc866cHoB7OouTeU7VDOxNyDZhbOToj3g=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=C7dpYHMYoSrnvRnDhoq5BavkofmmXVJez6pTPBNal0K/2/WGYIQUNRr5ajxQMdtRzS 3qSo8NJyxXP+zue71NGiwAUXgPys7xogcIPWGff2nl2h1mp9IF6nLOC7XSVnN3UvbUTB 3xNkTk/ZiI7ZXjJRZ9+yDYIjaYC9ChD/p7mb6UYE+EkigSQ1RnOOAgDlfXFPjgT/akk8 bIk6EVDkeTdayRA8iyDlGx5Bgrv5aeRUU9pRCt4XBwp9lT/e0NtmL828CBvS6V9UGHR1 c2WD5QgMG/DNqQxmtjODtuwZGJTcepJrU2gKwDIkmyCuaJHUJsmCqPRutanTK8SQrqzz tfHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P2eb2tv4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v1-20020a05622a014100b0041cc53aac28si1523918qtw.640.2023.10.19.06.37.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 06:37:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P2eb2tv4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtTCQ-0002R0-Ql; Thu, 19 Oct 2023 09:36:30 -0400 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 1qtTBm-0001rJ-CW for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:35:54 -0400 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtTBe-0001CP-W3 for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:35:47 -0400 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c50cd16f3bso88268641fa.2 for ; Thu, 19 Oct 2023 06:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697722541; x=1698327341; 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=IBNdIJqab6Bc866cHoB7OouTeU7VDOxNyDZhbOToj3g=; b=P2eb2tv4eD0mQrAC6wO8dWi4Gm1qLljoeulktyhWJ0aMFZKqQccR/wVsMg26QOJTa5 EPNft9evIPBdQm2D5jFbILp/Hl9YXvgmotpDGgRe5trXmdA2SWD7SBRV+OtNuY6tPmCn g9IgutCp5L4Z2lXpu+n9ze/fa0bBb1pauZbqaCGx7uHDqj/TNaJ76PXPKlK4s+9eIoBJ 14GFslX1UlOeV6WBkUH80VZ+tS1QjM9wD+3pI6Yx9GhmwQwuSxQrbVLxpGMgcg9yew1Q PB37Jgi/XdGPvDEfCMMLBJgzO9v38kelTU9fZDrog5pPzQUT3R0UjqP6Ec/XO0llSYuB RQ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697722541; x=1698327341; 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=IBNdIJqab6Bc866cHoB7OouTeU7VDOxNyDZhbOToj3g=; b=vgF58540fz+mQYYLbifSxSr7j8hNhU6C5dYuNCYJdFVV8ysE69F1JIXnJnlGtSMEFQ rneODGzknUWhG2wydEJ7r9dyavcTtixjF2Bl1JsOMP7+wFsv+I/eQPOOWQTwaqn2llSa tLSTsZWNn49soMp7nHQv4dR5ahqe9yLbyI4G0Za7ljIaGI0IoRyaDpYhIUbUCTKUKDY0 GDghES7xgfGcZnZHWAZXcAwgvgKKLrBNsqd2DeX6jcWIZVYHJMJO+7tYQSfbKbRwsMAa BMpGnnZakOOoxkoftDbTnVcLqIj45VZ+pWamjkKyfUYUciGqRur8qbTCcRCloMWW/ABe Y8Mg== X-Gm-Message-State: AOJu0YzPHlOSHmw8PEguTVJx0vbrfpgX8DrcnL3yC1NldxeOuMw+k2un KkYtnQuzXNDKFtei1TP7apNcxme3jbFP5TePGCM= X-Received: by 2002:ac2:4c8a:0:b0:507:973f:39bf with SMTP id d10-20020ac24c8a000000b00507973f39bfmr1579860lfl.38.1697722540620; Thu, 19 Oct 2023 06:35:40 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id d28-20020adf9b9c000000b0031f3ad17b2csm4512690wrc.52.2023.10.19.06.35.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 06:35:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/24] xlnx-bbram: hw/nvram: Remove deprecated device reset Date: Thu, 19 Oct 2023 14:35:16 +0100 Message-Id: <20231019133537.2114929-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019133537.2114929-1-peter.maydell@linaro.org> References: <20231019133537.2114929-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=peter.maydell@linaro.org; helo=mail-lj1-x229.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Tong Ho This change implements the ResettableClass interface for the device. Signed-off-by: Tong Ho Reviewed-by: Philippe Mathieu-Daudé Message-id: 20231003052345.199725-1-tong.ho@amd.com Signed-off-by: Peter Maydell --- hw/nvram/xlnx-bbram.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/nvram/xlnx-bbram.c b/hw/nvram/xlnx-bbram.c index c6b484cc85b..e18e7770e1e 100644 --- a/hw/nvram/xlnx-bbram.c +++ b/hw/nvram/xlnx-bbram.c @@ -2,6 +2,7 @@ * QEMU model of the Xilinx BBRAM Battery Backed RAM * * Copyright (c) 2014-2021 Xilinx Inc. + * Copyright (c) 2023 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -416,9 +417,9 @@ static RegisterAccessInfo bbram_ctrl_regs_info[] = { } }; -static void bbram_ctrl_reset(DeviceState *dev) +static void bbram_ctrl_reset_hold(Object *obj) { - XlnxBBRam *s = XLNX_BBRAM(dev); + XlnxBBRam *s = XLNX_BBRAM(obj); unsigned int i; for (i = 0; i < ARRAY_SIZE(s->regs_info); ++i) { @@ -522,8 +523,9 @@ static Property bbram_ctrl_props[] = { static void bbram_ctrl_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + ResettableClass *rc = RESETTABLE_CLASS(klass); - dc->reset = bbram_ctrl_reset; + rc->phases.hold = bbram_ctrl_reset_hold; dc->realize = bbram_ctrl_realize; dc->vmsd = &vmstate_bbram_ctrl; device_class_set_props(dc, bbram_ctrl_props);