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:
parent
6f6695b136
commit
72d3d8f052
@ -17,6 +17,7 @@
|
|||||||
#include "sysemu/blockdev.h"
|
#include "sysemu/blockdev.h"
|
||||||
#include "chardev/char.h"
|
#include "chardev/char.h"
|
||||||
#include "hw/isa/superio.h"
|
#include "hw/isa/superio.h"
|
||||||
|
#include "hw/input/i8042.h"
|
||||||
#include "hw/char/serial.h"
|
#include "hw/char/serial.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
|
||||||
@ -143,6 +144,8 @@ static void isa_superio_realize(DeviceState *dev, Error **errp)
|
|||||||
k->floppy.get_irq(sio, 0) : -1);
|
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)
|
static void isa_superio_class_init(ObjectClass *oc, void *data)
|
||||||
|
@ -641,7 +641,6 @@ static void ppc_prep_init(MachineState *machine)
|
|||||||
hd[2 * i],
|
hd[2 * i],
|
||||||
hd[2 * i + 1]);
|
hd[2 * i + 1]);
|
||||||
}
|
}
|
||||||
isa_create_simple(isa_bus, TYPE_I8042);
|
|
||||||
|
|
||||||
cpu = POWERPC_CPU(first_cpu);
|
cpu = POWERPC_CPU(first_cpu);
|
||||||
sysctrl->reset_irq = cpu->env.irq_inputs[PPC6xx_INPUT_HRESET];
|
sysctrl->reset_irq = cpu->env.irq_inputs[PPC6xx_INPUT_HRESET];
|
||||||
|
@ -30,6 +30,7 @@ typedef struct ISASuperIODevice {
|
|||||||
ISADevice *parallel[MAX_PARALLEL_PORTS];
|
ISADevice *parallel[MAX_PARALLEL_PORTS];
|
||||||
ISADevice *serial[MAX_SERIAL_PORTS];
|
ISADevice *serial[MAX_SERIAL_PORTS];
|
||||||
ISADevice *floppy;
|
ISADevice *floppy;
|
||||||
|
ISADevice *kbc;
|
||||||
} ISASuperIODevice;
|
} ISASuperIODevice;
|
||||||
|
|
||||||
typedef struct ISASuperIOFuncs {
|
typedef struct ISASuperIOFuncs {
|
||||||
|
Loading…
Reference in New Issue
Block a user