PcRtc: Fix PcRtcInit() to not clear RegisterB Hour Format bit (BIT1) sometimes

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
This commit is contained in:
Ruiyu Ni 2015-07-07 05:41:43 +00:00 committed by niruiyu
parent 4d5b08684f
commit 3e2744e41f
1 changed files with 2 additions and 1 deletions

View File

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