[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 24/34] next-cube: don't use rtc phase value of -1
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v2 24/34] next-cube: don't use rtc phase value of -1 |
Date: |
Thu, 12 Dec 2024 11:46:10 +0000 |
The rtc phase value of -1 is directly equivalent to using a phase value of 0 so
simplify the logic to use an initial rtc phase of 0.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
---
hw/m68k/next-cube.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index e13f46add2..9c91ee146a 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -265,9 +265,6 @@ static void next_scr2_rtc_update(NeXTPC *s)
if (scr2_2 & 0x1) {
/* DPRINTF("RTC %x phase %i\n", scr2_2, rtc->phase); */
- if (rtc->phase == -1) {
- rtc->phase = 0;
- }
/* If we are in going down clock... do something */
if (((old_scr2 & SCR2_RTCLK) != (scr2_2 & SCR2_RTCLK)) &&
((scr2_2 & SCR2_RTCLK) == 0)) {
@@ -282,7 +279,7 @@ static void next_scr2_rtc_update(NeXTPC *s)
}
} else {
/* else end or abort */
- rtc->phase = -1;
+ rtc->phase = 0;
rtc->command = 0;
rtc->value = 0;
}
--
2.39.5
- [PATCH v2 16/34] next-cube: rearrange NeXTState declarations to improve readability, (continued)
- [PATCH v2 16/34] next-cube: rearrange NeXTState declarations to improve readability, Mark Cave-Ayland, 2024/12/12
- [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 <=
- [PATCH v2 25/34] next-cube: QOMify NeXTRTC, Mark Cave-Ayland, 2024/12/12
- [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