Displaying 1 result from an estimated 1 matches for "rtc_ioport_read".
Did you mean:
pt_ioport_read
2012 Mar 05
6
[PATCH 3/5] RTC: Add UIP(update in progress) check logic
...+ if (s->hw.cmos_data[RTC_REG_B] & RTC_SET)
+ return 0;
+
+ guest_usec = get_localtime_us(d);
+ /* UIP bit will be set at last 244us of every second. */
+ if ((guest_usec % USEC_PER_SEC) >= (USEC_PER_SEC - 244))
+ return 1;
+
+ return 0;
+}
+
static uint32_t rtc_ioport_read(RTCState *s, uint32_t addr)
{
int ret;
@@ -268,6 +286,8 @@ static uint32_t rtc_ioport_read(RTCState
break;
case RTC_REG_A:
ret = s->hw.cmos_data[s->hw.cmos_index];
+ if (update_in_progress(s))
+ ret |= RTC_UIP;
break;
case RTC_REG_C...