hv: support vrtc BCD data mode

Add judging of the vRTC data mode. If BCD data mode is inuse,
make conversion of data.

Tracked-On: #7440
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Yuanyuan Zhao
2022-04-21 14:03:44 +08:00
committed by acrnsi-robot
parent 23177d0a1d
commit ac89244cf5
2 changed files with 66 additions and 14 deletions

View File

@@ -58,6 +58,8 @@
#define RTCSA_TUP 0x80U /* time update, don't look now */
#define RTC_STATUSB 0x0b /* status register B */
#define RTCSB_BCD 0x04U /* 0 = BCD, 1 = Binary coded time */
#define RTC_INTR 0x0c /* status register C (R) interrupt source */
#define RTC_STATUSD 0x0d /* status register D (R) Lost Power */