hw/display/pl110: Pass frame buffer memory region as link property

Add the PL110::'framebuffer-memory' property. Have the different
ARM boards set it. We don't need to call sysbus_address_space()
anymore.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240226173805.289-3-philmd@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2023-09-22 16:41:32 +02:00
parent 49aff03e1b
commit c2093660d9
5 changed files with 27 additions and 4 deletions

View file

@ -671,6 +671,8 @@ static void integratorcp_init(MachineState *machine)
}
dev = qdev_new("pl110");
object_property_set_link(OBJECT(dev), "framebuffer-memory",
OBJECT(address_space_mem), &error_fatal);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0xc0000000);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[22]);

View file

@ -239,6 +239,8 @@ static void realview_init(MachineState *machine,
gpio2 = sysbus_create_simple("pl061", 0x10015000, pic[8]);
dev = qdev_new("pl111");
object_property_set_link(OBJECT(dev), "framebuffer-memory",
OBJECT(sysmem), &error_fatal);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x10020000);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[23]);

View file

@ -300,6 +300,8 @@ static void versatile_init(MachineState *machine, int board_id)
/* The versatile/PB actually has a modified Color LCD controller
that includes hardware cursor support from the PL111. */
dev = qdev_new("pl110_versatile");
object_property_set_link(OBJECT(dev), "framebuffer-memory",
OBJECT(sysmem), &error_fatal);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x10120000);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[16]);

View file

@ -299,6 +299,9 @@ static void a9_daughterboard_init(VexpressMachineState *vms,
/* 0x10020000 PL111 CLCD (daughterboard) */
dev = qdev_new("pl111");
object_property_set_link(OBJECT(dev), "framebuffer-memory",
OBJECT(sysmem), &error_fatal);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, 0x10020000);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[44]);
@ -654,6 +657,8 @@ static void vexpress_common_init(MachineState *machine)
/* VE_COMPACTFLASH: not modelled */
dev = qdev_new("pl111");
object_property_set_link(OBJECT(dev), "framebuffer-memory",
OBJECT(sysmem), &error_fatal);
sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, map[VE_CLCD]);
sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic[14]);