mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
i2c: smbus: convert to QEMU Object Model
This converts two types because smbus is implemented as a subclass of i2c. It's extremely difficult to convert these two independently. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
9e07bdf816
commit
b5ea932781
15 changed files with 332 additions and 165 deletions
23
hw/z2.c
23
hw/z2.c
|
@ -273,14 +273,21 @@ static VMStateDescription vmstate_aer915_state = {
|
|||
}
|
||||
};
|
||||
|
||||
static I2CSlaveInfo aer915_info = {
|
||||
.qdev.name = "aer915",
|
||||
.qdev.size = sizeof(AER915State),
|
||||
.qdev.vmsd = &vmstate_aer915_state,
|
||||
.init = aer915_init,
|
||||
.event = aer915_event,
|
||||
.recv = aer915_recv,
|
||||
.send = aer915_send
|
||||
static void aer915_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
I2CSlaveClass *k = I2C_SLAVE_CLASS(klass);
|
||||
|
||||
k->init = aer915_init;
|
||||
k->event = aer915_event;
|
||||
k->recv = aer915_recv;
|
||||
k->send = aer915_send;
|
||||
}
|
||||
|
||||
static DeviceInfo aer915_info = {
|
||||
.name = "aer915",
|
||||
.size = sizeof(AER915State),
|
||||
.vmsd = &vmstate_aer915_state,
|
||||
.class_init = aer915_class_init,
|
||||
};
|
||||
|
||||
static void z2_init(ram_addr_t ram_size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue