Commit 72d3d8f0 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Paolo Bonzini
Browse files

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: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Message-Id: <20180308223946.26784-14-f4bug@amsat.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 6f6695b1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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)
+0 −1
Original line number Diff line number Diff line
@@ -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];
+1 −0
Original line number Diff line number Diff line
@@ -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 {