On 24/10/2024 03:44, Philippe Mathieu-Daudé wrote:
Hi Mark,
On 23/10/24 05:58, Mark Cave-Ayland wrote:
This is to allow the RTC functionality to be maintained within its own separate
device.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>
---
hw/m68k/next-cube.c | 66 ++++++++++++++++++++++++++++++++-------------
1 file changed, 48 insertions(+), 18 deletions(-)
diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c
index e4d0083eb0..6b574d39cf 100644
--- a/hw/m68k/next-cube.c
+++ b/hw/m68k/next-cube.c
@@ -42,7 +42,13 @@
#define RAM_SIZE 0x4000000
#define ROM_FILE "Rev_2.5_v66.bin"
-typedef struct NeXTRTC {
+
+#define TYPE_NEXT_RTC "next-rtc"
+OBJECT_DECLARE_SIMPLE_TYPE(NeXTRTC, NEXT_RTC)
+
+struct NeXTRTC {
+ SysBusDevice parent_obj;
Since it was not explicitly reset, maybe QDev parent is enough?
Hi Phil,
This is deliberate, since the next-pc device resets a couple of fields directly in
the NeXTRTC struct in next_pc_reset_hold(), and these are moved to a separate
next_rtc_reset_hold() in the next patch.
int8_t phase;
uint8_t ram[32];
uint8_t command;
@@ -50,7 +56,7 @@ typedef struct NeXTRTC {
uint8_t status;
uint8_t control;
uint8_t retval;
-} NeXTRTC;
+};
ATB,
Mark.