[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/13] m48t59: remove legacy m48t59_init() function
From: |
Mark Cave-Ayland |
Subject: |
[PULL 08/13] m48t59: remove legacy m48t59_init() function |
Date: |
Sun, 18 Oct 2020 16:59:14 +0100 |
Now that all of the callers of this function have been switched to use qdev
properties, this legacy init function can now be removed.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20201016182739.22875-6-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/rtc/m48t59.c | 35 -----------------------------------
include/hw/rtc/m48t59.h | 4 ----
2 files changed, 39 deletions(-)
diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c
index 6525206976..d54929e861 100644
--- a/hw/rtc/m48t59.c
+++ b/hw/rtc/m48t59.c
@@ -564,41 +564,6 @@ const MemoryRegionOps m48t59_io_ops = {
.endianness = DEVICE_LITTLE_ENDIAN,
};
-/* Initialisation routine */
-Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,
- uint32_t io_base, uint16_t size, int base_year,
- int model)
-{
- DeviceState *dev;
- SysBusDevice *s;
- int i;
-
- for (i = 0; i < ARRAY_SIZE(m48txx_sysbus_info); i++) {
- if (m48txx_sysbus_info[i].size != size ||
- m48txx_sysbus_info[i].model != model) {
- continue;
- }
-
- dev = qdev_new(m48txx_sysbus_info[i].bus_name);
- qdev_prop_set_int32(dev, "base-year", base_year);
- s = SYS_BUS_DEVICE(dev);
- sysbus_realize_and_unref(s, &error_fatal);
- sysbus_connect_irq(s, 0, IRQ);
- if (io_base != 0) {
- memory_region_add_subregion(get_system_io(), io_base,
- sysbus_mmio_get_region(s, 1));
- }
- if (mem_base != 0) {
- sysbus_mmio_map(s, 0, mem_base);
- }
-
- return NVRAM(s);
- }
-
- assert(false);
- return NULL;
-}
-
void m48t59_realize_common(M48t59State *s, Error **errp)
{
s->buffer = g_malloc0(s->size);
diff --git a/include/hw/rtc/m48t59.h b/include/hw/rtc/m48t59.h
index 9defe578d1..d9b45eb161 100644
--- a/include/hw/rtc/m48t59.h
+++ b/include/hw/rtc/m48t59.h
@@ -47,8 +47,4 @@ struct NvramClass {
void (*toggle_lock)(Nvram *obj, int lock);
};
-Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,
- uint32_t io_base, uint16_t size, int base_year,
- int type);
-
#endif /* HW_M48T59_H */
--
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, 2020/10/18
- [PULL 08/13] m48t59: remove legacy m48t59_init() function,
Mark Cave-Ayland <=
- [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 12/13] mac_oldworld: Drop some variables, 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
- Re: [PULL 00/13] qemu-macppc queue 20201018, Mark Cave-Ayland, 2020/10/19