[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 08/10] vt82c686: Remove legacy vt82c686b_pm_init() function
From: |
BALATON Zoltan |
Subject: |
[PATCH v2 08/10] vt82c686: Remove legacy vt82c686b_pm_init() function |
Date: |
Mon, 28 Dec 2020 03:08:13 +0100 |
Remove legacy vt82c686b_pm_init() function and also rename
VT82C686B_PM type name to match other device names.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v2: Reworded commit message, delete i2c include here
hw/isa/vt82c686.c | 18 ------------------
hw/mips/fuloong2e.c | 5 ++++-
include/hw/isa/vt82c686.h | 5 +----
3 files changed, 5 insertions(+), 23 deletions(-)
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 2912c253dc..cd87ec0103 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -12,7 +12,6 @@
#include "qemu/osdep.h"
#include "hw/isa/vt82c686.h"
-#include "hw/i2c/i2c.h"
#include "hw/pci/pci.h"
#include "hw/qdev-properties.h"
#include "hw/isa/isa.h"
@@ -167,7 +166,6 @@ struct VT686PMState {
uint32_t smb_io_base;
};
-#define TYPE_VT82C686B_PM "VT82C686B_PM"
OBJECT_DECLARE_SIMPLE_TYPE(VT686PMState, VT82C686B_PM)
static void pm_update_sci(VT686PMState *s)
@@ -271,22 +269,6 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error
**errp)
acpi_pm1_cnt_init(&s->ar, &s->io, false, false, 2);
}
-I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
- qemu_irq sci_irq)
-{
- PCIDevice *dev;
- VT686PMState *s;
-
- dev = pci_new(devfn, TYPE_VT82C686B_PM);
- qdev_prop_set_uint32(&dev->qdev, "smb_io_base", smb_io_base);
-
- s = VT82C686B_PM(dev);
-
- pci_realize_and_unref(dev, bus, &error_fatal);
-
- return s->smb.smbus;
-}
-
static Property via_pm_properties[] = {
DEFINE_PROP_UINT32("smb_io_base", VT686PMState, smb_io_base, 0),
DEFINE_PROP_END_OF_LIST(),
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index d123e34d9e..a2b69a3a7a 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -263,7 +263,10 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,
int slot, qemu_irq intc,
pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci");
pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci");
- *i2c_bus = vt82c686b_pm_init(pci_bus, PCI_DEVFN(slot, 4), 0xeee1, NULL);
+ dev = pci_new(PCI_DEVFN(slot, 4), TYPE_VT82C686B_PM);
+ qdev_prop_set_uint32(DEVICE(dev), "smb_io_base", 0xeee1);
+ pci_realize_and_unref(dev, pci_bus, &error_fatal);
+ *i2c_bus = I2C_BUS(qdev_get_child_bus(DEVICE(dev), "i2c"));
/* Audio support */
pci_create_simple(pci_bus, PCI_DEVFN(slot, 5), TYPE_VIA_AC97);
diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h
index 8d2d276fe1..5b0a1ffe72 100644
--- a/include/hw/isa/vt82c686.h
+++ b/include/hw/isa/vt82c686.h
@@ -3,11 +3,8 @@
#define TYPE_VT82C686B_ISA "vt82c686b-isa"
#define TYPE_VT82C686B_SUPERIO "vt82c686b-superio"
+#define TYPE_VT82C686B_PM "vt82c686b-pm"
#define TYPE_VIA_AC97 "via-ac97"
#define TYPE_VIA_MC97 "via-mc97"
-/* vt82c686.c */
-I2CBus *vt82c686b_pm_init(PCIBus *bus, int devfn, uint32_t smb_io_base,
- qemu_irq sci_irq);
-
#endif
--
2.21.3
- [PATCH v2 00/10] Misc vt82c686b clean ups, BALATON Zoltan, 2020/12/27
- [PATCH v2 01/10] vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA, BALATON Zoltan, 2020/12/27
- [PATCH v2 04/10] vt82c686: Remove vt82c686b_[am]c97_init() functions, BALATON Zoltan, 2020/12/27
- [PATCH v2 03/10] vt82c686b: Rename VT82C686B to VT82C686B_ISA, BALATON Zoltan, 2020/12/27
- [PATCH v2 02/10] vt82c686: Remove unnecessary _DEVICE suffix from type macros, BALATON Zoltan, 2020/12/27
- [PATCH v2 07/10] vt82c686: Remove legacy vt82c686b_isa_init() function, BALATON Zoltan, 2020/12/27
- [PATCH v2 10/10] vt82c686: Remove unneeded includes and defines, BALATON Zoltan, 2020/12/27
- [PATCH v2 08/10] vt82c686: Remove legacy vt82c686b_pm_init() function,
BALATON Zoltan <=
- [PATCH v2 05/10] vt82c686: Split off via-[am]c97 into separate file in hw/audio, BALATON Zoltan, 2020/12/27
- [PATCH v2 06/10] audio/via-ac97: Simplify code and set user_creatable to false, BALATON Zoltan, 2020/12/27
- [PATCH v2 09/10] vt82c686: Convert debug printf to trace points, BALATON Zoltan, 2020/12/27