]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcx: switch to load_image_mr() and remove prom_addr hack
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 5 Apr 2017 08:02:47 +0000 (09:02 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 21 Apr 2017 08:02:04 +0000 (09:02 +0100)
Previous to the existence of load_image_mr(), the only way to load in the
FCode ROM image was to pass in its physical address via qdev properties
and use load_image_targphys().

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/tcx.c
hw/sparc/sun4m.c

index 3f007351d258cf52c1472f9dc7e931ccfd1c1b57..5a1115cc654e5755a6d66dd9690963cda0d844fb 100644 (file)
@@ -843,8 +843,7 @@ static void tcx_realizefn(DeviceState *dev, Error **errp)
     vmstate_register_ram_global(&s->rom);
     fcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, TCX_ROM_FILE);
     if (fcode_filename) {
-        ret = load_image_targphys(fcode_filename, s->prom_addr,
-                                  FCODE_MAX_ROM_SIZE);
+        ret = load_image_mr(fcode_filename, &s->rom);
         g_free(fcode_filename);
         if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {
             error_report("tcx: could not load prom '%s'", TCX_ROM_FILE);
@@ -902,7 +901,6 @@ static Property tcx_properties[] = {
     DEFINE_PROP_UINT16("width",    TCXState, width,     -1),
     DEFINE_PROP_UINT16("height",   TCXState, height,    -1),
     DEFINE_PROP_UINT16("depth",    TCXState, depth,     -1),
-    DEFINE_PROP_UINT64("prom_addr", TCXState, prom_addr, -1),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index 7a0922b595015bcf72daad6fe6bf0f0ee23ff7ed..5f022cc08da26ebcdd1096a9d9692a71f0a71372 100644 (file)
@@ -491,7 +491,6 @@ static void tcx_init(hwaddr addr, qemu_irq irq, int vram_size, int width,
     qdev_prop_set_uint16(dev, "width", width);
     qdev_prop_set_uint16(dev, "height", height);
     qdev_prop_set_uint16(dev, "depth", depth);
-    qdev_prop_set_uint64(dev, "prom_addr", addr);
     qdev_init_nofail(dev);
     s = SYS_BUS_DEVICE(dev);