[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 25/34] next-cube: QOMify NeXTRTC
From: |
Thomas Huth |
Subject: |
Re: [PATCH v2 25/34] next-cube: QOMify NeXTRTC |
Date: |
Sat, 14 Dec 2024 07:08:15 +0100 |
Am Thu, 12 Dec 2024 11:46:11 +0000
schrieb Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>:
> This is to allow the RTC functionality to be maintained within its own
> separate
> device rather than as part of the next-pc device.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/m68k/next-cube.c | 71 +++++++++++++++++++++++++++++++--------------
> 1 file changed, 50 insertions(+), 21 deletions(-)
>
> diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
> index 9c91ee146a..c947af65e2 100644
> --- a/hw/m68k/next-cube.c
> +++ b/hw/m68k/next-cube.c
...
> @@ -1078,6 +1115,12 @@ static void next_pc_realize(DeviceState *dev, Error
> **errp)
> }
> sysbus_connect_irq(sbd, 0, qdev_get_gpio_in(dev, NEXT_SCC_I));
> sysbus_connect_irq(sbd, 1, qdev_get_gpio_in(dev, NEXT_SCC_DMA_I));
> +
> + /* RTC */
> + d = DEVICE(object_resolve_path_component(OBJECT(dev), "rtc"));
> + if (!sysbus_realize(SYS_BUS_DEVICE(d), errp)) {
> + return;
> + }
> }
Would it be easier to directly use s->rtc instead of taking the detour via
object_resolve_path_component?
Thomas
- [PATCH v2 17/34] next-cube: convert next-pc device to use Resettable interface, (continued)
- [PATCH v2 17/34] next-cube: convert next-pc device to use Resettable interface, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 18/34] next-cube: rename typedef struct NextRtc to NeXTRTC, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 19/34] next-cube: use qemu_irq to drive int_status in next_scr2_rtc_update(), Mark Cave-Ayland, 2024/12/12
- [PATCH v2 20/34] next-cube: separate rtc read and write shift logic, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 21/34] next-cube: always use retval to return rtc read values, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 22/34] next-cube: use named gpio to set RTC data bit in scr2, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 23/34] next-cube: use named gpio to read RTC data bit in scr2, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 24/34] next-cube: don't use rtc phase value of -1, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 25/34] next-cube: QOMify NeXTRTC, Mark Cave-Ayland, 2024/12/12
- Re: [PATCH v2 25/34] next-cube: QOMify NeXTRTC,
Thomas Huth <=
- [PATCH v2 26/34] next-cube: move reset of next-rtc fields from next-pc to next-rtc, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 27/34] next-cube: move rtc-data-in gpio from next-pc to next-rtc device, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 28/34] next-cube: use named gpio output for next-rtc data, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 29/34] next-cube: add rtc-cmd-reset named gpio to reset the rtc state machine, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 31/34] next-cube: move next_rtc_cmd_is_write() and next_rtc_data_in_irq() functions, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 30/34] next-cube: add rtc-power-out named gpio to trigger the NEXT_PWR_I interrupt, Mark Cave-Ayland, 2024/12/12
- [PATCH v2 34/34] next-cube: replace boiler-plate GPL 2.0 or later license text with SPDX identifier, Mark Cave-Ayland, 2024/12/12