File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -1018,6 +1018,16 @@ static const MemoryRegionOps next_dummy_en_ops = {
1018
1018
.endianness = DEVICE_BIG_ENDIAN ,
1019
1019
};
1020
1020
1021
+ static void next_rtc_reset_hold (Object * obj , ResetType type )
1022
+ {
1023
+ NeXTRTC * rtc = NEXT_RTC (obj );
1024
+
1025
+ rtc -> status = 0x90 ;
1026
+
1027
+ /* Load RTC RAM - TODO: provide possibility to load contents from file */
1028
+ memcpy (rtc -> ram , rtc_ram2 , 32 );
1029
+ }
1030
+
1021
1031
static const VMStateDescription next_rtc_vmstate = {
1022
1032
.name = "next-rtc" ,
1023
1033
.version_id = 3 ,
@@ -1037,9 +1047,11 @@ static const VMStateDescription next_rtc_vmstate = {
1037
1047
static void next_rtc_class_init (ObjectClass * klass , void * data )
1038
1048
{
1039
1049
DeviceClass * dc = DEVICE_CLASS (klass );
1050
+ ResettableClass * rc = RESETTABLE_CLASS (klass );
1040
1051
1041
1052
dc -> desc = "NeXT RTC" ;
1042
1053
dc -> vmsd = & next_rtc_vmstate ;
1054
+ rc -> phases .hold = next_rtc_reset_hold ;
1043
1055
}
1044
1056
1045
1057
static const TypeInfo next_rtc_info = {
@@ -1072,11 +1084,6 @@ static void next_pc_reset_hold(Object *obj, ResetType type)
1072
1084
s -> scr1 = 0x00011102 ;
1073
1085
s -> scr2 = 0x00ff0c80 ;
1074
1086
s -> old_scr2 = s -> scr2 ;
1075
-
1076
- s -> rtc .status = 0x90 ;
1077
-
1078
- /* Load RTC RAM - TODO: provide possibility to load contents from file */
1079
- memcpy (s -> rtc .ram , rtc_ram2 , 32 );
1080
1087
}
1081
1088
1082
1089
static void next_pc_realize (DeviceState * dev , Error * * errp )
You can’t perform that action at this time.
0 commit comments