ppc4xx_i2c: Rewrite to model hardware more closely
authorBALATON Zoltan <balaton@eik.bme.hu>
Thu, 28 Jun 2018 22:38:33 +0000 (00:38 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 2 Jul 2018 23:56:52 +0000 (09:56 +1000)
commitafb6e20429d5853e79e9a8af4a68b51d14b0c0c1
treed1d4fe98edd7af98bfe978128a3205b102dd3dfe
parent3c47beb8defb8cab04ea2e19bc3fd8c65bf9af7d
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>
hw/i2c/ppc4xx_i2c.c
include/hw/i2c/ppc4xx_i2c.h