]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PcAtChipsetPkg/8254TimerDxe/Timer.c
Create a MAX_TIMER_TICK_DURATION for the error handling in 8254 timer module.
[mirror_edk2.git] / PcAtChipsetPkg / 8254TimerDxe / Timer.c
index da7d6af57806ff753a7010cc31949d53dedcb57f..a7f49470021c22920690e1ba8cac649f95b83f53 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Timer Architectural Protocol as defined in the DXE CIS\r
 \r
-Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -219,9 +219,7 @@ TimerDriverSetTimerPeriod (
     //\r
     if (TimerCount >= 65536) {\r
       TimerCount = 0;\r
-      if (TimerPeriod >= DEFAULT_TIMER_TICK_DURATION) {\r
-        TimerPeriod = DEFAULT_TIMER_TICK_DURATION;\r
-      }\r
+      TimerPeriod = MAX_TIMER_TICK_DURATION;\r
     }\r
     //\r
     // Program the 8254 timer with the new count value\r