From: Peter Delevoryas <peter@pjd.dev>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: patrick@stwcx.xyz, clg@kaod.org, peter.maydell@linaro.org,
andrew@aj.id.au, joal@jms.id.au, hskinnemoen@google.com,
kfting@nuvoton.com, qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 6/6] hw/arm/aspeed: Init fby35 BMC FRUID EEPROM
Date: Mon, 16 Jan 2023 09:23:05 -0800 [thread overview]
Message-ID: <Y8WH+aneXr/JkEXp@pdel-mbp> (raw)
In-Reply-To: <0ef1b0e3-7df0-e611-0335-bf0a24690a90@linaro.org>
On Mon, Jan 16, 2023 at 01:30:19PM +0100, Philippe Mathieu-Daudé wrote:
> On 14/1/23 18:01, Peter Delevoryas wrote:
> > Signed-off-by: Peter Delevoryas <peter@pjd.dev>
> > ---
> > hw/arm/aspeed.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 49 insertions(+)
> >
> > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c
> > index c929c61d582a..4ac8ff11a835 100644
> > --- a/hw/arm/aspeed.c
> > +++ b/hw/arm/aspeed.c
> > @@ -922,6 +922,52 @@ static void bletchley_bmc_i2c_init(AspeedMachineState *bmc)
> > i2c_slave_create_simple(i2c[12], TYPE_PCA9552, 0x67);
> > }
> > +static const uint8_t fby35_bmc_fruid[] = {
> [...]
>
> > +};
> > +
> > static void fby35_i2c_init(AspeedMachineState *bmc)
> > {
> > AspeedSoCState *soc = &bmc->soc;
> > @@ -1363,6 +1409,9 @@ static void fby35_reset(MachineState *state, ShutdownCause reason)
> > object_property_set_bool(OBJECT(gpio), "gpioB3", false, &error_fatal);
> > object_property_set_bool(OBJECT(gpio), "gpioB4", false, &error_fatal);
> > object_property_set_bool(OBJECT(gpio), "gpioB5", false, &error_fatal);
> > +
> > + at24c_eeprom_write(aspeed_i2c_get_bus(&bmc->soc.i2c, 11),
> > + 0x54, 0, fby35_bmc_fruid, sizeof(fby35_bmc_fruid));
>
> Why transfer the prom content on the i2c bus at each reset?
>
> In particular this looks wrong if the prom is initialized with a 'drive'
> block backend (using -global).
Yeah, it looks like this might not be the right way to model it. I'm going
to try Cedric's suggestions.
>
> > }
>
>
next prev parent reply other threads:[~2023-01-16 17:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 17:01 [PATCH 0/6] hw/nvram/eeprom_at24c: Cleanup + FRUID EEPROM init example Peter Delevoryas
2023-01-14 17:01 ` [PATCH 1/6] hw/nvram/eeprom_at24c: Add header w/ init helper Peter Delevoryas
2023-01-16 11:13 ` Cédric Le Goater
2023-01-16 12:23 ` Philippe Mathieu-Daudé
2023-01-16 17:21 ` Peter Delevoryas
2023-01-14 17:01 ` [PATCH 2/6] hw/arm/aspeed: Remove local copy of at24c_eeprom_init Peter Delevoryas
2023-01-16 11:13 ` Cédric Le Goater
2023-01-16 12:24 ` Philippe Mathieu-Daudé
2023-01-16 17:21 ` Peter Delevoryas
2023-01-14 17:01 ` [PATCH 3/6] hw/arm/aspeed: Replace aspeed_eeprom_init with at24c_eeprom_init Peter Delevoryas
2023-01-16 11:14 ` Cédric Le Goater
2023-01-16 12:25 ` Philippe Mathieu-Daudé
2023-01-14 17:01 ` [PATCH 4/6] hw/arm/npcm7xx: Remove local copy of at24c_eeprom_init Peter Delevoryas
2023-01-16 11:14 ` Cédric Le Goater
2023-01-16 12:26 ` Philippe Mathieu-Daudé
2023-01-14 17:01 ` [PATCH 5/6] hw/nvram/eeprom_at24c: Add I2C write helper Peter Delevoryas
2023-01-14 17:01 ` [PATCH 6/6] hw/arm/aspeed: Init fby35 BMC FRUID EEPROM Peter Delevoryas
2023-01-16 12:30 ` Philippe Mathieu-Daudé
2023-01-16 17:23 ` Peter Delevoryas [this message]
2023-01-17 6:47 ` Philippe Mathieu-Daudé
2023-01-17 17:49 ` Peter Delevoryas
2023-01-16 12:42 ` Cédric Le Goater
2023-01-16 17:19 ` Peter Delevoryas
2023-01-14 17:07 ` [PATCH 0/6] hw/nvram/eeprom_at24c: Cleanup + FRUID EEPROM init example Peter Delevoryas
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=Y8WH+aneXr/JkEXp@pdel-mbp \
--to=peter@pjd.dev \
--cc=andrew@aj.id.au \
--cc=clg@kaod.org \
--cc=hskinnemoen@google.com \
--cc=joal@jms.id.au \
--cc=kfting@nuvoton.com \
--cc=patrick@stwcx.xyz \
--cc=peter.maydell@linaro.org \
--cc=philmd@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).