diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-07-20 15:13:06 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-07-20 15:13:06 +0000 |
commit | 2d08d17d651d81d267f00dcfdff0a46013b49907 (patch) | |
tree | 71a83510ff87942ddc3224a4c7869cbd7f3eb1a7 /BeagleBoardPkg | |
parent | 3e4df77fc34c9b06e78dbced73a3e7ae57315d65 (diff) | |
download | edk2-platforms-2d08d17d651d81d267f00dcfdff0a46013b49907.tar.xz |
BeagleBoardPkg: Ensure there is no pending IRQ and disable timer
When the BeagleBoard UEFI is started from a 1st (or 2nd stage) boot loader
it is possible there are still some pending IRQ.
Clean the interrupts before starting the BeagleBoard UEFI.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12034 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BeagleBoardPkg')
-rwxr-xr-x | BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c | 13 | ||||
-rwxr-xr-x | BeagleBoardPkg/Library/BeagleBoardLib/Clock.c | 1 |
2 files changed, 12 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
|