[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 10/12] hw/char/parallel-isa: Implement relocation and toggling
From: |
Bernhard Beschow |
Subject: |
[PATCH v2 10/12] hw/char/parallel-isa: Implement relocation and toggling for TYPE_ISA_PARALLEL |
Date: |
Mon, 18 Dec 2023 19:51:12 +0100 |
Implement isa_parallel_set_{enabled,iobase} in order to implement relocation and
toggling of SuperI/O functions in the VIA south bridges without breaking
encapsulation.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
include/hw/char/parallel-isa.h | 3 +++
hw/char/parallel-isa.c | 14 ++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/include/hw/char/parallel-isa.h b/include/hw/char/parallel-isa.h
index 3b783bd08d..5284b2ffec 100644
--- a/include/hw/char/parallel-isa.h
+++ b/include/hw/char/parallel-isa.h
@@ -29,4 +29,7 @@ struct ISAParallelState {
PortioList portio_list;
};
+void isa_parallel_set_iobase(ISADevice *parallel, hwaddr iobase);
+void isa_parallel_set_enabled(ISADevice *parallel, bool enabled);
+
#endif /* HW_PARALLEL_ISA_H */
diff --git a/hw/char/parallel-isa.c b/hw/char/parallel-isa.c
index ab0f879998..a5ce6ee13a 100644
--- a/hw/char/parallel-isa.c
+++ b/hw/char/parallel-isa.c
@@ -41,3 +41,17 @@ void parallel_hds_isa_init(ISABus *bus, int n)
}
}
}
+
+void isa_parallel_set_iobase(ISADevice *parallel, hwaddr iobase)
+{
+ ISAParallelState *s = ISA_PARALLEL(parallel);
+
+ parallel->ioport_id = iobase;
+ s->iobase = iobase;
+ portio_list_set_address(&s->portio_list, s->iobase);
+}
+
+void isa_parallel_set_enabled(ISADevice *parallel, bool enabled)
+{
+ portio_list_set_enabled(&ISA_PARALLEL(parallel)->portio_list, enabled);
+}
--
2.43.0
- [PATCH v2 07/12] exec/ioport: Add portio_list_set_enabled(), (continued)
- [PATCH v2 07/12] exec/ioport: Add portio_list_set_enabled(), Bernhard Beschow, 2023/12/18
- [PATCH v2 05/12] exec/ioport: Resolve redundant .base attribute in struct MemoryRegionPortio, Bernhard Beschow, 2023/12/18
- [PATCH v2 06/12] exec/ioport: Add portio_list_set_address(), Bernhard Beschow, 2023/12/18
- [PATCH v2 09/12] hw/char/serial-isa: Implement relocation and toggling for TYPE_ISA_SERIAL, Bernhard Beschow, 2023/12/18
- [PATCH v2 12/12] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions, Bernhard Beschow, 2023/12/18
- [PATCH v2 10/12] hw/char/parallel-isa: Implement relocation and toggling for TYPE_ISA_PARALLEL,
Bernhard Beschow <=
- [PATCH v2 08/12] hw/block/fdc-isa: Implement relocation and toggling for TYPE_ISA_FDC, Bernhard Beschow, 2023/12/18
- [PATCH v2 11/12] hw/ppc/pegasos2: Let pegasos2 machine configure SuperI/O functions, Bernhard Beschow, 2023/12/18