public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ming Huang <huangming23@huawei.com>
To: <devel@edk2.groups.io>, <leif@nuviainc.com>, <ard.biesheuvel@linaro.org>
Cc: <lidongzhan@huawei.com>, <huangming23@huawei.com>,
	<songdongkuang@huawei.com>, <wanghuiqiang@huawei.com>,
	<qiuliangen@huawei.com>
Subject: [RFC edk2-platforms v3 1/3] Silicon/Hisilicon: Fix a typo issue in M41T83RealTimeClockLib
Date: Tue, 19 May 2020 22:09:00 +0800	[thread overview]
Message-ID: <1589897342-109203-2-git-send-email-huangming23@huawei.com> (raw)
In-Reply-To: <1589897342-109203-1-git-send-email-huangming23@huawei.com>

There is a typo issue in M41T83RealTimeClockLib. The MACROSECOND
should be MICROSECOND.

Signed-off-by: Ming Huang <huangming23@huawei.com>
---
 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


  reply	other threads:[~2020-05-19 14:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 14:08 [RFC edk2-platforms v3 0/3] Improve D0x Ming Huang
2020-05-19 14:09 ` Ming Huang [this message]
2020-05-19 14:09 ` [RFC edk2-platforms v3 2/3] Hisilicon/Library: Move two functions to RtcHelperLib Ming Huang
2020-05-19 14:09 ` [RFC edk2-platforms v3 3/3] Silicon/Hisilicon: Add RX8900RealTimeClockLib Ming Huang
2020-05-20 11:31 ` [RFC edk2-platforms v3 0/3] Improve D0x Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1589897342-109203-2-git-send-email-huangming23@huawei.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox