From patchwork Mon Mar 14 05:30:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 63790 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2288559lbc; Sun, 13 Mar 2016 22:30:59 -0700 (PDT) X-Received: by 10.98.19.18 with SMTP id b18mr27293792pfj.22.1457933458902; Sun, 13 Mar 2016 22:30:58 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id u64si2894726pfa.100.2016.03.13.22.30.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Mar 2016 22:30:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 05B0E1A1F99; Sun, 13 Mar 2016 22:31:16 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-pf0-x22b.google.com (mail-pf0-x22b.google.com [IPv6:2607:f8b0:400e:c00::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0706B1A1F3D for ; Sun, 13 Mar 2016 22:31:15 -0700 (PDT) Received: by mail-pf0-x22b.google.com with SMTP id x3so34866331pfb.1 for ; Sun, 13 Mar 2016 22:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:from:to:cc:subject:date:in-reply-to:references :mime-version; bh=evzAiqi1ExjfDZ1ijFZcHnRVbexCD2KAnd0t9aK00tw=; b=QuTuGpUIqKeBldAnzeFPKZc4oV1jDnLbTbRxqLU2dlucq/V8NWmkTGi3PyKWCO/TDE hbDZgSaooezJ8BL1pbjkY2CB2o6/uvQ8ZHwmMmVlhhoBs4UwUhaX0aJH1gt7ihPwyrbZ tIGpye2Qip2JZVTQ8kgFd50evOgnqGIYMiiZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:from:to:cc:subject:date:in-reply-to :references:mime-version; bh=evzAiqi1ExjfDZ1ijFZcHnRVbexCD2KAnd0t9aK00tw=; b=G5wV75XLgZAVnzFCI8IWgo8zPPhVSNCBNfe9toYxnDxBN9DuWp0l0QZrIs2BaG53j7 R2g8+Oq/PARRPXxzto6SpSqU2MSoCtdTMa5q6ojuxrdwp74bziPG6Pi+XILACH2ODUzf 5HuvQMJmozMO85YHRZqbUh8KkxP7YsLGQXstWe/qvvaTyZwEhvZR/UEXVEfASEQE8A97 n8rosHPs+oNH1EummJDnxEc001q9B3wlULqjxvr2ySfX7s8KZ+A2zLStRCUZaoVcaRft 5CNzQZrk0e/EHwbelhw8JtxuC6/bKGWLNQGsLIXu4p+M8c/XZJAjNIwUv8U7m4u5vZ0+ +q/A== X-Gm-Message-State: AD7BkJJ441zFVYofUmjqTrrAmPHGJEDzXrkZWvcUtgzczF4mKd5D3yuuMS864tFNee24Tikv X-Received: by 10.98.79.205 with SMTP id f74mr27289583pfj.68.1457933457259; Sun, 13 Mar 2016 22:30:57 -0700 (PDT) Received: from mail.hotmail.com (blu004-wss1s6.hotmail.com. [134.170.2.221]) by smtp.gmail.com with ESMTPSA id c9sm28605095pfd.90.2016.03.13.22.30.55 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 13 Mar 2016 22:30:56 -0700 (PDT) Received: from BLU436-SMTP12 ([134.170.2.215]) by BLU004-WSS1S6.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sun, 13 Mar 2016 22:30:54 -0700 X-TMN: [8W0fabr1Vgv4hSgEeJSw3bukcvgEkBIg] Message-ID: From: Haojian Zhuang To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Date: Mon, 14 Mar 2016 13:30:36 +0800 X-Mailer: git-send-email 1.9.1 In-Reply-To: <1457933437-17353-1-git-send-email-haojian.zhuang@linaro.org> References: <1457933437-17353-1-git-send-email-haojian.zhuang@linaro.org> X-OriginalArrivalTime: 14 Mar 2016 05:30:52.0695 (UTC) FILETIME=[ACC8DA70:01D17DB2] MIME-Version: 1.0 Cc: Haojian Zhuang Subject: [edk2] [PATCH v5 1/2] EmbeddedPkg: enhance for multiple gpio controllers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- EmbeddedPkg/EmbeddedPkg.dec | 1 + EmbeddedPkg/Include/Protocol/EmbeddedGpio.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index cd0d96f..7bcb133 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -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 diff --git a/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h b/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h index 4e7c8db..b8bc929 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