summaryrefslogtreecommitdiffstats
path: root/hw/hppa/dino.c
diff options
context:
space:
mode:
authorMark Cave-Ayland2022-05-04 11:25:18 +0200
committerMark Cave-Ayland2022-05-08 19:52:36 +0200
commit98d168f359319ddd20b21058a081ec77837f7347 (patch)
tree893a4ef7e6fdfb7fdb68ae60349148aa4d4a3e12 /hw/hppa/dino.c
parentdino: move PCI bus master address space setup to dino_pcihost_realize() (diff)
downloadqemu-98d168f359319ddd20b21058a081ec77837f7347.tar.gz
qemu-98d168f359319ddd20b21058a081ec77837f7347.tar.xz
qemu-98d168f359319ddd20b21058a081ec77837f7347.zip
dino: move initial register configuration to new dino_pcihost_reset() function
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20220504092600.10048-9-mark.cave-ayland@ilande.co.uk> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/hppa/dino.c')
-rw-r--r--hw/hppa/dino.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index ae79ddbf5c..d3cd8578a1 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -527,8 +527,6 @@ PCIBus *dino_init(MemoryRegion *addr_space,
object_property_set_link(OBJECT(dev), "memory-as", OBJECT(addr_space),
&error_fatal);
s = DINO_PCI_HOST_BRIDGE(dev);
- s->iar0 = s->iar1 = CPU_HPA + 3;
- s->toc_addr = 0xFFFA0030; /* IO_COMMAND of CPU */
b = s->parent_obj.bus;
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
@@ -542,6 +540,14 @@ PCIBus *dino_init(MemoryRegion *addr_space,
return b;
}
+static void dino_pcihost_reset(DeviceState *dev)
+{
+ DinoState *s = DINO_PCI_HOST_BRIDGE(dev);
+
+ s->iar0 = s->iar1 = CPU_HPA + 3;
+ s->toc_addr = 0xFFFA0030; /* IO_COMMAND of CPU */
+}
+
static void dino_pcihost_realize(DeviceState *dev, Error **errp)
{
DinoState *s = DINO_PCI_HOST_BRIDGE(dev);
@@ -632,6 +638,7 @@ static void dino_pcihost_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
+ dc->reset = dino_pcihost_reset;
dc->realize = dino_pcihost_realize;
dc->unrealize = dino_pcihost_unrealize;
device_class_set_props(dc, dino_pcihost_properties);