summaryrefslogtreecommitdiff
path: root/EmbeddedPkg/Include
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2016-03-14 13:30:36 +0800
committerLeif Lindholm <leif.lindholm@linaro.org>2016-03-14 12:47:29 +0000
commit78741ce91e1285c9fbb3ba554f5f968dfca58ede (patch)
tree75fdf2b8847307a091e2c6e4661be68a49fedee8 /EmbeddedPkg/Include
parent9c17810a3635f6c0ca2afa78e3ec05bbb807d4be (diff)
downloadedk2-platforms-78741ce91e1285c9fbb3ba554f5f968dfca58ede.tar.xz
EmbeddedPkg: enhance for multiple gpio controllers
EmbeddedGpio only supports one gpio controller in one platform. Now create PLATFORM_GPIO_CONTROLLER to support multiple gpio controllers in one platform. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'EmbeddedPkg/Include')
-rw-r--r--EmbeddedPkg/Include/Protocol/EmbeddedGpio.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h b/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h
index 4e7c8dbcd6..b8bc929b77 100644
--- a/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h
+++ b/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h
@@ -164,4 +164,21 @@ struct _EMBEDDED_GPIO {
extern EFI_GUID gEmbeddedGpioProtocolGuid;
+typedef struct _GPIO_CONTROLLER GPIO_CONTROLLER;
+typedef struct _PLATFORM_GPIO_CONTROLLER PLATFORM_GPIO_CONTROLLER;
+
+struct _GPIO_CONTROLLER {
+ UINTN RegisterBase;
+ UINTN GpioIndex;
+ UINTN InternalGpioCount;
+};
+
+struct _PLATFORM_GPIO_CONTROLLER {
+ UINTN GpioCount;
+ UINTN GpioControllerCount;
+ GPIO_CONTROLLER *GpioController;
+};
+
+extern EFI_GUID gPlatformGpioProtocolGuid;
+
#endif