From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from huawei.com (huawei.com [45.249.212.190]) by mx.groups.io with SMTP id smtpd.web10.9505.1589886650526368564 for ; Tue, 19 May 2020 04:10:50 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.190, mailfrom: huangming23@huawei.com) Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7A3D968EF454D8AC8AB3; Tue, 19 May 2020 19:10:47 +0800 (CST) Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Tue, 19 May 2020 19:10:40 +0800 From: Ming Huang To: , , CC: , , , , Subject: [RFC edk2-platforms v2 1/3] Silicon/Hisilicon: Fix a typo issue in M41T83RealTimeClockLib Date: Tue, 19 May 2020 19:08:39 +0800 Message-ID: <1589886521-82250-2-git-send-email-huangming23@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1589886521-82250-1-git-send-email-huangming23@huawei.com> References: <1589886521-82250-1-git-send-email-huangming23@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected Content-Type: text/plain There is a typo issue in M41T83RealTimeClockLib. The MACROSECOND should be MICROSECOND. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ming Huang --- Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h | 4 ++-- Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h index 67b8657..81ff459 100644 --- a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h +++ b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClock.h @@ -13,9 +13,9 @@ // The delay is need for cpld and I2C. This is a empirical value. MemoryFence is no need. #define RTC_DELAY_30_MS 30000 // The delay is need for cpld and I2C. This is a empirical value. MemoryFence is no need. -#define RTC_DELAY_1000_MACROSECOND 1000 +#define RTC_DELAY_1000_MICROSECOND 1000 // The delay is need for cpld and I2C. This is a empirical value. MemoryFence is no need. -#define RTC_DELAY_2_MACROSECOND 2 +#define RTC_DELAY_2_MICROSECOND 2 #define M41T83_REGADDR_DOTSECONDS 0x00 #define M41T83_REGADDR_SECONDS 0x01 diff --git a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c index 5131ce7..f339bcc 100644 --- a/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c +++ b/Silicon/Hisilicon/Library/M41T83RealTimeClockLib/M41T83RealTimeClockLib.c @@ -55,7 +55,7 @@ SwitchRtcI2cChannelAndLock ( Temp = Temp | CPU_GET_I2C_CONTROL; // CPU occupied RTC I2C State WriteCpldReg (CPLD_I2C_SWITCH_FLAG, Temp); - (VOID) MicroSecondDelay (RTC_DELAY_2_MACROSECOND); + (VOID) MicroSecondDelay (RTC_DELAY_2_MICROSECOND); Temp = ReadCpldReg (CPLD_I2C_SWITCH_FLAG); // Is preempt success if(CPU_GET_I2C_CONTROL == (Temp & CPU_GET_I2C_CONTROL)) { @@ -109,7 +109,7 @@ RtcRead ( EFI_STATUS Status; Status = I2CRead (&gRtcDevice, Address, Size, Data); - MicroSecondDelay (RTC_DELAY_1000_MACROSECOND); + MicroSecondDelay (RTC_DELAY_1000_MICROSECOND); return Status; } @@ -132,7 +132,7 @@ RtcWrite ( EFI_STATUS Status; Status = I2CWrite (&gRtcDevice, Address, Size, Data); - MicroSecondDelay (RTC_DELAY_1000_MACROSECOND); + MicroSecondDelay (RTC_DELAY_1000_MICROSECOND); return Status; } @@ -164,7 +164,7 @@ InitializeM41T83 ( } Status = I2CInit (gRtcDevice.Socket, gRtcDevice.Port, Normal); - MicroSecondDelay (RTC_DELAY_1000_MACROSECOND); + MicroSecondDelay (RTC_DELAY_1000_MICROSECOND); if (EFI_ERROR (Status)) { if (!EfiAtRuntime ()) { EfiReleaseLock (&mRtcLock); @@ -181,7 +181,7 @@ InitializeM41T83 ( return Status; } - MicroSecondDelay(RTC_DELAY_1000_MACROSECOND); + MicroSecondDelay(RTC_DELAY_1000_MICROSECOND); // Set ST at Power up to clear Oscillator fail detection(OF) Status = RtcRead (M41T83_REGADDR_SECONDS, 1, &Second.Uint8); @@ -272,7 +272,7 @@ LibSetTime ( if (EFI_ERROR (Status)) { return Status; } - (VOID)MicroSecondDelay (RTC_DELAY_1000_MACROSECOND); + (VOID)MicroSecondDelay (RTC_DELAY_1000_MICROSECOND); SetMem (&BcdTime, sizeof (RTC_M41T83_TIME), 0); @@ -376,7 +376,7 @@ LibGetTime ( return Status; } - MicroSecondDelay(RTC_DELAY_1000_MACROSECOND); + MicroSecondDelay(RTC_DELAY_1000_MICROSECOND); SetMem (&BcdTime, sizeof (RTC_M41T83_TIME), 0); SetMem (Time , sizeof (EFI_TIME), 0); -- 2.8.1