summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2014-07-04 11:27:28 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2014-07-04 11:27:28 +0000
commit60775c51a52ade2f4c63777cd037f99903c36068 (patch)
tree17e25465a9153c5ae15ff0ceb89c655e493c266e /ArmPkg
parent0458b423b66eab6979ee9124ad8489d8e0e2bb50 (diff)
downloadedk2-platforms-60775c51a52ade2f4c63777cd037f99903c36068.tar.xz
ArmPkg/ArmGic: Moved ArmGicDisableDistributor() to ArmGicLib.c
The implementation is the same when we run in Secure or Non-Secure world. This change makes this function available for ArmGicSec.inf and ArmGicNonSec.inf. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15625 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/ArmGic/ArmGicLib.c15
-rw-r--r--ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c12
2 files changed, 13 insertions, 14 deletions
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicLib.c b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
index 0fe62f2f53..c0f3bfb4c2 100644
--- a/ArmPkg/Drivers/ArmGic/ArmGicLib.c
+++ b/ArmPkg/Drivers/ArmGic/ArmGicLib.c
@@ -12,10 +12,9 @@
*
**/
-#include <Uefi.h>
-#include <Library/IoLib.h>
+#include <Base.h>
#include <Library/ArmGicLib.h>
-#include <Library/PcdLib.h>
+#include <Library/IoLib.h>
UINTN
EFIAPI
@@ -120,3 +119,13 @@ ArmGicIsInterruptEnabled (
return ((MmioRead32 (GicDistributorBase + ARM_GIC_ICDISER + (4 * RegOffset)) & (1 << RegShift)) != 0);
}
+
+VOID
+EFIAPI
+ArmGicDisableDistributor (
+ IN INTN GicDistributorBase
+ )
+{
+ // Disable Gic Distributor
+ MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x0);
+}
diff --git a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c
index 0bbc509550..3ff9b4888c 100644
--- a/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c
+++ b/ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2014, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2014, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -53,13 +53,3 @@ ArmGicEnableDistributor (
*/
MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x1);
}
-
-VOID
-EFIAPI
-ArmGicDisableDistributor (
- IN INTN GicDistributorBase
- )
-{
- // Disable Gic Distributor
- MmioWrite32 (GicDistributorBase + ARM_GIC_ICDDCR, 0x0);
-}