summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Include/Drivers/PL061Gpio.h
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-01 15:30:01 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-01 15:30:01 +0000
commit5cc45b70c310f853f28b2351f3d93109ff858dcf (patch)
tree22917c5dfa20a9f553c1adda9ce6efc04b722dc7 /ArmPlatformPkg/Include/Drivers/PL061Gpio.h
parent7fb54d9d04f52e22f6df16e0035c565c3dce7bd4 (diff)
downloadedk2-platforms-5cc45b70c310f853f28b2351f3d93109ff858dcf.tar.xz
ArmPkg: Move ARM Platform drivers from ArmPkg/Drivers/ to ArmPlatformPkg/Drivers/
The idea is to keep ArmPkg responsible for the ARM architectural modules and ArmPlatformPkg the ARM development platform packages (with their respective drivers). ArmPlatformPkg: Reduce driver dependency on ArmPlatform.h - Move some driver definitions from C-Macro to PCD values - Unify PCD driver namespace git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11956 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Include/Drivers/PL061Gpio.h')
-rw-r--r--ArmPlatformPkg/Include/Drivers/PL061Gpio.h42
1 files changed, 20 insertions, 22 deletions
diff --git a/ArmPlatformPkg/Include/Drivers/PL061Gpio.h b/ArmPlatformPkg/Include/Drivers/PL061Gpio.h
index 4daabff768..739caaf2a1 100644
--- a/ArmPlatformPkg/Include/Drivers/PL061Gpio.h
+++ b/ArmPlatformPkg/Include/Drivers/PL061Gpio.h
@@ -16,31 +16,29 @@
#ifndef __PL061_GPIO_H__
#define __PL061_GPIO_H__
-#include <Base.h>
#include <Protocol/EmbeddedGpio.h>
-#include <ArmPlatform.h>
// SP805 Watchdog Registers
-#define PL061_GPIO_DATA_REG (PL061_GPIO_BASE + 0x000)
-#define PL061_GPIO_DIR_REG (PL061_GPIO_BASE + 0x400)
-#define PL061_GPIO_IS_REG (PL061_GPIO_BASE + 0x404)
-#define PL061_GPIO_IBE_REG (PL061_GPIO_BASE + 0x408)
-#define PL061_GPIO_IEV_REG (PL061_GPIO_BASE + 0x40C)
-#define PL061_GPIO_IE_REG (PL061_GPIO_BASE + 0x410)
-#define PL061_GPIO_RIS_REG (PL061_GPIO_BASE + 0x414)
-#define PL061_GPIO_MIS_REG (PL061_GPIO_BASE + 0x410)
-#define PL061_GPIO_IC_REG (PL061_GPIO_BASE + 0x41C)
-#define PL061_GPIO_AFSEL_REG (PL061_GPIO_BASE + 0x420)
-
-#define PL061_GPIO_PERIPH_ID0 (PL061_GPIO_BASE + 0xFE0)
-#define PL061_GPIO_PERIPH_ID1 (PL061_GPIO_BASE + 0xFE4)
-#define PL061_GPIO_PERIPH_ID2 (PL061_GPIO_BASE + 0xFE8)
-#define PL061_GPIO_PERIPH_ID3 (PL061_GPIO_BASE + 0xFEC)
-
-#define PL061_GPIO_PCELL_ID0 (PL061_GPIO_BASE + 0xFF0)
-#define PL061_GPIO_PCELL_ID1 (PL061_GPIO_BASE + 0xFF4)
-#define PL061_GPIO_PCELL_ID2 (PL061_GPIO_BASE + 0xFF8)
-#define PL061_GPIO_PCELL_ID3 (PL061_GPIO_BASE + 0xFFC)
+#define PL061_GPIO_DATA_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x000)
+#define PL061_GPIO_DIR_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x400)
+#define PL061_GPIO_IS_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x404)
+#define PL061_GPIO_IBE_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x408)
+#define PL061_GPIO_IEV_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x40C)
+#define PL061_GPIO_IE_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x410)
+#define PL061_GPIO_RIS_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x414)
+#define PL061_GPIO_MIS_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x410)
+#define PL061_GPIO_IC_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x41C)
+#define PL061_GPIO_AFSEL_REG ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0x420)
+
+#define PL061_GPIO_PERIPH_ID0 ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0xFE0)
+#define PL061_GPIO_PERIPH_ID1 ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0xFE4)
+#define PL061_GPIO_PERIPH_ID2 ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0xFE8)
+#define PL061_GPIO_PERIPH_ID3 ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0xFEC)
+
+#define PL061_GPIO_PCELL_ID0 ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0xFF0)
+#define PL061_GPIO_PCELL_ID1 ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0xFF4)
+#define PL061_GPIO_PCELL_ID2 ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0xFF8)
+#define PL061_GPIO_PCELL_ID3 ((UINT32)PcdGet32 (PcdPL061GpioBase) + 0xFFC)
// GPIO pins are numbered 0..7