mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
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>
This commit is contained in:
parent
3c47beb8de
commit
afb6e20429
2 changed files with 159 additions and 143 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue