openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: www <ouyangxuan10@163.com>
Cc: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: [openbmc-qemu]: How does the aspeed-i2c driver in QEMU work?
Date: Thu, 24 Jun 2021 13:27:50 +0200	[thread overview]
Message-ID: <96b19661-e1fb-b5e4-5bcb-2cc3f5fe46b6@kaod.org> (raw)
In-Reply-To: <21591ab0.353f.17a3d1a85d2.Coremail.ouyangxuan10@163.com>

Hello Byron,

Please copy the openbmc mailing list or better the qemu-devel list for such
questions. 
 
On 6/24/21 10:19 AM, www wrote:
> hi Cédric Le Goater,
> 
> I see that you added the aspeed-i2c driver in QEMU. I have some questions about the running of QEMU:
> 
> When there is a function in BMC image that uses I2C to read information from EEPROM, I2C driver in image will set aspeed I2C register, send data to EEPROM and read information from EEPROM(Also read and write aspeeed I2C register). How does QEMU cooperate at this time?
> 
> There is an smbus_slave.c, aspeed_i2c.c. and smbus_eeprom.c in QEMU, how do they cooperate?

aspeed_i2c is the I2C controller model, it defines a set of busses for the 
Aspeed SoC. I2C devices are plugged into these busses in the *i2c_init()
routine of each machine (See file aspeed.c). A couple of these machines
(sonorapass, witherspoon ) have EEPROMS. Take a look at these. The I2C
protocol is modeled under the hw/i2c/core.c file, it links the devices
to the controller.

Cheers,

C.

           reply	other threads:[~2021-06-24 13:56 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <21591ab0.353f.17a3d1a85d2.Coremail.ouyangxuan10@163.com>]

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=96b19661-e1fb-b5e4-5bcb-2cc3f5fe46b6@kaod.org \
    --to=clg@kaod.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=ouyangxuan10@163.com \
    /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).