[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/13] ppc405_boards: use qdev properties instead of legacy m48t59
From: |
Mark Cave-Ayland |
Subject: |
[PULL 07/13] ppc405_boards: use qdev properties instead of legacy m48t59_init() function |
Date: |
Sun, 18 Oct 2020 16:59:13 +0100 |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20201016182739.22875-5-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>
---
hw/ppc/ppc405_boards.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
index 6198ec1035..4687715b15 100644
--- a/hw/ppc/ppc405_boards.c
+++ b/hw/ppc/ppc405_boards.c
@@ -28,6 +28,8 @@
#include "qemu-common.h"
#include "cpu.h"
#include "hw/ppc/ppc.h"
+#include "hw/qdev-properties.h"
+#include "hw/sysbus.h"
#include "ppc405.h"
#include "hw/rtc/m48t59.h"
#include "hw/block/flash.h"
@@ -145,6 +147,8 @@ static void ref405ep_init(MachineState *machine)
char *filename;
ppc4xx_bd_info_t bd;
CPUPPCState *env;
+ DeviceState *dev;
+ SysBusDevice *s;
qemu_irq *pic;
MemoryRegion *bios;
MemoryRegion *sram = g_new(MemoryRegion, 1);
@@ -227,7 +231,11 @@ static void ref405ep_init(MachineState *machine)
/* Register FPGA */
ref405ep_fpga_init(sysmem, 0xF0300000);
/* Register NVRAM */
- m48t59_init(NULL, 0xF0000000, 0, 8192, 1968, 8);
+ dev = qdev_new("sysbus-m48t08");
+ qdev_prop_set_int32(dev, "base-year", 1968);
+ s = SYS_BUS_DEVICE(dev);
+ sysbus_realize_and_unref(s, &error_fatal);
+ sysbus_mmio_map(s, 0, 0xF0000000);
/* Load kernel */
linux_boot = (kernel_filename != NULL);
if (linux_boot) {
--
2.20.1
- [PULL 00/13] qemu-macppc queue 20201018, Mark Cave-Ayland, 2020/10/18
- [PULL 01/13] macio: don't reference serial_hd() directly within the device, Mark Cave-Ayland, 2020/10/18
- [PULL 02/13] grackle: use qdev gpios for PCI IRQs, Mark Cave-Ayland, 2020/10/18
- [PULL 03/13] uninorth: use qdev gpios for PCI IRQs, Mark Cave-Ayland, 2020/10/18
- [PULL 04/13] m48t59-isa: remove legacy m48t59_init_isa() function, Mark Cave-Ayland, 2020/10/18
- [PULL 05/13] sun4m: use qdev properties instead of legacy m48t59_init() function, Mark Cave-Ayland, 2020/10/18
- [PULL 06/13] sun4u: use qdev properties instead of legacy m48t59_init() function, Mark Cave-Ayland, 2020/10/18
- [PULL 07/13] ppc405_boards: use qdev properties instead of legacy m48t59_init() function,
Mark Cave-Ayland <=
- [PULL 08/13] m48t59: remove legacy m48t59_init() function, Mark Cave-Ayland, 2020/10/18
- [PULL 09/13] mac_oldworld: Allow loading binary ROM image, Mark Cave-Ayland, 2020/10/18
- [PULL 10/13] mac_newworld: Allow loading binary ROM image, Mark Cave-Ayland, 2020/10/18
- [PULL 11/13] mac_oldworld: Drop a variable, use get_system_memory() directly, Mark Cave-Ayland, 2020/10/18
- [PULL 13/13] mac_oldworld: Change PCI address of macio to match real hardware, Mark Cave-Ayland, 2020/10/18
- [PULL 12/13] mac_oldworld: Drop some variables, Mark Cave-Ayland, 2020/10/18
- Re: [PULL 00/13] qemu-macppc queue 20201018, Mark Cave-Ayland, 2020/10/19