From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4864:20::244; helo=mail-lj1-x244.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (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 2810A2194D3AE for ; Thu, 17 Jan 2019 03:15:44 -0800 (PST) Received: by mail-lj1-x244.google.com with SMTP id t9-v6so8238018ljh.6 for ; Thu, 17 Jan 2019 03:15:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iv7H4ry9pc/qbgdjEZvzrtIGCIXF6kGUlZxDJ/hBhic=; b=P6PFXvf9mAsURgaz5arrCCI8PveM3pT65HglyC4sHOrTrcNOv/rs0Ymrsp8/wH4rnB W5u8m46Kpmw1ixHIg9UeCQDBaZfbHCfC3tgPTE7NhMzfh4L0+HLoEST5XWy0RoBKcU96 11R9V89Ac+kJZOcGBRNRyjKcTyyl4InEXZmOFCKt/e+iLXNOAZrjechXqPVrdG1sqZxm FPlaaK/ROA+6bteqR6ZZwPR/WCo19IyNh8AUpehCgHFwAU1CXkIxrv2i0BDhsrJ2dsPS HgvpL481KIxwCIJLA5+BC9EqXrg31MBoDIervZFeq1FIdigrGGJxIG2doECxke/BNNM8 N22g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iv7H4ry9pc/qbgdjEZvzrtIGCIXF6kGUlZxDJ/hBhic=; b=ojc7s2WOX1TJQyEVUxpqaZ2WK9IL5HLYoSw/VdVSzEs/CTIxYS6wOTqhHhVDkA72dA mjlRrxDRoZXnp0758uZo0n4fWUqcuujUO69wPTQuIsQ/YkNNQAT/mkvvEm/tTwyNI+cc XhA8Gk75pqPzAxxCYcoVnGMyt+AQpuqjGOf4LmcF3KpreT/fsNxyGOJTjjaaR9mm3vny wPsyyrBY5vKpRDvXqMcNdLxcXdshWfs/idnra57S7j5vMYwxA4q037i2VckkoL2Z7ED9 RkM0Ey+06TrtJTfBB6/Q2kDje295QDRzzX5Wa/fhIuhf58RBaTmXJCXIb22+IO262a2a m4JA== X-Gm-Message-State: AJcUukcbLx0K3AQPormms2Rs87a/c0nMOIl38ONT7wqQbmNCabZ7rMRd HS7zjai/hLHJIKQZPBZEMoMEmtyJ5vA= X-Google-Smtp-Source: ALg8bN4kM4WSwgBUUxHxM6T0i72CnZ6JdSrqXvxRo2w556GDroX87RxVU4UIfF1+TVr7nVECd6+2sw== X-Received: by 2002:a2e:2909:: with SMTP id u9-v6mr9506351lje.28.1547723740380; Thu, 17 Jan 2019 03:15:40 -0800 (PST) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id d23sm238003lfc.11.2019.01.17.03.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jan 2019 03:15:39 -0800 (PST) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, mw@semihalf.com, jsd@semihalf.com, jaz@semihalf.com, kostap@marvell.com Date: Thu, 17 Jan 2019 12:15:08 +0100 Message-Id: <1547723715-4562-6-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547723715-4562-1-git-send-email-mw@semihalf.com> References: <1547723715-4562-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH v3 05/12] Marvell/Armada70x0Db: Extend board description library with GPIO X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 X-List-Received-Date: Thu, 17 Jan 2019 11:15:44 -0000 This patch implements ArmadaBoarDescLib library for Armada70x0Db comunity board and introduces ArmadaBoardGpioGet routine with per-board GPIO expander description. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c index 48c68e4..f0133ec 100644 --- a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c +++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c @@ -19,9 +19,33 @@ #include #include #include +#include #include // +// GPIO Expander +// +STATIC MV_GPIO_EXPANDER mGpioExpander = { + PCA9555_ID, + 0x21, + 0x0, +}; + + +EFI_STATUS +EFIAPI +ArmadaBoardGpioExpanderGet ( + IN OUT MV_GPIO_EXPANDER **GpioExpanders, + IN OUT UINTN *GpioExpanderCount + ) +{ + *GpioExpanderCount = 1; + *GpioExpanders = &mGpioExpander; + + return EFI_SUCCESS; +} + +// // Order of devices in SdMmcDescTemplate has to be in par with ArmadaSoCDescLib // STATIC -- 2.7.4