summaryrefslogtreecommitdiffstats
path: root/hw/mips/fuloong2e.c
diff options
context:
space:
mode:
authorBALATON Zoltan2021-01-09 21:16:36 +0100
committerPhilippe Mathieu-Daudé2021-02-21 19:42:34 +0100
commit911629e6d3773a8adeab48b488fadece0d7996b1 (patch)
tree94fabff306f891206de1cfb57e8b30367140f857 /hw/mips/fuloong2e.c
parentvt82c686: Reorganise code (diff)
downloadqemu-911629e6d3773a8adeab48b488fadece0d7996b1.tar.gz
qemu-911629e6d3773a8adeab48b488fadece0d7996b1.tar.xz
qemu-911629e6d3773a8adeab48b488fadece0d7996b1.zip
vt82c686: Fix SMBus IO base and configuration registers
The base address of the SMBus io ports and its enabled status is set by registers in the PCI config space but this was not correctly emulated. Instead the SMBus registers were mapped on realize to the base address set by a property to the address expected by fuloong2e firmware. Fix the base and config register handling to more closely model hardware which allows to remove the property and allows the guest to control this mapping. Do all this in reset instead of realize so it's correctly updated on reset. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Message-Id: <f2ca2ad5f08ba8cee07afd9d67b4e75cda21db09.1610223397.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'hw/mips/fuloong2e.c')
-rw-r--r--hw/mips/fuloong2e.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 1f3680fda3..94f4718147 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -230,9 +230,7 @@ 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");
- 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);
+ dev = pci_create_simple(pci_bus, PCI_DEVFN(slot, 4), TYPE_VT82C686B_PM);
*i2c_bus = I2C_BUS(qdev_get_child_bus(DEVICE(dev), "i2c"));
/* Audio support */