[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 33/50] ps2: introduce ps2_lower_irq() instead of calling update_i
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 33/50] ps2: introduce ps2_lower_irq() instead of calling update_irq() directly |
Date: |
Sun, 22 May 2022 19:18:19 +0100 |
This consolidates the logic of lowering the PS2 IRQ into one single function.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/input/ps2.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 55a2ac08c2..214dda60bf 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -177,6 +177,11 @@ static void ps2_raise_irq(PS2State *s)
s->update_irq(s->update_arg, 1);
}
+static void ps2_lower_irq(PS2State *s)
+{
+ s->update_irq(s->update_arg, 0);
+}
+
void ps2_queue(PS2State *s, int b)
{
if (PS2_QUEUE_SIZE - s->queue.count < 1) {
@@ -554,7 +559,7 @@ uint32_t ps2_read_data(PS2State *s)
q->cwptr = -1;
}
/* reading deasserts IRQ */
- s->update_irq(s->update_arg, 0);
+ ps2_lower_irq(s);
/* reassert IRQs if data left */
if (q->count) {
ps2_raise_irq(s);
@@ -1001,7 +1006,7 @@ static void ps2_reset(DeviceState *dev)
s->write_cmd = -1;
ps2_reset_queue(s);
- s->update_irq(s->update_arg, 0);
+ ps2_lower_irq(s);
}
static void ps2_common_post_load(PS2State *s)
--
2.20.1
- Re: [PATCH 29/50] pckbd: more vmstate_register() from i8042_mm_init() to i8042_mmio_realize(), (continued)
- [PATCH 31/50] ps2: make ps2_raise_irq() function static, Mark Cave-Ayland, 2022/05/22
- [PATCH 21/50] pckbd: introduce new I8042_MMIO QOM type, Mark Cave-Ayland, 2022/05/22
- [PATCH 25/50] pckbd: implement i8042_mmio_realize() function, Mark Cave-Ayland, 2022/05/22
- [PATCH 36/50] pl050: switch over from update_irq() function to PS2 device gpio, Mark Cave-Ayland, 2022/05/22
- [PATCH 35/50] pckbd: replace irq_kbd and irq_mouse with qemu_irq array in KBDState, Mark Cave-Ayland, 2022/05/22
- [PATCH 30/50] pckbd: move ps2_kbd_init() and ps2_mouse_init() to i8042_mmio_realize(), Mark Cave-Ayland, 2022/05/22
- [PATCH 27/50] pckbd: alter i8042_mm_init() to return a I8042_MMIO device, Mark Cave-Ayland, 2022/05/22
- [PATCH 39/50] lasips2: rename lasips2_init() to lasips2_initfn() and update it to return the LASIPS2 device, Mark Cave-Ayland, 2022/05/22
- [PATCH 34/50] ps2: add gpio for output IRQ and optionally use it in ps2_raise_irq() and ps2_lower_irq(), Mark Cave-Ayland, 2022/05/22
- [PATCH 33/50] ps2: introduce ps2_lower_irq() instead of calling update_irq() directly,
Mark Cave-Ayland <=
- [PATCH 37/50] lasips2: QOMify LASIPS2State, Mark Cave-Ayland, 2022/05/22
- [PATCH 32/50] ps2: use ps2_raise_irq() instead of calling update_irq() directly, Mark Cave-Ayland, 2022/05/22
- [PATCH 38/50] lasips2: move lasips2 QOM types from lasips2.c to lasips2.h, Mark Cave-Ayland, 2022/05/22
- [PATCH 41/50] lasips2: move mapping of LASIPS2 registers to HPPA machine, Mark Cave-Ayland, 2022/05/22
- [PATCH 40/50] lasips2: implement lasips2_init() function, Mark Cave-Ayland, 2022/05/22
- [PATCH 42/50] lasips2: move initialisation of PS2 ports from lasi_initfn() to lasi_init(), Mark Cave-Ayland, 2022/05/22
- [PATCH 43/50] lasips2: add base property, Mark Cave-Ayland, 2022/05/22
- [PATCH 48/50] pckbd: add i8042_reset() function to I8042 device, Mark Cave-Ayland, 2022/05/22
- [PATCH 44/50] lasips2: implement lasips2_realize(), Mark Cave-Ayland, 2022/05/22
- [PATCH 45/50] lasips2: use qdev gpio for output IRQ, Mark Cave-Ayland, 2022/05/22