[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/60] hw/block/fdc-sysbus: Move iomem from FDCtrl to FDCtrlSysBus
From: |
Michael S. Tsirkin |
Subject: |
[PULL 23/60] hw/block/fdc-sysbus: Move iomem from FDCtrl to FDCtrlSysBus |
Date: |
Wed, 14 Feb 2024 06:14:27 -0500 |
From: Bernhard Beschow <shentey@gmail.com>
FDCtrl::iomem isn't used inside FDCtrl context but only inside FDCtrlSysBus
context, so move it there.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20240114123911.4877-3-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/block/fdc-internal.h | 2 --
hw/block/fdc-sysbus.c | 6 ++++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/block/fdc-internal.h b/hw/block/fdc-internal.h
index fef2bfbbf5..e219623dc7 100644
--- a/hw/block/fdc-internal.h
+++ b/hw/block/fdc-internal.h
@@ -25,7 +25,6 @@
#ifndef HW_BLOCK_FDC_INTERNAL_H
#define HW_BLOCK_FDC_INTERNAL_H
-#include "exec/memory.h"
#include "hw/block/block.h"
#include "hw/block/fdc.h"
#include "qapi/qapi-types-block.h"
@@ -91,7 +90,6 @@ typedef struct FDrive {
} FDrive;
struct FDCtrl {
- MemoryRegion iomem;
qemu_irq irq;
/* Controller state */
QEMUTimer *result_timer;
diff --git a/hw/block/fdc-sysbus.c b/hw/block/fdc-sysbus.c
index 266bc4d145..035bc08975 100644
--- a/hw/block/fdc-sysbus.c
+++ b/hw/block/fdc-sysbus.c
@@ -26,6 +26,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qom/object.h"
+#include "exec/memory.h"
#include "hw/sysbus.h"
#include "hw/block/fdc.h"
#include "migration/vmstate.h"
@@ -52,6 +53,7 @@ struct FDCtrlSysBus {
/*< public >*/
struct FDCtrl state;
+ MemoryRegion iomem;
};
static uint64_t fdctrl_read_mem(void *opaque, hwaddr reg, unsigned ize)
@@ -146,11 +148,11 @@ static void sysbus_fdc_common_instance_init(Object *obj)
qdev_set_legacy_instance_id(dev, 0 /* io */, 2); /* FIXME */
- memory_region_init_io(&fdctrl->iomem, obj,
+ memory_region_init_io(&sys->iomem, obj,
sbdc->use_strict_io ? &fdctrl_mem_strict_ops
: &fdctrl_mem_ops,
fdctrl, "fdc", 0x08);
- sysbus_init_mmio(sbd, &fdctrl->iomem);
+ sysbus_init_mmio(sbd, &sys->iomem);
sysbus_init_irq(sbd, &fdctrl->irq);
qdev_init_gpio_in(dev, fdctrl_handle_tc, 1);
--
MST
- [PULL 14/60] apic, i386/tcg: add x2apic transitions, (continued)
- [PULL 14/60] apic, i386/tcg: add x2apic transitions, Michael S. Tsirkin, 2024/02/14
- [PULL 13/60] apic: add support for x2APIC mode, Michael S. Tsirkin, 2024/02/14
- [PULL 15/60] intel_iommu: allow Extended Interrupt Mode when using userspace APIC, Michael S. Tsirkin, 2024/02/14
- [PULL 16/60] test: bios-tables-test: prepare IVRS change in ACPI table, Michael S. Tsirkin, 2024/02/14
- [PULL 11/60] hw/virtio: derive vhost-user-input from vhost-user-base, Michael S. Tsirkin, 2024/02/14
- [PULL 17/60] amd_iommu: report x2APIC support to the operating system, Michael S. Tsirkin, 2024/02/14
- [PULL 18/60] test: bios-tables-test: add IVRS changed binary, Michael S. Tsirkin, 2024/02/14
- [PULL 19/60] hw/i386/x86: Reverse if statement, Michael S. Tsirkin, 2024/02/14
- [PULL 20/60] hw/i386/x86: Fix PIC interrupt handling if APIC is globally disabled, Michael S. Tsirkin, 2024/02/14
- [PULL 21/60] target/i386/cpu: Fix typo in comment, Michael S. Tsirkin, 2024/02/14
- [PULL 23/60] hw/block/fdc-sysbus: Move iomem from FDCtrl to FDCtrlSysBus,
Michael S. Tsirkin <=
- [PULL 24/60] hw/char/parallel: Move portio_list from ParallelState to ISAParallelState, Michael S. Tsirkin, 2024/02/14
- [PULL 25/60] exec/ioport: Resolve redundant .base attribute in struct MemoryRegionPortio, Michael S. Tsirkin, 2024/02/14
- [PULL 26/60] exec/ioport: Add portio_list_set_address(), Michael S. Tsirkin, 2024/02/14
- [PULL 27/60] exec/ioport: Add portio_list_set_enabled(), Michael S. Tsirkin, 2024/02/14
- [PULL 28/60] hw/block/fdc-isa: Implement relocation and enabling/disabling for TYPE_ISA_FDC, Michael S. Tsirkin, 2024/02/14
- [PULL 29/60] hw/char/serial-isa: Implement relocation and enabling/disabling for TYPE_ISA_SERIAL, Michael S. Tsirkin, 2024/02/14
- [PULL 30/60] hw/char/parallel-isa: Implement relocation and enabling/disabling for TYPE_ISA_PARALLEL, Michael S. Tsirkin, 2024/02/14
- [PULL 31/60] hw/ppc/pegasos2: Let pegasos2 machine configure SuperI/O functions, Michael S. Tsirkin, 2024/02/14
- [PULL 32/60] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions, Michael S. Tsirkin, 2024/02/14
- [PULL 33/60] vhost-user.rst: Fix vring address description, Michael S. Tsirkin, 2024/02/14