[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/25] hw/input/pckbd: Open-code i8042_setup_a20_line() wrapper
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 01/25] hw/input/pckbd: Open-code i8042_setup_a20_line() wrapper |
Date: |
Wed, 21 Feb 2024 22:16:01 +0100 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Since the named GPIO lines are a "public" interface to the device,
we can directly call qdev_connect_gpio_out_named(), making it
consistent with how the other A20 input source (port92) is wired.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Message-Id: <20211218130437.1516929-6-f4bug@amsat.org>
---
include/hw/input/i8042.h | 1 -
hw/i386/pc.c | 3 ++-
hw/input/pckbd.c | 5 -----
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/include/hw/input/i8042.h b/include/hw/input/i8042.h
index 9fb3f8d787..e90f008b66 100644
--- a/include/hw/input/i8042.h
+++ b/include/hw/input/i8042.h
@@ -89,7 +89,6 @@ struct MMIOKBDState {
void i8042_isa_mouse_fake_event(ISAKBDState *isa);
-void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out);
static inline bool i8042_present(void)
{
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 28194014f8..9cbc59665f 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1195,7 +1195,8 @@ static void pc_superio_init(ISABus *isa_bus, bool
create_fdctrl,
port92 = isa_create_simple(isa_bus, TYPE_PORT92);
a20_line = qemu_allocate_irqs(handle_a20_line_change, first_cpu, 2);
- i8042_setup_a20_line(i8042, a20_line[0]);
+ qdev_connect_gpio_out_named(DEVICE(i8042),
+ I8042_A20_LINE, 0, a20_line[0]);
qdev_connect_gpio_out_named(DEVICE(port92),
PORT92_A20_LINE, 0, a20_line[1]);
g_free(a20_line);
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 90a4d9eb40..74f10b640f 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -777,11 +777,6 @@ void i8042_isa_mouse_fake_event(ISAKBDState *isa)
ps2_mouse_fake_event(&s->ps2mouse);
}
-void i8042_setup_a20_line(ISADevice *dev, qemu_irq a20_out)
-{
- qdev_connect_gpio_out_named(DEVICE(dev), I8042_A20_LINE, 0, a20_out);
-}
-
static const VMStateDescription vmstate_kbd_isa = {
.name = "pckbd",
.version_id = 3,
--
2.41.0
- [PULL 00/25] Misc HW patches for 2024-02-21, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 01/25] hw/input/pckbd: Open-code i8042_setup_a20_line() wrapper,
Philippe Mathieu-Daudé <=
- [PULL 02/25] hw/sysbus: Inline and remove sysbus_add_io(), Philippe Mathieu-Daudé, 2024/02/21
- [PULL 03/25] hw/ppc/ppc4xx_pci: Remove unused "hw/ppc/ppc.h" header, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 05/25] hw/ppc/ppc4xx_pci: Move ppc4xx_pci.c to hw/pci-host/, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 04/25] hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 06/25] hw/ppc/ppc440_pcix: Move ppc440_pcix.c to hw/pci-host/, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 08/25] hw/i386/pc_piix: Share pc_cmos_init() invocation between pc and isapc machines, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 09/25] hw/i386/pc: Store pointers to IDE buses in PCMachineState, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 07/25] hw/i2c/smbus_slave: Add object path on error prints, Philippe Mathieu-Daudé, 2024/02/21
- [PULL 10/25] hw/i386/pc: Do pc_cmos_init_late() from pc_machine_done(), Philippe Mathieu-Daudé, 2024/02/21
- [PULL 11/25] hw/i386/x86: Turn apic_xrupt_override into class attribute, Philippe Mathieu-Daudé, 2024/02/21