summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-11 11:17:41 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-11 11:17:41 +0000
commit1eb3454b8a56a18b1da828a51e35845b3fc0e967 (patch)
treed1912ab9e94f4bcb12c4567605db294f055e71ce
parent780e2bdc1afbfc27f1d846063e635cee980f2736 (diff)
downloadedk2-platforms-1eb3454b8a56a18b1da828a51e35845b3fc0e967.tar.xz
ArmPlatformPkg/SP804TimerDxe: Replaced Interrupt number #define by a PCD
The PcdSP804Timer0InterruptNum defines the interrupt number attached to SP804 Timer0. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11791 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--ArmPlatformPkg/ArmPlatformPkg.dec1
-rw-r--r--ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc1
-rw-r--r--ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc1
-rw-r--r--ArmPlatformPkg/ArmRealViewEbPkg/Include/Platform/ArmPlatform.h9
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc1
-rw-r--r--ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h9
-rw-r--r--ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c2
-rw-r--r--ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf1
8 files changed, 6 insertions, 19 deletions
diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec
index 1f83f43f33..1d9c05a233 100644
--- a/ArmPlatformPkg/ArmPlatformPkg.dec
+++ b/ArmPlatformPkg/ArmPlatformPkg.dec
@@ -69,4 +69,5 @@
# ARM Primecells
#
gArmPlatformTokenSpaceGuid.PcdSP804FrequencyInMHz|1|UINT32|0x0000001D
+ gArmPlatformTokenSpaceGuid.PcdSP804Timer0InterruptNum|0|UINT32|0x0000001E
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc
index dbe00dffce..47b4d25f47 100644
--- a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc
+++ b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc
@@ -353,6 +353,7 @@
gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|1000000
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms
+ gArmPlatformTokenSpaceGuid.PcdSP804Timer0InterruptNum|36
#
# ARM Pcds
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc
index faa79aaf5b..b6c3acde18 100644
--- a/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc
+++ b/ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc
@@ -357,6 +357,7 @@
gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|1000000
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms
+ gArmPlatformTokenSpaceGuid.PcdSP804Timer0InterruptNum|33
#
# ARM Pcds
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Include/Platform/ArmPlatform.h b/ArmPlatformPkg/ArmRealViewEbPkg/Include/Platform/ArmPlatform.h
index 18f8a66502..f053bdd9cc 100644
--- a/ArmPlatformPkg/ArmRealViewEbPkg/Include/Platform/ArmPlatform.h
+++ b/ArmPlatformPkg/ArmRealViewEbPkg/Include/Platform/ArmPlatform.h
@@ -120,15 +120,6 @@
/*******************************************
-// Interrupt Map
-*******************************************/
-
-// Timer Interrupts
-#define TIMER01_INTERRUPT_NUM 34
-#define TIMER23_INTERRUPT_NUM 35
-
-
-/*******************************************
// EFI Memory Map in Permanent Memory (DRAM)
*******************************************/
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc
index 0d6a028ebd..08c6c62f93 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA9x4.dsc
@@ -381,6 +381,7 @@
gArmTokenSpaceGuid.PcdSystemMemorySize|0x40000000
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms
+ gArmPlatformTokenSpaceGuid.PcdSP804Timer0InterruptNum|34
#
# ARM Pcds
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h b/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h
index 1b64392b2e..f66ff3396a 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h
+++ b/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h
@@ -131,15 +131,6 @@
#define PL111_CLCD_CORE_TILE_VIDEO_MODE_OSC_ID 1
/***********************************************************************************
-// Interrupt Map
-************************************************************************************/
-
-// Timer Interrupts
-#define TIMER01_INTERRUPT_NUM 34
-#define TIMER23_INTERRUPT_NUM 35
-
-
-/***********************************************************************************
// EFI Memory Map in Permanent Memory (DRAM)
************************************************************************************/
diff --git a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c
index 7e47891981..e74b7e1382 100644
--- a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c
+++ b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c
@@ -379,7 +379,7 @@ TimerInitialize (
ASSERT_EFI_ERROR (Status);
// Install interrupt handler
- gVector = TIMER01_INTERRUPT_NUM;
+ gVector = PcdGet32(PcdSP804Timer0InterruptNum);
Status = gInterrupt->RegisterInterruptSource (gInterrupt, gVector, TimerInterruptHandler);
ASSERT_EFI_ERROR (Status);
diff --git a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf
index a1765cc78c..017277ad71 100644
--- a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf
+++ b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf
@@ -49,6 +49,7 @@
[Pcd.common]
gArmPlatformTokenSpaceGuid.PcdSP804FrequencyInMHz
+ gArmPlatformTokenSpaceGuid.PcdSP804Timer0InterruptNum
gEmbeddedTokenSpaceGuid.PcdTimerPeriod
[Depex]