From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org,
Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
Markus Armbruster <armbru@redhat.com>,
Gustavo Romero <gustavo.romero@linaro.org>,
qemu-arm@nongnu.org
Subject: Re: [PATCH 2/4] hw/arm/stellaris: Convert I2C controller to Resettable interface
Date: Tue, 13 Feb 2024 16:50:39 +0100 [thread overview]
Message-ID: <cde94c81-c3bf-42f3-9bc8-e9214ed84d51@linaro.org> (raw)
In-Reply-To: <CAFEAcA_e3QOvfvJScUgtmjGacKZX1OHyY5a-BWSAhNURyO2Rgg@mail.gmail.com>
On 1/2/24 17:24, Peter Maydell wrote:
> On Tue, 30 Jan 2024 at 19:03, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> 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.
next prev parent reply other threads:[~2024-02-13 15:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 19:03 [PATCH 0/4] hw/arm/stellaris: QOM/QDev cleanups Philippe Mathieu-Daudé
2024-01-30 19:03 ` [PATCH 1/4] hw/arm/stellaris: Convert ADC controller to Resettable interface Philippe Mathieu-Daudé
2024-02-01 16:18 ` Peter Maydell
2024-01-30 19:03 ` [PATCH 2/4] hw/arm/stellaris: Convert I2C " Philippe Mathieu-Daudé
2024-02-01 16:24 ` Peter Maydell
2024-02-13 15:50 ` Philippe Mathieu-Daudé [this message]
2024-01-30 19:03 ` [PATCH 3/4] hw/arm/stellaris: Add missing QOM 'machine' parent Philippe Mathieu-Daudé
2024-02-01 16:28 ` Peter Maydell
2024-02-13 15:40 ` Philippe Mathieu-Daudé
2024-02-01 16:47 ` Peter Maydell
2024-01-30 19:03 ` [PATCH 4/4] hw/arm/stellaris: Add missing QOM 'SoC' parent Philippe Mathieu-Daudé
2024-02-01 16:46 ` Peter Maydell
2024-02-13 15:36 ` Philippe Mathieu-Daudé
2024-02-14 7:08 ` Cédric Le Goater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cde94c81-c3bf-42f3-9bc8-e9214ed84d51@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=gustavo.romero@linaro.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).