[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/11] hw/intc/i8259: Document i8259_init()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 01/11] hw/intc/i8259: Document i8259_init() |
Date: |
Fri, 10 Feb 2023 17:37:34 +0100 |
i8259_init() helper creates a i8259 device on an ISA bus,
connects its IRQ output to the parent's input IRQ, and
returns an array of 16 ISA input IRQs.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/intc/i8259.c | 4 ++--
include/hw/intc/i8259.h | 10 +++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
index 0261f087b2..17910f3bcb 100644
--- a/hw/intc/i8259.c
+++ b/hw/intc/i8259.c
@@ -406,7 +406,7 @@ static void pic_realize(DeviceState *dev, Error **errp)
pc->parent_realize(dev, errp);
}
-qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
+qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq_in)
{
qemu_irq *irq_set;
DeviceState *dev;
@@ -418,7 +418,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq)
isadev = i8259_init_chip(TYPE_I8259, bus, true);
dev = DEVICE(isadev);
- qdev_connect_gpio_out(dev, 0, parent_irq);
+ qdev_connect_gpio_out(dev, 0, parent_irq_in);
for (i = 0 ; i < 8; i++) {
irq_set[i] = qdev_get_gpio_in(dev, i);
}
diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h
index a0e34dd990..c412575775 100644
--- a/include/hw/intc/i8259.h
+++ b/include/hw/intc/i8259.h
@@ -4,7 +4,15 @@
/* i8259.c */
extern PICCommonState *isa_pic;
-qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq);
+
+/*
+ * i8259_init()
+ *
+ * Create a i8259 device on an ISA @bus,
+ * connect its output to @parent_irq_in,
+ * return an (allocated) array of 16 input IRQs.
+ */
+qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq_in);
qemu_irq *kvm_i8259_init(ISABus *bus);
int pic_get_output(PICCommonState *s);
int pic_read_irq(PICCommonState *s);
--
2.38.1
- [PATCH 00/11] hw/isa: More housekeeping, Philippe Mathieu-Daudé, 2023/02/10
- [PATCH 01/11] hw/intc/i8259: Document i8259_init(),
Philippe Mathieu-Daudé <=
- [PATCH 02/11] hw/isa/i82378: Rename output IRQ as 'cpu_intr', Philippe Mathieu-Daudé, 2023/02/10
- [PATCH 03/11] hw/isa/i82378: Remove intermediate IRQ forwarder, Philippe Mathieu-Daudé, 2023/02/10
- [PATCH 04/11] hw/isa/vt82c686: Remove intermediate IRQ forwarder, Philippe Mathieu-Daudé, 2023/02/10
- [PATCH 05/11] hw/mips/jazz: Rename ISA input IRQs as 'isa_irqs_in', Philippe Mathieu-Daudé, 2023/02/10
- [PATCH 06/11] hw/sparc64/sun4u: Keep reference to ISA input IRQs in EbusState, Philippe Mathieu-Daudé, 2023/02/10