Received: by 2002:a17:906:3953:b0:a3d:1c09:7d3d with SMTP id g19csp214725eje; Tue, 13 Feb 2024 07:51:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUNLiAD8lmjqiaGg+DJ1fp+UWHvkoDzilqUK1Y1q/vENyW5yjBfqLx8XQVsizZnklSUoDe7XjYzQtfruGiwJrtRt1Ik0BjD X-Google-Smtp-Source: AGHT+IEzwTnN61Cj2VMz/djj4rscsf/VfQToWdGToveb5gi/AU+oYN+gI+b98SbYXhjf8LoA3vYe X-Received: by 2002:a0c:df85:0:b0:68c:4632:b71a with SMTP id w5-20020a0cdf85000000b0068c4632b71amr10226253qvl.60.1707839477162; Tue, 13 Feb 2024 07:51:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707839477; cv=none; d=google.com; s=arc-20160816; b=sXr3V9f+57D5K7ZnYcN7ep5EVtb3mPY8gholYa08v//MQSPDUcaFqr85w3fSbG2zKw h6GMBOr4pnrAYN3C0hIJLoMZRURtw5xOCd+f+7JvBx0Gn2ob/VAA8dwxIPJ+DVa4mOcL 9NA4HcRFh33vgTWxo1rdCwfE1IeRSBlNLiLybuBAzhLT11LlhS4z9a1dv+m8GvkWVhH8 ANd0jJazqWI/F/XzzPUEtxQqniLL+Y6x7n80hS1Urjdym9a3UkpWlpS15qgiReW/a4ZM 17/UR9i+L2+KN62aZQHOGrG0T+dKS0wdRDtjz1S23+63uc3D71cbwkQtz2H7mwZEUrDn rteQ== 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 :in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=Zr3mehn/xZ0OaAXl/DQ0wynxpLmisZ0EuMbAySZB6LE=; fh=S6I2DV0P1Ah4RYfRlpH//QQPq4xOWR+bTONd3zGx6LQ=; b=vzziuKCe7puvbJaWpPlTtPhLBcMf2IXp0JD4aeFKTiOSfKrAIEjwsAbk/DNu1kDRLS om+Zgl/d0oRH4uW1damaiOfzB/+khcx+8211j3yice4n9JT9PeVulLZ/bvfh4C0peoRf jBQDJK2JlsWqX/DDZw+ybZNGzp1gfHASVaYCFJXvJRWgLNSdtn1kJzuuhc4SFDuBrSRs IMeT0OS/S8ushTykA8BjWxPBJjTm2XfYbsUCtFK4+hnYrdwJyp6pcOhzprbHezyOg42p L+fuI/fQdKYNB0d3xPmB7+7gAQRB8rqLTcI7Ss87hK7hONxMYuctgqPazlNjux6DbNhx qE0w==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GjtP9ldb; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWHgE0ETfRsdKpeQtQcgoFNqLu3/QhzCNTS3ao2MnG1564KxmbrYKlkFl9Bq2sotL2ciceCqe3cZ7H+rJcpnvwAM1IzHuoF Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r7-20020a056214212700b00681da55cc3fsi3328728qvc.249.2024.02.13.07.51.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2024 07:51:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=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=GjtP9ldb; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=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 1rZv3j-0002o8-25; Tue, 13 Feb 2024 10:50:59 -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 1rZv3e-0002gq-4Z for qemu-arm@nongnu.org; Tue, 13 Feb 2024 10:50:54 -0500 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZv3W-0005VF-TT for qemu-arm@nongnu.org; Tue, 13 Feb 2024 10:50:52 -0500 Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-785d954b236so92903885a.0 for ; Tue, 13 Feb 2024 07:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707839443; x=1708444243; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Zr3mehn/xZ0OaAXl/DQ0wynxpLmisZ0EuMbAySZB6LE=; b=GjtP9ldb8OBP6uej/HY6yf6zvh4rSuSp/l+Ze6R19xL55/yAaaDbyiRpHmc+Xszatr HQDC8Ai/6hbjqmPkjVhN4Yo01WJv8yzp4v/HJpsksUtuWyxBsVIntnSKPivDonF7bW3/ hB0Qcs7xApspJIPU+JkpZE3jiAbpJEKwycK3ONM8JZvoqftF8VWwJU9INYrnMOI8IEHn AiQxfIzfsIFpLkb97G56wXfWEubNqPlslsiuLHqDWQZxGGLq/24uDtd4r7CLe15PyM+5 x1dLHu4XFJGY4qRZGGgY5LjlXeKpjby2EqsR4aOeXOpwJayKAMD8MtpLg69UkbIwZK0T ndaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707839443; x=1708444243; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Zr3mehn/xZ0OaAXl/DQ0wynxpLmisZ0EuMbAySZB6LE=; b=sGj/U80zzaJIVW5yJ9AkRiCKc7O4a+pq4/hnZNnzFEn47SLwTry/lCtK9kTTN0/CTg zboh/gVgQcdOExv4IgK87voTIjoCtplvqRT/+jYgXiOz9+//ItFwhGRXpNsU9XM7ZPBf FVF+Utn4et3CMhTg/XymOj8RLDXVoCe5yNImdliAhFd+QnbjywGNUBNfMUgum3Yo1WeO BW4vnCzHu1lC8SnLvsGGurrNxqOoApqmTxuXX9P0tMrFL9Kcc8O63ahIgFPVZmtKjtyG /4b/OFviM3HFuQGS3BVsWNYFqF5R+hXiHJ9kyeischEJnaPqp2qu312qt7QfuYJDw6Re 4ruQ== X-Forwarded-Encrypted: i=1; AJvYcCU3rhvFnE1NrEKhFpOPht8nGINi9SG6Axw1z8IaXMVAmGAEAoT/1HHOqKnurXwTfdY4/OzKYWdN3tO75KFGmG6Slopy X-Gm-Message-State: AOJu0YwDMZ5TqOQNLYuEIMyGdwF/V/f/Le/cMojStHBfVKxaTpoAJPPy JwcZlbl2HQtcCzht+wNpNrGPUYoP/OpXeffFYxiJNeFWUzFYqJzjQSHwIk/UzYQ= X-Received: by 2002:a05:620a:29d1:b0:785:d69d:ee37 with SMTP id s17-20020a05620a29d100b00785d69dee37mr7280962qkp.29.1707839442907; Tue, 13 Feb 2024 07:50:42 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU/+2G3j0oDQNyFNmxnxZXAhboCu1hQuAVgyx4cVJcf2kVPi3C2o8ByMJzo3lJmDynPGxBCNOVuHtKM7OqKuWlhAJURtXs4imVqEywBvqz3vgnADyHGlUuQy5bpthIyhICq72PcbTjIGVNspECKe5PftwZRjKyQCSiwDvk7NVZHQGzkN3ZHXmbg/kwkDH64YQRq Received: from [192.168.69.100] ([176.176.128.243]) by smtp.gmail.com with ESMTPSA id x11-20020a05620a0ecb00b007840b13c58esm3058425qkm.63.2024.02.13.07.50.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Feb 2024 07:50:42 -0800 (PST) Message-ID: Date: Tue, 13 Feb 2024 16:50:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] hw/arm/stellaris: Convert I2C controller to Resettable interface Content-Language: en-US To: Peter Maydell Cc: qemu-devel@nongnu.org, Manos Pitsidianakis , Markus Armbruster , Gustavo Romero , qemu-arm@nongnu.org References: <20240130190317.25692-1-philmd@linaro.org> <20240130190317.25692-3-philmd@linaro.org> From: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::732; envelope-from=philmd@linaro.org; helo=mail-qk1-x732.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-arm@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-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: REtVBL0Rk6kn On 1/2/24 17:24, Peter Maydell wrote: > On Tue, 30 Jan 2024 at 19:03, Philippe Mathieu-Daudé wrote: >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/arm/stellaris.c | 9 ++++++--- >> 1 file changed, 6 insertions(+), 3 deletions(-) >> @@ -658,8 +661,6 @@ static void stellaris_i2c_init(Object *obj) >> memory_region_init_io(&s->iomem, obj, &stellaris_i2c_ops, s, >> "i2c", 0x1000); >> sysbus_init_mmio(sbd, &s->iomem); >> - /* ??? For now we only implement the master interface. */ > > I'm not 100%, but I think this comment is a general one, > not reset specific, so it should stay in the init function. > >> - stellaris_i2c_reset(s); >> } > > I think that the i2c_end_transfer() should be in the > "enter" phase, and the clearing of the state fields in > "hold", and then the stellaris_i2c_update() call in "exit". Indeed. > Though usually we don't bother to do an update in reset > if it's just "device has reset and now its outbound IRQ > line is not set", so we could alternatively just delete that. I'll let that as an possible cleanup on top. Thanks for the review, Phil.