b704d63d09
pckbd: remove legacy i8042_mm_init() function
...
This legacy function is only used during the initialisation of the MIPS magnum
machine, so inline its functionality directly into mips_jazz_init() and then
remove it.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Tested-by: Helge Deller <deller@gmx.de >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220712215251.7944-41-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
9d1a425037
pckbd: don't use legacy ps2_mouse_init() function
...
Instantiate the PS2 mouse device within KBDState using
object_initialize_child() in i8042_initfn() and i8042_mmio_init() and realize
it in i8042_realizefn() and i8042_mmio_realize() accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Tested-by: Helge Deller <deller@gmx.de >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220712215251.7944-39-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
652fbff420
pckbd: don't use legacy ps2_kbd_init() function
...
Instantiate the PS2 keyboard device within KBDState using
object_initialize_child() in i8042_initfn() and i8042_mmio_init() and realize
it in i8042_realizefn() and i8042_mmio_realize() accordingly.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Tested-by: Helge Deller <deller@gmx.de >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220712215251.7944-37-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2022-07-18 19:28:46 +01:00
38f426b8af
pckbd: add QEMU interface comment for I8042 device
...
This describes the I8042 device interface implemented within QEMU.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20220624134109.881989-54-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
2022-06-26 18:40:12 +01:00
57de3c1d35
pckbd: add QEMU interface comment for I8042_MMIO device
...
This describes the I8042_MMIO device interface implemented within QEMU.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Message-Id: <20220624134109.881989-51-mark.cave-ayland@ilande.co.uk >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
2022-06-26 18:40:12 +01:00
c2b1747973
pckbd: replace irq_kbd and irq_mouse with qemu_irq array in KBDState
...
This allows both IRQs to be declared as a single qdev gpio array.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220624134109.881989-36-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:12 +01:00
01d924dce8
pckbd: move mapping of I8042_MMIO registers to MIPS magnum machine
...
Now that the register memory region is exposed as a SysBus memory region, move
the mapping of the I8042_MMIO registers from i8042_mm_init() to the MIPS magnum
machine (which is its only user).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220624134109.881989-29-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:12 +01:00
903dd0e49b
pckbd: alter i8042_mm_init() to return a I8042_MMIO device
...
This exposes the I8042_MMIO device to the caller to allow the register memory
region to be mapped outside of i8042_mm_init().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220624134109.881989-28-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:12 +01:00
f4de68d1d4
pckbd: implement i8042_mmio_realize() function
...
Move the initialisation of the register memory region to the I8042_MMIO device
realize function and expose it using sysbus_init_mmio().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220624134109.881989-26-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:12 +01:00
7b9fff290c
pckbd: add size qdev property to I8042_MMIO device
...
This will soon be used to set the size of the register memory region using a
qdev property.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220624134109.881989-25-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:12 +01:00
150ee013ed
pckbd: introduce new I8042_MMIO QOM type
...
Currently i8042_mm_init() creates a new KBDState directly which is used by the MIPS
magnum machine. Introduce a new I8042_MMIO QOM type that will soon be used to
allow the MIPS magnum machine to be wired up using standard qdev GPIOs.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Acked-by: Helge Deller <deller@gmx.de >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-Id: <20220624134109.881989-22-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:11 +01:00
c9849a71b9
pckbd: move ISAKBDState from pckbd.c to i8042.h
...
This allows the QOM types in pckbd.c to be used elsewhere by simply including
i8042.h.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Acked-by: Helge Deller <deller@gmx.de >
Message-Id: <20220624134109.881989-21-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:11 +01:00
77adda52ef
pckbd: move KBDState from pckbd.c to i8042.h
...
This allows the QOM types in pckbd.c to be used elsewhere by simply including
i8042.h.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Acked-by: Helge Deller <deller@gmx.de >
Message-Id: <20220624134109.881989-20-mark.cave-ayland@ilande.co.uk >
2022-06-26 18:40:11 +01:00
5334bf5703
hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table
...
This can allow the guest OS to determine more easily if i8042 controller
is present in the system or not, so it doesn't need to do probing of the
controller, but just initialize it immediately, before enumerating the
ACPI AML namespace.
The 8042 bit in IAPC_BOOT_ARCH was introduced from ACPI spec v2 (FADT
revision 2 and above). Therefore, in this change, we only enable this bit for
x86/q35 machine types since x86/i440fx machines use FADT ACPI table with
revision 1.
Signed-off-by: Liav Albani <liavalb@gmail.com >
Signed-off-by: Ani Sinha <ani@anisinha.ca >
Message-Id: <20220304154032.2071585-3-ani@anisinha.ca >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
2022-03-06 16:06:16 -05:00
8063396bf3
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
...
This converts existing DECLARE_INSTANCE_CHECKER usage to
OBJECT_DECLARE_SIMPLE_TYPE when possible.
$ ./scripts/codeconverter/converter.py -i \
--pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Acked-by: Paul Durrant <paul@xen.org >
Message-Id: <20200916182519.415636-6-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-09-18 14:12:32 -04:00
8110fa1d94
Use DECLARE_*CHECKER* macros
...
Generated using:
$ ./scripts/codeconverter/converter.py -i \
--pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]')
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Message-Id: <20200831210740.126168-12-ehabkost@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Message-Id: <20200831210740.126168-13-ehabkost@redhat.com >
Message-Id: <20200831210740.126168-14-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-09-09 09:27:09 -04:00
db1015e92e
Move QOM typedefs and add missing includes
...
Some typedefs and macros are defined after the type check macros.
This makes it difficult to automatically replace their
definitions with OBJECT_DECLARE_TYPE.
Patch generated using:
$ ./scripts/codeconverter/converter.py -i \
--pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]')
which will split "typdef struct { ... } TypedefName"
declarations.
Followed by:
$ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \
$(git grep -l '' -- '*.[ch]')
which will:
- move the typedefs and #defines above the type check macros
- add missing #include "qom/object.h" lines if necessary
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Message-Id: <20200831210740.126168-9-ehabkost@redhat.com >
Reviewed-by: Juan Quintela <quintela@redhat.com >
Message-Id: <20200831210740.126168-10-ehabkost@redhat.com >
Message-Id: <20200831210740.126168-11-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-09-09 09:26:43 -04:00
41ea82055c
pckbd: Move QOM macro to header
...
Move the I8042 macro close to the TYPE_I8042 define.
This will make future conversion to OBJECT_DECLARE* easier.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com >
Message-Id: <20200825192110.3528606-34-ehabkost@redhat.com >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-08-27 14:04:54 -04:00
0fe4bb3241
vmmouse: replace PROP_PTR with PROP_LINK
...
While at it, use the expected type.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2020-01-07 17:24:29 +04:00
650d103d3e
Include hw/hw.h exactly where needed
...
In my "build everything" tree, changing hw/hw.h triggers a recompile
of some 2600 out of 6600 objects (not counting tests and objects that
don't depend on qemu/osdep.h).
The previous commits have left only the declaration of hw_error() in
hw/hw.h. This permits dropping most of its inclusions. Touching it
now recompiles less than 200 objects.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Message-Id: <20190812052359.30071-19-armbru@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
2019-08-16 13:31:52 +02:00
47973a2dbf
hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h
...
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Acked-by: David Gibson <david@gibson.dropbear.id.au > (hw/ppc)
Message-Id: <20180308223946.26784-4-f4bug@amsat.org >
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2018-03-12 16:12:48 +01:00