PcRtc: Fix PcRtcInit() to not clear RegisterB Hour Format bit (BIT1) sometimes
authorRuiyu Ni <ruiyu.ni@intel.com>
Tue, 7 Jul 2015 05:41:43 +0000 (05:41 +0000)
committerniruiyu <niruiyu@Edk2>
Tue, 7 Jul 2015 05:41:43 +0000 (05:41 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17848 6f19259b-4bc3-4df7-8a09-765794883524

PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c

index 9ec309c..5abb71c 100644 (file)
@@ -166,7 +166,8 @@ PcRtcInit (
   // Set RTC configuration after get original time\r
   // The value of bit AIE should be reserved.\r
   //\r
-  RtcWrite (RTC_ADDRESS_REGISTER_B, (UINT8)(RTC_INIT_REGISTER_B | (RegisterB.Data & BIT5)));\r
+  RegisterB.Data = RTC_INIT_REGISTER_B | (RegisterB.Data & BIT5);\r
+  RtcWrite (RTC_ADDRESS_REGISTER_B, RegisterB.Data);\r
 \r
   //\r
   // Release RTC Lock.\r