From nobody Tue Nov 26 13:18:02 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=1707839583; cv=none; d=zohomail.com; s=zohoarc; b=Bbht5g68xi1iVcV7JTAlrwcd1dF+kBqr1AuMllxu+wvUZvVZdVGU3yRW87hbqw1r4gQX05Tv2Uk5PGkmzxAJxGgfVFT3CPnIlksMUmf332DOqPFhr21Vx0XKFGLcFLaBGymWkxAchGaGX2gb/Q+X6xMnxWX3FOg7aFgLeRKimzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707839583; 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+S0PIyuWqj36dfp8C1T50Axcx5KgHwe/rvIuK8sOt8=; b=fcR0tzfXhz4L2Via8xSZCvswi25lQgSOEF4n1mA4ahCqzIZsO/jG5csxEO3bOZq0tfnrRvzsE9GDCaNDSgsxr2w+JkogmycPSk4TxGkDi2ZU+Z3b5YTgNWVyt381wF5Q02dd3vxkS/EPfIQVj5AuQK/CpKfS/Iyx2ap9ry+pXyc= 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 1707839583431909.4480802959497; Tue, 13 Feb 2024 07:53:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZv5C-00016W-LK; Tue, 13 Feb 2024 10:52:30 -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 1rZv5A-00014Z-1L for qemu-devel@nongnu.org; Tue, 13 Feb 2024 10:52:28 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZv57-0005lg-8m for qemu-devel@nongnu.org; Tue, 13 Feb 2024 10:52:27 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3392b045e0aso3059563f8f.2 for ; Tue, 13 Feb 2024 07:52:24 -0800 (PST) Received: from m1x-phil.lan ([176.176.128.243]) by smtp.gmail.com with ESMTPSA id bu13-20020a056000078d00b0033b6d5a1244sm9873617wrb.12.2024.02.13.07.52.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Feb 2024 07:52:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707839543; x=1708444343; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U+S0PIyuWqj36dfp8C1T50Axcx5KgHwe/rvIuK8sOt8=; b=DGvGivEOHnaarw4F+qcovDKo0ff/GUPOGq80idnwoVP28T5Y7gQzXudt0NWtSepMGz OmIKf5c2aO+Um2q66HRF/xc9DjWFTjFi886dYHhfTciL8IlUEFQ+2PrSC1q6ty4qwnx+ J35rOnIWaQHC5SjPFb/ZgeFvYpFK+WFyVSOza45vJYmSUxcOQ8NCr99hJ0UTLN1KOSU9 io8gxFDwFLes63mNbmPxI02SYR7E9xiDPzLxr/9t9Tn+MHXm+JxvTcBoyH0zzo8RdAfa MOudmZtZpNspUhDePwoPoRbNFHKphqaydtTaQDZbTAIsFaBD/U95zM3rqMQOYveuIx1u oK8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707839543; x=1708444343; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U+S0PIyuWqj36dfp8C1T50Axcx5KgHwe/rvIuK8sOt8=; b=GiVKtBzVYYVgD3sA+wIbsDDrGsuO6WzSOkH84QTI3b/46l9on0SF6Gp8MPXf3/lsnx xz+hrF/svZA9pOv10WmLhzGxXUgf57NiBTuDA69FCvOvXeAWxMw5FF5syaxneZXWCQ1I 1k4sLl+gowqLRGNubqVf6YuLmSaYArLBn70AH/xGCuBlhNkm1zgzLMwhQEL1r49Lvf54 TR2hG/7DDrrbbkbI7kDdxpDZ83ZnPQsgmrqGP6+qzhp8bs5lz7SGBLyYrr0nbGPm9Wtp o7pEgFGYj1SxiiRWD9e6e3AH4y/oux/S6JOJd8JkyqUhRpnrTswinSfSWoPfZePbXs96 tjcQ== X-Gm-Message-State: AOJu0YwBEmo5YrkwonQM6jNYBUifMU1TFvZEhruHWOtEdAr9RyadtQgZ cwcDQ9rKPuZJssPcBVW/kR2QqQwDPgM+tAqUAIdBqUnIUs/g71TWrV/I55G/4TKAb2Fc0Ja4YD7 W X-Google-Smtp-Source: AGHT+IHFyQOtQ6cUcr0Tpn3+raODv4An1Twt/nIV4pQCdc7sSn72rbEkteklySZZfb9hv5g3P3epYQ== X-Received: by 2002:adf:f84c:0:b0:33b:87fb:7106 with SMTP id d12-20020adff84c000000b0033b87fb7106mr3637882wrq.55.1707839543457; Tue, 13 Feb 2024 07:52:23 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWnaSTh5pd2/gZQHNTqQL/MOMe5XV8x67kfuVtsDxZkhKSMw/YkqmWW6rboCuiZ7dnlXqAhvVC9zeIFrQK8Lnh/T94oembmr1OxLwVtvAdOgJz4ZKC+fcJQ646eoAYshHbuvpQ0PNe/i3FRTVbMqSp8WQ== From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Gustavo Romero , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 1/4] hw/arm/stellaris: Convert ADC controller to Resettable interface Date: Tue, 13 Feb 2024 16:52:11 +0100 Message-ID: <20240213155214.13619-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240213155214.13619-1-philmd@linaro.org> References: <20240213155214.13619-1-philmd@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::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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=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: 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: 1707839585347100003 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Peter Maydell --- hw/arm/stellaris.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 34c5a86ac2..4fa857970b 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -773,8 +773,9 @@ static void stellaris_adc_trigger(void *opaque, int irq= , int level) } } =20 -static void stellaris_adc_reset(StellarisADCState *s) +static void stellaris_adc_reset_hold(Object *obj) { + StellarisADCState *s =3D STELLARIS_ADC(obj); int n; =20 for (n =3D 0; n < 4; n++) { @@ -946,7 +947,6 @@ static void stellaris_adc_init(Object *obj) memory_region_init_io(&s->iomem, obj, &stellaris_adc_ops, s, "adc", 0x1000); sysbus_init_mmio(sbd, &s->iomem); - stellaris_adc_reset(s); qdev_init_gpio_in(dev, stellaris_adc_trigger, 1); } =20 @@ -1411,7 +1411,9 @@ static const TypeInfo stellaris_i2c_info =3D { static void stellaris_adc_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); + ResettableClass *rc =3D RESETTABLE_CLASS(klass); =20 + rc->phases.hold =3D stellaris_adc_reset_hold; dc->vmsd =3D &vmstate_stellaris_adc; } =20 --=20 2.41.0