summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c13
-rwxr-xr-xBeagleBoardPkg/Library/BeagleBoardLib/Clock.c1
-rw-r--r--Omap35xxPkg/TimerDxe/Timer.c3
3 files changed, 15 insertions, 2 deletions
diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c
index a74b60d91a..5a40ccea91 100755
--- a/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c
+++ b/BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c
@@ -17,6 +17,8 @@
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
+#include <Omap3530/Omap3530.h>
+
VOID
PadConfiguration (
VOID
@@ -101,12 +103,21 @@ ArmPlatformGetBootMode (
VOID
ArmPlatformNormalInitialize (
VOID
- ) {
+ )
+{
//Set up Pin muxing.
PadConfiguration ();
// Set up system clocking
ClockInit ();
+
+ // Turn off the functional clock for Timer 3
+ MmioAnd32 (CM_FCLKEN_PER, 0xFFFFFFFF ^ CM_ICLKEN_PER_EN_GPT3_ENABLE );
+ ArmDataSyncronizationBarrier ();
+
+ // Clear IRQs
+ MmioWrite32 (INTCPS_CONTROL, INTCPS_CONTROL_NEWIRQAGR);
+ ArmDataSyncronizationBarrier ();
}
/**
diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c b/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
index 8de24f851c..1985a6bfb4 100755
--- a/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
+++ b/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
@@ -46,7 +46,6 @@ ClockInit (
// Turn on functional & interface clocks to various Peripherals.
MmioOr32(CM_FCLKEN_PER, CM_FCLKEN_PER_EN_UART3_ENABLE
- | CM_FCLKEN_PER_EN_GPT3_ENABLE
| CM_FCLKEN_PER_EN_GPT4_ENABLE
| CM_FCLKEN_PER_EN_GPIO2_ENABLE
| CM_FCLKEN_PER_EN_GPIO3_ENABLE
diff --git a/Omap35xxPkg/TimerDxe/Timer.c b/Omap35xxPkg/TimerDxe/Timer.c
index 1919618ef2..d0ea973509 100644
--- a/Omap35xxPkg/TimerDxe/Timer.c
+++ b/Omap35xxPkg/TimerDxe/Timer.c
@@ -356,6 +356,9 @@ TimerInitialize (
Status = gInterrupt->RegisterInterruptSource (gInterrupt, gVector, TimerInterruptHandler);
ASSERT_EFI_ERROR (Status);
+ // Turn on the functional clock for Timer
+ MmioOr32 (CM_FCLKEN_PER, CM_FCLKEN_PER_EN_GPT3_ENABLE);
+
// Set up default timer
Status = TimerDriverSetTimerPeriod (&gTimer, FixedPcdGet32(PcdTimerPeriod));
ASSERT_EFI_ERROR (Status);