hw/isa/superio: Add a keyboard/mouse controller (8042)

Since the PC87312 inherits this abstract model, we remove the I8042
instance in the PREP machine.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20180308223946.26784-14-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2018-03-08 23:39:34 +01:00 committed by Paolo Bonzini
parent 6f6695b136
commit 72d3d8f052
3 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,7 @@
#include "sysemu/blockdev.h"
#include "chardev/char.h"
#include "hw/isa/superio.h"
#include "hw/input/i8042.h"
#include "hw/char/serial.h"
#include "trace.h"
@ -143,6 +144,8 @@ static void isa_superio_realize(DeviceState *dev, Error **errp)
k->floppy.get_irq(sio, 0) : -1);
}
/* Keyboard, mouse */
sio->kbc = isa_create_simple(bus, TYPE_I8042);
}
static void isa_superio_class_init(ObjectClass *oc, void *data)

View File

@ -641,7 +641,6 @@ static void ppc_prep_init(MachineState *machine)
hd[2 * i],
hd[2 * i + 1]);
}
isa_create_simple(isa_bus, TYPE_I8042);
cpu = POWERPC_CPU(first_cpu);
sysctrl->reset_irq = cpu->env.irq_inputs[PPC6xx_INPUT_HRESET];

View File

@ -30,6 +30,7 @@ typedef struct ISASuperIODevice {
ISADevice *parallel[MAX_PARALLEL_PORTS];
ISADevice *serial[MAX_SERIAL_PORTS];
ISADevice *floppy;
ISADevice *kbc;
} ISASuperIODevice;
typedef struct ISASuperIOFuncs {