diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2018-06-29 00:38:33 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-07-03 09:56:52 +1000 |
commit | afb6e20429d5853e79e9a8af4a68b51d14b0c0c1 (patch) | |
tree | d1d4fe98edd7af98bfe978128a3205b102dd3dfe /include/hw | |
parent | 3c47beb8defb8cab04ea2e19bc3fd8c65bf9af7d (diff) | |
download | qemu-afb6e20429d5853e79e9a8af4a68b51d14b0c0c1.zip qemu-afb6e20429d5853e79e9a8af4a68b51d14b0c0c1.tar.gz qemu-afb6e20429d5853e79e9a8af4a68b51d14b0c0c1.tar.bz2 |
ppc4xx_i2c: Rewrite to model hardware more closely
Rewrite to make it closer to how real device works so that guest OS
drivers can access I2C devices. Previously this was only a hack to
allow U-Boot to get past accessing SPD EEPROMs but to support other
I2C devices and allow guests to access them we need to model real
device more properly.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/i2c/ppc4xx_i2c.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/i2c/ppc4xx_i2c.h b/include/hw/i2c/ppc4xx_i2c.h index ea6c8e1..0891a9c 100644 --- a/include/hw/i2c/ppc4xx_i2c.h +++ b/include/hw/i2c/ppc4xx_i2c.h @@ -46,7 +46,8 @@ typedef struct PPC4xxI2CState { qemu_irq irq; MemoryRegion iomem; bitbang_i2c_interface *bitbang; - uint8_t mdata; + int mdidx; + uint8_t mdata[4]; uint8_t lmadr; uint8_t hmadr; uint8_t cntl; |