]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: ArmArchTimerLib: clean up comments
authorLaszlo Ersek <lersek@redhat.com>
Mon, 2 Feb 2015 12:01:29 +0000 (12:01 +0000)
committerlersek <lersek@Edk2>
Mon, 2 Feb 2015 12:01:29 +0000 (12:01 +0000)
In the next patch we'll slightly reorganize TimerConstructor(). Let's
improve the comments first.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16689 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.c

index c0ab4a4433e431e806211495a532b07d22cb4e81..fb010a8e4a80a99168623801496b41b75fbd230e 100644 (file)
@@ -30,32 +30,43 @@ TimerConstructor (
   VOID\r
   )\r
 {\r
-  // Check if the ARM Generic Timer Extension is implemented\r
+  //\r
+  // Check if the ARM Generic Timer Extension is implemented.\r
+  //\r
   if (ArmIsArchTimerImplemented ()) {\r
-\r
     UINTN TimerFreq;\r
 \r
-    // Check if Architectural Timer frequency is valid number (should not be 0)\r
+    //\r
+    // Check if Architectural Timer frequency is valid (should not be 0).\r
+    //\r
     ASSERT (PcdGet32 (PcdArmArchTimerFreqInHz));\r
 \r
+    //\r
     // Check if ticks/uS is not 0. The Architectural timer runs at constant\r
-    // frequency irrespective of CPU frequency. According to General Timer Ref\r
-    // manual lower bound of the frequency is in the range of 1-10MHz\r
+    // frequency, irrespective of CPU frequency. According to General Timer\r
+    // Ref manual, lower bound of the frequency is in the range of 1-10MHz.\r
+    //\r
     ASSERT (TICKS_PER_MICRO_SEC);\r
 \r
 #ifdef MDE_CPU_ARM\r
-    // Only set the frequency for ARMv7. We expect the secure firmware to have already do it\r
-    // If the security extensions are not implemented set Timer Frequency\r
+    //\r
+    // Only set the frequency for ARMv7. We expect the secure firmware to\r
+    // have already done it.\r
+    // If the security extension is not implemented, set Timer Frequency\r
+    // here.\r
+    //\r
     if ((ArmReadIdPfr1 () & ARM_PFR1_SEC) == 0x0) {\r
       ArmGenericTimerSetTimerFreq (PcdGet32 (PcdArmArchTimerFreqInHz));\r
     }\r
 #endif\r
 \r
-    // Architectural Timer Frequency must be set in the Secure privileged(if secure extensions are supported) mode.\r
-    // If the reset value (0) is returned just ASSERT.\r
+    //\r
+    // Architectural Timer Frequency must be set in the Secure privileged\r
+    // mode (if secure extension is supported).\r
+    // If the reset value (0) is returned, just ASSERT.\r
+    //\r
     TimerFreq = ArmGenericTimerGetTimerFreq ();\r
     ASSERT (TimerFreq != 0);\r
-\r
   } else {\r
     DEBUG ((EFI_D_ERROR, "ARM Architectural Timer is not available in the CPU, hence this library can not be used.\n"));\r
     ASSERT (0);\r