[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 24/40] lasips2: introduce port IRQ and new lasips2_port_init() fu
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 24/40] lasips2: introduce port IRQ and new lasips2_port_init() function |
Date: |
Wed, 29 Jun 2022 13:40:10 +0100 |
Introduce a new lasips2_port_init() QOM init function for the LASIPS2_PORT type
and use it to initialise a new gpio for use as a port IRQ. Add a new qemu_irq
representing the gpio as a new irq field within LASIPS2Port.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/input/lasips2.c | 8 ++++++++
include/hw/input/lasips2.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
index 49e5c90b73..6b53153838 100644
--- a/hw/input/lasips2.c
+++ b/hw/input/lasips2.c
@@ -322,9 +322,17 @@ static const TypeInfo lasips2_info = {
.class_init = lasips2_class_init,
};
+static void lasips2_port_init(Object *obj)
+{
+ LASIPS2Port *s = LASIPS2_PORT(obj);
+
+ qdev_init_gpio_out(DEVICE(obj), &s->irq, 1);
+}
+
static const TypeInfo lasips2_port_info = {
.name = TYPE_LASIPS2_PORT,
.parent = TYPE_DEVICE,
+ .instance_init = lasips2_port_init,
.instance_size = sizeof(LASIPS2Port),
.abstract = true,
};
diff --git a/include/hw/input/lasips2.h b/include/hw/input/lasips2.h
index 4c4b471737..a05f26cbd9 100644
--- a/include/hw/input/lasips2.h
+++ b/include/hw/input/lasips2.h
@@ -41,6 +41,7 @@ struct LASIPS2Port {
uint8_t buf;
bool loopback_rbne;
bool birq;
+ qemu_irq irq;
};
#define TYPE_LASIPS2_KBD_PORT "lasips2-kbd-port"
--
2.30.2
- [PATCH 10/40] pl050: don't use legacy ps2_kbd_init() function, (continued)
- [PATCH 10/40] pl050: don't use legacy ps2_kbd_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 16/40] lasips2: QOMify LASIPS2Port, Mark Cave-Ayland, 2022/06/29
- [PATCH 17/40] lasips2: introduce new LASIPS2_KBD_PORT QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 19/40] lasips2: move keyboard port initialisation to new lasips2_kbd_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 18/40] lasips2: introduce new LASIPS2_MOUSE_PORT QOM type, Mark Cave-Ayland, 2022/06/29
- [PATCH 20/40] lasips2: move mouse port initialisation to new lasips2_mouse_port_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 21/40] lasips2: introduce lasips2_kbd_port_class_init() and lasips2_kbd_port_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 23/40] lasips2: rename LASIPS2Port irq field to birq, Mark Cave-Ayland, 2022/06/29
- [PATCH 22/40] lasips2: introduce lasips2_mouse_port_class_init() and lasips2_mouse_port_realize(), Mark Cave-Ayland, 2022/06/29
- [PATCH 25/40] lasips2: introduce LASIPS2PortDeviceClass for the LASIPS2_PORT device, Mark Cave-Ayland, 2022/06/29
- [PATCH 24/40] lasips2: introduce port IRQ and new lasips2_port_init() function,
Mark Cave-Ayland <=
- [PATCH 26/40] lasips2: add named input gpio to port for downstream PS2 device IRQ, Mark Cave-Ayland, 2022/06/29
- [PATCH 28/40] lasips2: switch to using port-based IRQs, Mark Cave-Ayland, 2022/06/29
- [PATCH 27/40] lasips2: add named input gpio to handle incoming port IRQs, Mark Cave-Ayland, 2022/06/29
- [PATCH 30/40] lasips2: standardise on lp name for LASIPS2Port variables, Mark Cave-Ayland, 2022/06/29
- [PATCH 29/40] lasips2: rename LASIPS2Port parent pointer to lasips2, Mark Cave-Ayland, 2022/06/29
- [PATCH 32/40] lasips2: don't use legacy ps2_kbd_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 31/40] lasips2: switch register memory region to DEVICE_BIG_ENDIAN, Mark Cave-Ayland, 2022/06/29
- [PATCH 35/40] pckbd: introduce new vmstate_kbd_mmio VMStateDescription for the I8042_MMIO device, Mark Cave-Ayland, 2022/06/29
- [PATCH 33/40] lasips2: don't use legacy ps2_mouse_init() function, Mark Cave-Ayland, 2022/06/29
- [PATCH 34/40] lasips2: update VMStateDescription for LASIPS2 device, Mark Cave-Ayland, 2022/06/29