On 12/12/24 12:46, Mark Cave-Ayland wrote:
Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>
Reviewed-by: Thomas Huth <h...@tuxfamily.org>
---
  hw/m68k/next-cube.c | 17 ++++++++++++-----
  1 file changed, 12 insertions(+), 5 deletions(-)


+static void next_rtc_reset_hold(Object *obj, ResetType type)
+{
+    NeXTRTC *rtc = NEXT_RTC(obj);
+
+    rtc->status = 0x90;
+
+    /* Load RTC RAM - TODO: provide possibility to load contents from file */
+    memcpy(rtc->ram, rtc_ram2, 32);
+}

  static const TypeInfo next_rtc_info = {
@@ -1072,11 +1084,6 @@ static void next_pc_reset_hold(Object *obj, ResetType 
type)
      s->scr1 = 0x00011102;
      s->scr2 = 0x00ff0c80;
      s->old_scr2 = s->scr2;
-
-    s->rtc.status = 0x90;
-
-    /* Load RTC RAM - TODO: provide possibility to load contents from file */
-    memcpy(s->rtc.ram, rtc_ram2, 32);

Pre-existing, this looks suspicious to reset RTC device state
during device reset.

  }
static void next_pc_realize(DeviceState *dev, Error **errp)


Reply via email to