Skip to contentSkip to conversation

Exynos4210 RTC

PATCH In review Oleg Ogurtsov 2 participants 5 messages Jul 11, 2012 – Jul 20, 2012 Arm Samsung Exynos

lore
Share & tools
lore
#0 lore raw

cover Exynos4210 RTC

Patches fixed calculationg for value of year and remove unnecessary code.

Oleg Ogurtsov (2):
hw/exynos4210_rtc.c: Fix calculating for value of year hw/exynos4210_rtc.c: remove unnecessary code

 hw/exynos4210_rtc.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/2 hw/exynos4210_rtc.c: Fix calculating for value of year

---
 hw/exynos4210_rtc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/exynos4210_rtc.c +1 -1
index f781020..b42586e 100644
@@ -142,7 +142,7 @@ static const VMStateDescription vmstate_exynos4210_rtc_state = {
 };
 
 #define BCD3DIGITS(x) \
-    ((uint32_t)to_bcd((uint8_t)x) + \
+    ((uint32_t)to_bcd((uint8_t)(x % 100)) + \
     ((uint32_t)to_bcd((uint8_t)((x % 1000) / 100)) << 8))
 
 static void check_alarm_raise(Exynos4210RTCState *s)
Signature · 1 line
1.7.5.4
#3 lore raw

PATCH 2/2 hw/exynos4210_rtc.c: remove unnecessary code

In reply to Oleg Ogurtsov
---
 hw/exynos4210_rtc.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
hw/exynos4210_rtc.c +1 -4
index b42586e..42a4ddc 100644
@@ -510,10 +510,7 @@ static void exynos4210_rtc_reset(DeviceState *d)
 {
     Exynos4210RTCState *s = (Exynos4210RTCState *)d;
 
-    struct tm tm;
-
-    qemu_get_timedate(&tm, 0);
-    s->current_tm = tm;
+    qemu_get_timedate(&s->current_tm, 0);
 
     DPRINTF("Get time from host: %d-%d-%d %2d:%02d:%02d\n",
             s->current_tm.tm_year, s->current_tm.tm_mon, s->current_tm.tm_mday,
Signature · 1 line
1.7.5.4