summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/ArmRealViewEbPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-03 09:32:39 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-03 09:32:39 +0000
commit23792dea0ca521e8696c7994e9cc6d04581f0b2c (patch)
treecd16c0d235bfa0bce9c957150ce883e325f55d10 /ArmPlatformPkg/ArmRealViewEbPkg
parent9dcfb8e5c8edb262a8e941d119af553205d38b2e (diff)
downloadedk2-platforms-23792dea0ca521e8696c7994e9cc6d04581f0b2c.tar.xz
ArmPlatformPkg/SP804Timer: Remove the SP810 System Controller dependency
The SP804 drivers must not consider the presence of the SP810 System Controller on the platform. The SP810 was used to enable the SP804 Dual Timers on ArmVExpress. It is the role of the Platform specific driver to enable to the SP804 dual timers if required. The former SP810 initialization code has moved to ArmPlatformLib for ArmRealViewEb and ArmVersatileExpress. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11744 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/ArmRealViewEbPkg')
-rw-r--r--ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c
index 8be95ce38f..8a1446a81d 100644
--- a/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c
+++ b/ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c
@@ -16,7 +16,9 @@
#include <Library/ArmPlatformLib.h>
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
+
#include <Drivers/PL341Dmc.h>
+#include <Drivers/SP804Timer.h>
/**
Return if Trustzone is supported by your platform
@@ -109,7 +111,14 @@ ArmPlatformNormalInitialize (
VOID
)
{
- // Nothing to do here
+ // Configure periodic timer (TIMER0) for 1MHz operation
+ MmioOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, SP810_SYS_CTRL_TIMER0_TIMCLK);
+ // Configure 1MHz clock
+ MmioOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, SP810_SYS_CTRL_TIMER1_TIMCLK);
+ // configure SP810 to use 1MHz clock and disable
+ MmioAndThenOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, ~SP810_SYS_CTRL_TIMER2_EN, SP810_SYS_CTRL_TIMER2_TIMCLK);
+ // Configure SP810 to use 1MHz clock and disable
+ MmioAndThenOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, ~SP810_SYS_CTRL_TIMER3_EN, SP810_SYS_CTRL_TIMER3_TIMCLK);
}
/**