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

@ -68,6 +68,7 @@
gAndroidFastbootTransportProtocolGuid = { 0x74bd9fe0, 0x8902, 0x11e3, {0xb9, 0xd3, 0xf7, 0x22, 0x38, 0xfc, 0x9a, 0x31}}
gAndroidFastbootPlatformProtocolGuid = { 0x524685a0, 0x89a0, 0x11e3, {0x9d, 0x4d, 0xbf, 0xa9, 0xf6, 0xa4, 0x03, 0x08}}
gUsbDeviceProtocolGuid = { 0x021bd2ca, 0x51d2, 0x11e3, {0x8e, 0x56, 0xb7, 0x54, 0x17, 0xc7, 0x0b, 0x44 }}
gPlatformGpioProtocolGuid = { 0x52ce9845, 0x5af4, 0x43e2, {0xba, 0xfd, 0x23, 0x08, 0x12, 0x54, 0x7a, 0xc2 }}
[PcdsFeatureFlag.common]
gEmbeddedTokenSpaceGuid.PcdEmbeddedMacBoot|FALSE|BOOLEAN|0x00000001

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