From 78741ce91e1285c9fbb3ba554f5f968dfca58ede Mon Sep 17 00:00:00 2001 From: Haojian Zhuang Date: Mon, 14 Mar 2016 13:30:36 +0800 Subject: 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 Reviewed-by: Leif Lindholm --- EmbeddedPkg/Include/Protocol/EmbeddedGpio.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'EmbeddedPkg/Include/Protocol/EmbeddedGpio.h') 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 -- cgit v1.2.3