diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-23 21:47:51 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-05-23 21:47:51 +0000 |
commit | 3f582262e5443ded25ba6c8f016a114279a3b59f (patch) | |
tree | 5604a51f782ca8d8062ee175db5a07a772d095df /hw/smbus.c | |
parent | 209a4e691d230b01cf44c9f954a34db04d5708be (diff) |
Implement the PXA2xx I2C master controller.
Fix PXA270-specific timers and make minor changes in other PXA parts.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2853 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/smbus.c')
-rw-r--r-- | hw/smbus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/smbus.c b/hw/smbus.c index 651a7a0b97..5189d51dfd 100644 --- a/hw/smbus.c +++ b/hw/smbus.c @@ -193,6 +193,9 @@ SMBusDevice *smbus_device_init(i2c_bus *bus, int address, int size) { SMBusDevice *dev; + if (size < sizeof(SMBusDevice)) + cpu_abort(cpu_single_env, "SMBus struct too small"); + dev = (SMBusDevice *)i2c_slave_init(bus, address, size); dev->i2c.event = smbus_i2c_event; dev->i2c.recv = smbus_i2c_recv; |