Re: [Qemu-devel] [PATCH 3/3] qtest: Add PIIX4 SMBus support for libqos

2014-06-09 Thread Paolo Bonzini
Il 09/06/2014 10:55, Marc Marí ha scritto: +static void send_and_receive(void) +{ +uint8_t i; +uint8_t buf = 0; +uint64_t big_buf = 0; Probably uint32_t since you only read 4 bytes. +for (i = EEPROM_TEST_ADDR; i < EEPROM_TEST_ADDR+8; ++i) { +i2c_recv(i2c, i, &buf, 1);

[Qemu-devel] [PATCH 3/3] qtest: Add PIIX4 SMBus support for libqos

2014-06-09 Thread Marc Marí
Add support for the SMBus protocol on the PIIX4 chipset. Add a test for EEPROMs using this interface. Signed-off-by: Marc Marí --- tests/Makefile |5 + tests/eeprom-test.c| 58 tests/libqos/i2c.h |5 +- tests/libqos/smbus-piix4.c | 220