qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Delevoryas <peter@pjd.dev>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: clg@kaod.org, peter.maydell@linaro.org, andrew@aj.id.au,
	joel@jms.id.au, hskinnemoen@google.com, kfting@nuvoton.com,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 1/5] hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton boards
Date: Tue, 17 Jan 2023 10:32:15 -0800	[thread overview]
Message-ID: <Y8bprzjwzIRXej60@pdel-mbp> (raw)
In-Reply-To: <961515e6-65ad-ec7f-f51e-a862424f574d@linaro.org>

On Tue, Jan 17, 2023 at 09:00:34AM +0100, Philippe Mathieu-Daudé wrote:
> On 17/1/23 00:56, Peter Delevoryas wrote:
> > This helper is useful in board initialization because lets users initialize and
> > realize an EEPROM on an I2C bus with a single function call.
> > 
> > Signed-off-by: Peter Delevoryas <peter@pjd.dev>
> > ---
> >   hw/arm/aspeed.c                 | 10 +---------
> >   hw/arm/npcm7xx_boards.c         | 20 +++++---------------
> >   hw/nvram/eeprom_at24c.c         | 12 ++++++++++++
> >   include/hw/nvram/eeprom_at24c.h | 10 ++++++++++
> >   4 files changed, 28 insertions(+), 24 deletions(-)
> >   create mode 100644 include/hw/nvram/eeprom_at24c.h
> 
> > diff --git a/include/hw/nvram/eeprom_at24c.h b/include/hw/nvram/eeprom_at24c.h
> > new file mode 100644
> > index 000000000000..79a36b53ca87
> > --- /dev/null
> > +++ b/include/hw/nvram/eeprom_at24c.h
> > @@ -0,0 +1,10 @@
> > +/* Copyright (c) Meta Platforms, Inc. and affiliates. */
> 
> What license for this copyright?

Erg, yeah, thanks for calling this out, I did this wrong. Meta has some new
licensing guidelines and I misinterpreted them. Contributors are just supposed
to use whatever license the open-source project has, so I'll just change this
to say it's under GPL2, like the one I used in hw/arm/fby35.c

> 
> > +#ifndef EEPROM_AT24C_H
> > +#define EEPROM_AT24C_H
> > +
> > +#include "hw/i2c/i2c.h"
> 
>  /**
>   * Create and realize an AT24C EEPROM device on the heap.
>   * @bus: I2C bus to put it on
>   * @addr: I2C address of the EEPROM slave when put on a bus
>   * @rom_size: size of the EEPROM
>   *
>   * Create the device state structure, initialize it, put it on
>   * the specified @bus, and drop the reference to it (the device
>   * is realized).
>   */
>  I2CSlave *at24c_eeprom_create_simple(I2CBus *bus, uint8_t addr,
>                                       size_t rom_size);

+1, I'll include this comment

> 
> > +I2CSlave *at24c_eeprom_init(I2CBus *bus, uint8_t address, uint32_t rom_size);
> > +
> > +#endif
> 


  reply	other threads:[~2023-01-17 18:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 23:55 [PATCH v2 0/5] hw/nvram/eeprom_at24c: Cleanup + FRUID EEPROM init example Peter Delevoryas
2023-01-16 23:56 ` [PATCH v2 1/5] hw/arm: Extract at24c_eeprom_init helper from Aspeed and Nuvoton boards Peter Delevoryas
2023-01-17  7:12   ` Cédric Le Goater
2023-01-17  8:00   ` Philippe Mathieu-Daudé
2023-01-17 18:32     ` Peter Delevoryas [this message]
2023-01-17 22:25       ` Peter Delevoryas
2023-01-16 23:56 ` [PATCH v2 2/5] hw/arm/aspeed: Replace aspeed_eeprom_init with at24c_eeprom_init Peter Delevoryas
2023-01-16 23:56 ` [PATCH v2 3/5] hw/nvram/eeprom_at24c: Add init_rom field and at24c_eeprom_init_rom helper Peter Delevoryas
2023-01-17  7:35   ` Cédric Le Goater
2023-01-17 17:57     ` Peter Delevoryas
2023-01-16 23:56 ` [PATCH v2 4/5] hw/arm/aspeed: Add aspeed_eeprom.c Peter Delevoryas
2023-01-17  7:39   ` Cédric Le Goater
2023-01-17  8:08     ` Philippe Mathieu-Daudé
2023-01-17  9:20       ` Cédric Le Goater
2023-01-17 18:34       ` Peter Delevoryas
2023-01-17 17:59     ` Peter Delevoryas
2023-01-16 23:56 ` [PATCH v2 5/5] hw/nvram/eeprom_at24c: Make reset behavior more like hardware Peter Delevoryas
2023-01-17  7:42   ` Cédric Le Goater
2023-01-17 18:29     ` 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=Y8bprzjwzIRXej60@pdel-mbp \
    --to=peter@pjd.dev \
    --cc=andrew@aj.id.au \
    --cc=clg@kaod.org \
    --cc=hskinnemoen@google.com \
    --cc=joel@jms.id.au \
    --cc=kfting@nuvoton.com \
    --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).