aboutsummaryrefslogtreecommitdiff
path: root/hw/isa/vt82c686.c
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2021-01-02 11:43:35 +0100
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-01-04 23:24:44 +0100
commit07c6832cb2c65407e312e8bed893bf8d7ae770e6 (patch)
treefe69edac4d9df85c8ac94776838528b8602e3338 /hw/isa/vt82c686.c
parent0f79846147faf87ef17436d4255241ad32cc634c (diff)
downloadqemu-07c6832cb2c65407e312e8bed893bf8d7ae770e6.zip
qemu-07c6832cb2c65407e312e8bed893bf8d7ae770e6.tar.gz
qemu-07c6832cb2c65407e312e8bed893bf8d7ae770e6.tar.bz2
vt82c686: Remove vt82c686b_[am]c97_init() functions
These are legacy init functions that are just equivalent to directly calling pci_create_simple so do that instead. Also rename objects to lower case via-ac97 and via-mc97 matching naming of other devices. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1c4373c8aeb6c4fb2a8df2c864b0e91a977a3d7b.1609584216.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/isa/vt82c686.c')
-rw-r--r--hw/isa/vt82c686.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index d40599c..8677a2d 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -179,12 +179,6 @@ struct VIAMC97State {
#define TYPE_VT82C686B_PM "VT82C686B_PM"
OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM)
-#define TYPE_VIA_MC97 "VIA_MC97"
-OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97)
-
-#define TYPE_VIA_AC97 "VIA_AC97"
-OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97)
-
static void pm_update_sci(VT686PMState *s)
{
int sci_level, pmsts;
@@ -254,10 +248,13 @@ static const VMStateDescription vmstate_acpi = {
};
/*
- * TODO: vt82c686b_ac97_init() and vt82c686b_mc97_init()
+ * TODO: VIA_AC97 and VIA_MC97
* just register a PCI device now, functionalities will be implemented later.
*/
+OBJECT_DECLARE_SIMPLE_TYPE(VIAMC97State, VIA_MC97)
+OBJECT_DECLARE_SIMPLE_TYPE(VIAAC97State, VIA_AC97)
+
static void vt82c686b_ac97_realize(PCIDevice *dev, Error **errp)
{
VIAAC97State *s = VIA_AC97(dev);
@@ -270,14 +267,6 @@ static void vt82c686b_ac97_realize(PCIDevice *dev, Error **errp)
pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03);
}
-void vt82c686b_ac97_init(PCIBus *bus, int devfn)
-{
- PCIDevice *dev;
-
- dev = pci_new(devfn, TYPE_VIA_AC97);
- pci_realize_and_unref(dev, bus, &error_fatal);
-}
-
static void via_ac97_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -314,14 +303,6 @@ static void vt82c686b_mc97_realize(PCIDevice *dev, Error **errp)
pci_set_long(pci_conf + PCI_INTERRUPT_PIN, 0x03);
}
-void vt82c686b_mc97_init(PCIBus *bus, int devfn)
-{
- PCIDevice *dev;
-
- dev = pci_new(devfn, TYPE_VIA_MC97);
- pci_realize_and_unref(dev, bus, &error_fatal);
-}
-
static void via_mc97_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);