From b3b294e1a000b4823392fb61674b037d14431ec4 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 11 Feb 2022 00:30:52 +0100 Subject: [PATCH] ISA RTC cards no longer initialize their own NVR instance if used on a machine with a built-in RTC, fixes #1928. --- src/device/isartc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/device/isartc.c b/src/device/isartc.c index d53919647..57ccd957f 100644 --- a/src/device/isartc.c +++ b/src/device/isartc.c @@ -498,6 +498,8 @@ static void * isartc_init(const device_t *info) { rtcdev_t *dev; + int is_at = IS_AT(machine); + is_at = is_at || !strcmp(machine_get_internal_name(), "xi8088"); /* Create a device instance. */ dev = (rtcdev_t *)malloc(sizeof(rtcdev_t)); @@ -567,7 +569,8 @@ isartc_init(const device_t *info) /* Hook into the NVR backend. */ dev->nvr.fn = isartc_get_internal_name(isartc_type); dev->nvr.irq = dev->irq; - nvr_init(&dev->nvr); + if (!is_at) + nvr_init(&dev->nvr); /* Let them know our device instance. */ return((void *)dev);