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>
This commit is contained in:
parent
9cf69f444c
commit
98d168f359
@ -527,8 +527,6 @@ PCIBus *dino_init(MemoryRegion *addr_space,
|
|||||||
object_property_set_link(OBJECT(dev), "memory-as", OBJECT(addr_space),
|
object_property_set_link(OBJECT(dev), "memory-as", OBJECT(addr_space),
|
||||||
&error_fatal);
|
&error_fatal);
|
||||||
s = DINO_PCI_HOST_BRIDGE(dev);
|
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;
|
b = s->parent_obj.bus;
|
||||||
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
|
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
|
||||||
@ -542,6 +540,14 @@ PCIBus *dino_init(MemoryRegion *addr_space,
|
|||||||
return b;
|
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)
|
static void dino_pcihost_realize(DeviceState *dev, Error **errp)
|
||||||
{
|
{
|
||||||
DinoState *s = DINO_PCI_HOST_BRIDGE(dev);
|
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);
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||||
|
|
||||||
|
dc->reset = dino_pcihost_reset;
|
||||||
dc->realize = dino_pcihost_realize;
|
dc->realize = dino_pcihost_realize;
|
||||||
dc->unrealize = dino_pcihost_unrealize;
|
dc->unrealize = dino_pcihost_unrealize;
|
||||||
device_class_set_props(dc, dino_pcihost_properties);
|
device_class_set_props(dc, dino_pcihost_properties);
|
||||||
|
Loading…
Reference in New Issue
Block a user