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>
This commit is contained in:
Haojian Zhuang
2016-03-14 13:30:36 +08:00
committed by Leif Lindholm
parent 9c17810a36
commit 78741ce91e
2 changed files with 18 additions and 0 deletions

View File

@@ -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