[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/20] ide/via: Get rid of via_ide_init()
From: |
John Snow |
Subject: |
[PULL 06/20] ide/via: Get rid of via_ide_init() |
Date: |
Tue, 17 Mar 2020 19:23:15 -0400 |
From: BALATON Zoltan <address@hidden>
Follow example of CMD646 and remove via_ide_init function and do it
directly in board code instead.
Signed-off-by: BALATON Zoltan <address@hidden>
Reviewed-by: Mark Cave-Ayland <address@hidden>
Tested-by: BALATON Zoltan <address@hidden>
Signed-off-by: Mark Cave-Ayland <address@hidden>
Message-id: address@hidden
Signed-off-by: John Snow <address@hidden>
---
include/hw/ide.h | 1 -
hw/ide/via.c | 8 --------
hw/mips/mips_fulong2e.c | 5 ++++-
3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/include/hw/ide.h b/include/hw/ide.h
index 0c7080ed92..dea0ecf5be 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -16,7 +16,6 @@ PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo
**hd_table, int devfn);
PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux);
-void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
/* ide-mmio.c */
void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1);
diff --git a/hw/ide/via.c b/hw/ide/via.c
index 84f0efff94..3153be8862 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -211,14 +211,6 @@ static void via_ide_exitfn(PCIDevice *dev)
}
}
-void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
-{
- PCIDevice *dev;
-
- dev = pci_create_simple(bus, devfn, "via-ide");
- pci_ide_create_devs(dev, hd_table);
-}
-
static void via_ide_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 4727b1d3a4..639ba2a091 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -37,6 +37,7 @@
#include "qemu/log.h"
#include "hw/loader.h"
#include "hw/ide.h"
+#include "hw/ide/pci.h"
#include "elf.h"
#include "hw/isa/vt82c686.h"
#include "hw/rtc/mc146818rtc.h"
@@ -239,6 +240,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int
slot, qemu_irq intc,
qemu_irq *i8259;
ISABus *isa_bus;
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
+ PCIDevice *dev;
isa_bus = vt82c686b_isa_init(pci_bus, PCI_DEVFN(slot, 0));
if (!isa_bus) {
@@ -256,8 +258,9 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int
slot, qemu_irq intc,
/* Super I/O */
isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO);
+ dev = pci_create_simple(pci_bus, PCI_DEVFN(slot, 1), "via-ide");
ide_drive_get(hd, ARRAY_SIZE(hd));
- via_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1));
+ pci_ide_create_devs(dev, hd);
pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci");
pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci");
--
2.21.1
- [PULL 00/20] Ide patches, John Snow, 2020/03/17
- [PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass, John Snow, 2020/03/17
- [PULL 02/20] cmd646: register vmstate_ide_pci VMStateDescription in DeviceClass, John Snow, 2020/03/17
- [PULL 03/20] dp264: use pci_create_simple() to initialise the cmd646 device, John Snow, 2020/03/17
- [PULL 04/20] cmd646: remove unused pci_cmd646_ide_init() function, John Snow, 2020/03/17
- [PULL 05/20] via-ide: move registration of VMStateDescription to DeviceClass, John Snow, 2020/03/17
- [PULL 06/20] ide/via: Get rid of via_ide_init(),
John Snow <=
- [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE, John Snow, 2020/03/17
- [PULL 08/20] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value, John Snow, 2020/03/17
- [PULL 09/20] via-ide: initialise IDE controller in legacy mode, John Snow, 2020/03/17
- [PULL 10/20] via-ide: allow guests to write to PCI_CLASS_PROG, John Snow, 2020/03/17
- [PULL 11/20] via-ide: always use legacy IRQ 14/15 routing, John Snow, 2020/03/17
- [PULL 12/20] hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr(), John Snow, 2020/03/17
- [PULL 13/20] hw/ide: Get rid of piix3_init functions, John Snow, 2020/03/17
- [PULL 14/20] hw/isa/piix4.c: Introduce variable to store devfn, John Snow, 2020/03/17
- [PULL 15/20] hw/ide: Get rid of piix4_init function, John Snow, 2020/03/17
- [PULL 16/20] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h, John Snow, 2020/03/17