[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 24/33] next-cube: don't use rtc phase value of -1
From: |
Mark Cave-Ayland |
Subject: |
[PATCH v3 24/33] next-cube: don't use rtc phase value of -1 |
Date: |
Sun, 22 Dec 2024 13:00:03 +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 53acf0a1c7..9daf2207a5 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 v3 20/33] next-cube: separate rtc read and write shift logic, (continued)
- [PATCH v3 20/33] next-cube: separate rtc read and write shift logic, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 22/33] next-cube: use named gpio to set RTC data bit in scr2, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 29/33] next-cube: add rtc-cmd-reset named gpio to reset the rtc state machine, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 32/33] next-cube: rename old_scr2 and scr2_2 in next_scr2_rtc_update(), Mark Cave-Ayland, 2024/12/22
- [PATCH v3 19/33] next-cube: use qemu_irq to drive int_status in next_scr2_rtc_update(), Mark Cave-Ayland, 2024/12/22
- [PATCH v3 30/33] next-cube: add rtc-power-out named gpio to trigger the NEXT_PWR_I interrupt, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 10/33] next-cube: map ESCC registers as a subregion of the next.scr memory region, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 09/33] next-cube: move floppy disk MMIO to separate memory region in next-pc, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 16/33] next-cube: rearrange NeXTState declarations to improve readability, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 23/33] next-cube: use named gpio to read RTC data bit in scr2, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 24/33] next-cube: don't use rtc phase value of -1,
Mark Cave-Ayland <=
- [PATCH v3 27/33] next-cube: move rtc-data-in gpio from next-pc to next-rtc device, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 28/33] next-cube: use named gpio output for next-rtc data, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 31/33] next-cube: move next_rtc_cmd_is_write() and next_rtc_data_in_irq() functions, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 25/33] next-cube: QOMify NeXTRTC, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 33/33] next-cube: add my copyright to the top of the file, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 07/33] next-cube: move SCSI CSRs from next-pc to the next-scsi device, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 18/33] next-cube: rename typedef struct NextRtc to NeXTRTC, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 21/33] next-cube: always use retval to return rtc read values, Mark Cave-Ayland, 2024/12/22
- [PATCH v3 26/33] next-cube: move reset of next-rtc fields from next-pc to next-rtc, Mark Cave-Ayland, 2024/12/22
- Re: [PATCH v3 00/33] next-cube: more tidy-ups and improvements, Thomas Huth, 2024/12/29