summaryrefslogtreecommitdiffstats
path: root/include/hw/i2c
diff options
context:
space:
mode:
authorBALATON Zoltan2018-06-29 00:38:33 +0200
committerDavid Gibson2018-07-03 01:56:52 +0200
commitafb6e20429d5853e79e9a8af4a68b51d14b0c0c1 (patch)
treed1d4fe98edd7af98bfe978128a3205b102dd3dfe /include/hw/i2c
parenthw/ppc: Give sam46ex its own config option (diff)
downloadqemu-afb6e20429d5853e79e9a8af4a68b51d14b0c0c1.tar.gz
qemu-afb6e20429d5853e79e9a8af4a68b51d14b0c0c1.tar.xz
qemu-afb6e20429d5853e79e9a8af4a68b51d14b0c0c1.zip
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/i2c')
-rw-r--r--include/hw/i2c/ppc4xx_i2c.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/i2c/ppc4xx_i2c.h b/include/hw/i2c/ppc4xx_i2c.h
index ea6c8e1a58..0891a9c948 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;