Re: [Qemu-devel] [PATCH v1 1/6] i2c: support address ranges

2013-02-20 Thread Paolo Bonzini
Il 20/02/2013 13:30, Peter Crosthwaite ha scritto: > Ok, > > I do wonder why the address itselt in VMSDs however and my best guess > is the intention is that devices can modify their address at runtime > (phyiscally very possible and valid with I2C). So what happens if a > device changes the value

Re: [Qemu-devel] [PATCH v1 1/6] i2c: support address ranges

2013-02-20 Thread Peter Crosthwaite
On Wed, Feb 20, 2013 at 5:27 PM, Paolo Bonzini wrote: > Il 20/02/2013 06:29, Peter Crosthwaite ha scritto: >> @@ -192,12 +197,13 @@ static int i2c_slave_post_load(void *opaque, int >> version_id) >> >> const VMStateDescription vmstate_i2c_slave = { >> .name = "I2CSlave", >> -.version_id

Re: [Qemu-devel] [PATCH v1 1/6] i2c: support address ranges

2013-02-20 Thread Paolo Bonzini
Il 20/02/2013 06:29, Peter Crosthwaite ha scritto: > @@ -192,12 +197,13 @@ static int i2c_slave_post_load(void *opaque, int > version_id) > > const VMStateDescription vmstate_i2c_slave = { > .name = "I2CSlave", > -.version_id = 1, > -.minimum_version_id = 1, > -.minimum_version

[Qemu-devel] [PATCH v1 1/6] i2c: support address ranges

2013-02-19 Thread Peter Crosthwaite
Some I2C devices (eg m24c08) can decode a linear range of addresses (e.g. 0b10100xx). Add the address_range field to I2C slave that specifies the number of consecutive addresses the device decodes. Signed-off-by: Peter Crosthwaite --- hw/i2c.c | 14 ++ hw/i2c.h |6 ++ 2 fi