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
diff --git a/hw/smbus.c b/hw/smbus.c
index 651a7a0..5189d51 100644
--- a/hw/smbus.c
+++ b/hw/smbus.c
@@ -193,6 +193,9 @@
 {
     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;