aboutsummaryrefslogtreecommitdiff
path: root/hw/sparc64
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2020-10-16 19:27:37 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2020-10-18 16:21:42 +0100
commitdc7a05da69613d5c87ec0359c5dbb9d2b4765301 (patch)
treee3e395dbabdf0fdb4ba6f687482966858aeb0010 /hw/sparc64
parentcb0fa36b31d15ab862517b4150d85d885f38ae35 (diff)
downloadqemu-dc7a05da69613d5c87ec0359c5dbb9d2b4765301.zip
qemu-dc7a05da69613d5c87ec0359c5dbb9d2b4765301.tar.gz
qemu-dc7a05da69613d5c87ec0359c5dbb9d2b4765301.tar.bz2
sun4u: use qdev properties instead of legacy m48t59_init() function
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20201016182739.22875-4-mark.cave-ayland@ilande.co.uk> Reviewed-by: Hervé Poussineau <hpoussin@reactos.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/sparc64')
-rw-r--r--hw/sparc64/sun4u.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index ad5ca24..05e659c 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -671,10 +671,13 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
pci_ide_create_devs(pci_dev);
/* Map NVRAM into I/O (ebus) space */
- nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);
- s = SYS_BUS_DEVICE(nvram);
+ dev = qdev_new("sysbus-m48t59");
+ qdev_prop_set_int32(dev, "base-year", 1968);
+ s = SYS_BUS_DEVICE(dev);
+ sysbus_realize_and_unref(s, &error_fatal);
memory_region_add_subregion(pci_address_space_io(ebus), 0x2000,
sysbus_mmio_get_region(s, 0));
+ nvram = NVRAM(dev);
initrd_size = 0;
initrd_addr = 0;