[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/12] hw/block/fdc-isa: Expose struct FDCtrlISABus
From: |
Bernhard Beschow |
Subject: |
[PATCH 06/12] hw/block/fdc-isa: Expose struct FDCtrlISABus |
Date: |
Sun, 17 Dec 2023 15:41:42 +0100 |
Exposing device structs in headers is encuraged by qdev guidelines.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
include/hw/block/fdc-isa.h | 15 +++++++++++++++
hw/block/fdc-isa.c | 17 -----------------
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/include/hw/block/fdc-isa.h b/include/hw/block/fdc-isa.h
index 42abd001dd..965c749c96 100644
--- a/include/hw/block/fdc-isa.h
+++ b/include/hw/block/fdc-isa.h
@@ -3,9 +3,24 @@
#include "exec/hwaddr.h"
#include "qapi/qapi-types-block.h"
+#include "hw/block/fdc.h"
+#include "hw/isa/isa.h"
#define TYPE_ISA_FDC "isa-fdc"
+OBJECT_DECLARE_SIMPLE_TYPE(FDCtrlISABus, ISA_FDC)
+
+struct FDCtrlISABus {
+ ISADevice parent_obj;
+
+ uint32_t iobase;
+ uint32_t irq;
+ uint32_t dma;
+ FDCtrl state;
+ int32_t bootindexA;
+ int32_t bootindexB;
+};
+
void isa_fdc_init_drives(ISADevice *fdc, DriveInfo **fds);
void fdctrl_init_sysbus(qemu_irq irq, hwaddr mmio_base, DriveInfo **fds);
void sun4m_fdctrl_init(qemu_irq irq, hwaddr io_base,
diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c
index 7058d4118f..090dc03381 100644
--- a/hw/block/fdc-isa.c
+++ b/hw/block/fdc-isa.c
@@ -34,12 +34,10 @@
#include "qemu/timer.h"
#include "hw/acpi/acpi_aml_interface.h"
#include "hw/irq.h"
-#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "hw/qdev-properties-system.h"
#include "migration/vmstate.h"
#include "hw/block/block.h"
-#include "hw/block/fdc.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
@@ -49,21 +47,6 @@
#include "trace.h"
#include "qom/object.h"
-OBJECT_DECLARE_SIMPLE_TYPE(FDCtrlISABus, ISA_FDC)
-
-struct FDCtrlISABus {
- /*< private >*/
- ISADevice parent_obj;
- /*< public >*/
-
- uint32_t iobase;
- uint32_t irq;
- uint32_t dma;
- struct FDCtrl state;
- int32_t bootindexA;
- int32_t bootindexB;
-};
-
static void fdctrl_external_reset_isa(DeviceState *d)
{
FDCtrlISABus *isa = ISA_FDC(d);
--
2.43.0
- [PATCH 00/12] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions, Bernhard Beschow, 2023/12/17
- [PATCH 01/12] hw: Remove unused includes of hw/block/fdc.h, Bernhard Beschow, 2023/12/17
- [PATCH 02/12] hw/i386/pc: No need to include hw/block/fdc.h in header, Bernhard Beschow, 2023/12/17
- [PATCH 03/12] hw/block/fdc-isa: Rename header to match source file, Bernhard Beschow, 2023/12/17
- [PATCH 04/12] hw/block/fdc: Expose internal header, Bernhard Beschow, 2023/12/17
- [PATCH 05/12] hw/block/fdc: Move constant #define to where it is imposed, Bernhard Beschow, 2023/12/17
- [PATCH 07/12] MAINTAINERS: Add include/hw/char/serial*.h to the "PC Chipset" section, Bernhard Beschow, 2023/12/17
- [PATCH 06/12] hw/block/fdc-isa: Expose struct FDCtrlISABus,
Bernhard Beschow <=
- [PATCH 08/12] hw/char/serial-isa: Export struct ISASerialState, Bernhard Beschow, 2023/12/17
- [PATCH 09/12] exec/ioport: Resolve redundant .base attribute in struct MemoryRegionPortio, Bernhard Beschow, 2023/12/17
- [PATCH 11/12] exec/ioport: Add portio_list_set_enabled(), Bernhard Beschow, 2023/12/17
- [PATCH 10/12] exec/ioport: Add portio_list_set_address(), Bernhard Beschow, 2023/12/17
- [PATCH 12/12] hw/isa/vt82c686: Implement relocation of SuperI/O functions, Bernhard Beschow, 2023/12/17