summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-27 10:25:20 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-27 10:25:20 +0000
commit8ddaf4710cb0a0f525e14611d50627e88a595f34 (patch)
tree5660450fe025ea9e0c466e2a86eaa94ac846f3b8 /ArmPlatformPkg
parent31d196c16fe4f8cca4a3caedd49636b83eccd24d (diff)
downloadedk2-platforms-8ddaf4710cb0a0f525e14611d50627e88a595f34.tar.xz
ArmPlatformPkg/SP804TimerDxe: Move 'gVector' initialization earlier in the code
The global variable 'gVector' is also used by the function TimerDriverSetTimerPeriod(). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13042 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg')
-rw-r--r--ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c
index aa4c4d6dcc..4b073600d9 100644
--- a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c
+++ b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c
@@ -2,6 +2,7 @@
Template for Timer Architecture Protocol driver of the ARM flavor
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
+ Copyright (c) 20i1 - 2012, ARM Ltd. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -356,6 +357,9 @@ TimerInitialize (
EFI_HANDLE Handle = NULL;
EFI_STATUS Status;
+ // Set the interrupt timer number
+ gVector = PcdGet32(PcdSP804TimerPeriodicInterruptNum);
+
// Find the interrupt controller protocol. ASSERT if not found.
Status = gBS->LocateProtocol (&gHardwareInterruptProtocolGuid, NULL, (VOID **)&gInterrupt);
ASSERT_EFI_ERROR (Status);
@@ -365,7 +369,6 @@ TimerInitialize (
ASSERT_EFI_ERROR (Status);
// Install interrupt handler
- gVector = PcdGet32(PcdSP804TimerPeriodicInterruptNum);
Status = gInterrupt->RegisterInterruptSource (gInterrupt, gVector, TimerInterruptHandler);
ASSERT_EFI_ERROR (Status);