From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::344; helo=mail-wm1-x344.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 9868A211B5A57 for ; Mon, 14 Jan 2019 14:41:15 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id a62so1338051wmh.4 for ; Mon, 14 Jan 2019 14:41:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fuBcRmVjXvyHR31j+q9ReveirajO83p0Ibwr6rRWdyk=; b=WL4mSd2QtgJWIagpQ7ayJChxn2kHRKEFheTCTvtVNz0nCr9xiUPpj5jZiXXr2xWsIt rlpjCA4v+FYfUE0JtftvBQzscjdM3gp4I9Ac3CX40SD5VyLFqZ0O9bmfaL5YcvU7asOC o1zUiVZPU9MwpSb5OZ15+fnhtnp/6Qn05oIUk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fuBcRmVjXvyHR31j+q9ReveirajO83p0Ibwr6rRWdyk=; b=ib5iVp7dyWq910/D9/qYB9mEUnDZIXNTY5CltzXFmfHh2oq1NjGpBtRDThvqJMCCw4 2pkBvWv4p28wuJh/hutCIfmjnsLkN8fXvdiuzruoCJ8K2eHE3P2UkWzb41AncA5/uuN8 X3EGHNMaBxFGmkDU7a1AycQ4UhdEf9Ch5mNnM6LqpcJqgQNecO+IdbtXCuQwuE4EBpEk 8AND7V20EWXLYwxm50V8XGP6t/+Jcs+ivhG9cAayzJ59DABC+BcsUdlL8QH+Sf2UiHk8 A+LlpBAx6nrJ8jgMF5eTZhbn7wgGRNYrkMjBBlL4npVwCrQrv6xNfSI8sl6LWx8ORgR5 vg9g== X-Gm-Message-State: AJcUukf6zZccKKaf2YLTQsBDzlTiuHe2BF7QGlICTwaK6TxykyAp0p/c l2nf5JtaAnMy1Mr1443E/ApwesqAIXk= X-Google-Smtp-Source: ALg8bN5jkASKjM2/0XCXFTAjZmrTCimc+fnfSU/5SRHSq+sKwC/aRnMXrzNqvCJ35iTpHUqHZyeEuA== X-Received: by 2002:a1c:bc82:: with SMTP id m124mr920665wmf.77.1547505673974; Mon, 14 Jan 2019 14:41:13 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id k135sm33251451wmd.42.2019.01.14.14.41.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jan 2019 14:41:12 -0800 (PST) Date: Mon, 14 Jan 2019 22:41:11 +0000 From: Leif Lindholm To: Marcin Wojtas Cc: edk2-devel@lists.01.org, ard.biesheuvel@linaro.org, nadavh@marvell.com, jsd@semihalf.com, jaz@semihalf.com, kostap@marvell.com Message-ID: <20190114224111.vejwqebch3owpnwm@bivouac.eciton.net> References: <1547084679-29597-1-git-send-email-mw@semihalf.com> <1547084679-29597-5-git-send-email-mw@semihalf.com> MIME-Version: 1.0 In-Reply-To: <1547084679-29597-5-git-send-email-mw@semihalf.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [platforms: PATCH v2 04/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: Mon, 14 Jan 2019 22:41:15 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 10, 2019 at 02:44:31AM +0100, Marcin Wojtas wrote: > 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.inf | 1 + > Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 25 ++++++++++++++++++++ > 2 files changed, 26 insertions(+) > > diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf > index b26f55b..c995515 100644 > --- a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf > +++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf > @@ -25,6 +25,7 @@ > Armada70x0DbBoardDescLib.c > > [Packages] > + EmbeddedPkg/EmbeddedPkg.dec > MdeModulePkg/MdeModulePkg.dec > MdePkg/MdePkg.dec > Silicon/Marvell/Marvell.dec > diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c > index 48c68e4..f63d8fd 100644 > --- a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c > +++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c > @@ -21,6 +21,31 @@ > #include > #include > > +#include > + > +// > +// GPIO Expander > +// > +STATIC MV_GPIO_EXPANDER mGpioExpander = { > + 8, /* PCA9555 */ Why did you drop the use of the still existing enumeration in favour of live coding the integer value that it currently produces for the member PCA9555_ID? / Leif > + 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 > // > -- > 2.7.4 >