[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] dp264: use pci_create() to initialise the cmd646 device
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 1/2] dp264: use pci_create() to initialise the cmd646 device |
Date: |
Fri, 14 Feb 2020 08:46:06 +0000 |
Remove the call to pci_cmd646_ide_init() since global device init functions
are deprecated in preference of using qdev directly.
Signed-off-by: Mark Cave-Ayland <address@hidden>
---
hw/alpha/dp264.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index a8f9a89cc4..e91989bf9a 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -16,6 +16,7 @@
#include "sysemu/sysemu.h"
#include "hw/rtc/mc146818rtc.h"
#include "hw/ide.h"
+#include "hw/ide/pci.h"
#include "hw/timer/i8254.h"
#include "hw/isa/superio.h"
#include "hw/dma/i8257.h"
@@ -100,9 +101,14 @@ static void clipper_init(MachineState *machine)
/* IDE disk setup. */
{
DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
+ PCIDevice *pci_dev;
+
ide_drive_get(hd, ARRAY_SIZE(hd));
- pci_cmd646_ide_init(pci_bus, hd, 0);
+ pci_dev = pci_create(pci_bus, -1, "cmd646-ide");
+ qdev_prop_set_uint32(DEVICE(pci_dev), "secondary", 0);
+ qdev_init_nofail(DEVICE(pci_dev));
+ pci_ide_create_devs(pci_dev, hd);
}
/* Load PALcode. Given that this is not "real" cpu palcode,
--
2.20.1