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::443; helo=mail-wr1-x443.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 37F8A21196206 for ; Tue, 4 Dec 2018 07:27:53 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id q18so16382932wrx.9 for ; Tue, 04 Dec 2018 07:27:53 -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=vjzA+mc0wpNSkoJLt/DnuIaqgKV6+r5cCgxaO+p23+8=; b=d1hCHClT9GFtkBwVWnUZZadDL6HSwWEzmdi+0VlhGRYVrx3OMPcfKwtY89KYQrgxMc g6WJ+m4zQu2tTnOX9IJlTYUROcCVdLZF6iGregk0oVr624JTEppyM8lbFyqiPZHLABmK sDGtbyqYvrOmInvjJFt5KfPFHAMb8WcihfVTE= 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=vjzA+mc0wpNSkoJLt/DnuIaqgKV6+r5cCgxaO+p23+8=; b=SxW5mnKY9Ttl/bauvmrCntSty+3T+A3AmgIfTyDG4HSDN4fO9F8kos7dYPH6DciFa/ paOVbNVqpeQxcmwWAVqDdEK07Pn6vcGV3fSX0zbcahP9Zj0RM7cVG8MwOe21vlbzfGt1 DeumAZFXhRxBOroHiKz5mhMWht+rfS83fXrrsS0LNQQR4XGifSFKIfhk9/u9ygSz/IRH 81EBVS7jKTJZDVc09twivpnC2iSEi2Fr9pSXEfefluvXReNz+0Et+5RXRThl8RB/1MlA DFUVoNlyAKtBJN5Th68IZJ+ua4DfpTW3VRzJbleiNO5ASvEsRo9GPaZT/1OdvsoxaD7j fzpg== X-Gm-Message-State: AA+aEWaJlLLUYi/Vl7335LwdxEKpX7HaNm2M9WWLTZsiay09v5+zsg3j RRjaml0wgNvCeIP05iF+wRJR9SsKkU8= X-Google-Smtp-Source: AFSGD/UP45zozgjZi5/lSkFK2WHw7wP1hy0Fnx/Y6+Wj71HkP5HRJicwu76zLONEv06Dri7AxBtERw== X-Received: by 2002:adf:f9cb:: with SMTP id w11mr17893910wrr.201.1543937271274; Tue, 04 Dec 2018 07:27:51 -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 5sm12183632wmr.37.2018.12.04.07.27.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Dec 2018 07:27:50 -0800 (PST) Date: Tue, 4 Dec 2018 15:27:48 +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: <20181204152748.hxug6syd7p4j2uti@bivouac.eciton.net> References: <1540000661-1956-1-git-send-email-mw@semihalf.com> <1540000661-1956-5-git-send-email-mw@semihalf.com> MIME-Version: 1.0 In-Reply-To: <1540000661-1956-5-git-send-email-mw@semihalf.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [platforms: PATCH 04/12] Marvell/Armada70x0Db: Introduce board description library 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: Tue, 04 Dec 2018 15:27:53 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Oct 20, 2018 at 03:57:33AM +0200, Marcin Wojtas wrote: > This patch implements ArmadaBoarDescLib library for > Armada70x0Db and introduces ArmadaBoardDescGpioGet > routine with per-board I2C IO expander description. Same commit message comment as 3/12. This one actually has I2c, but still - please rename all of the types and variables. (Feel free to add a comment saying the expander is on I2c, but that is not the relevant bit code-wise.) / Leif > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marcin Wojtas > --- > Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc | 3 ++ > Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf | 34 ++++++++++++++++ > Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c | 43 ++++++++++++++++++++ > 3 files changed, 80 insertions(+) > create mode 100644 Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf > create mode 100644 Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c > > diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc b/Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc > index e0bf447..a935f36 100644 > --- a/Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc > +++ b/Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc > @@ -54,6 +54,9 @@ > [Components.AARCH64] > Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db.inf > > +[LibraryClasses.common] > + ArmadaBoardDescLib|Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf > + > ################################################################################ > # > # Pcd Section - list of all EDK II PCD Entries defined by this Platform > diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf > new file mode 100644 > index 0000000..b26f55b > --- /dev/null > +++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.inf > @@ -0,0 +1,34 @@ > +## @file > +# > +# Copyright (C) 2018, Marvell International Ltd. and its affiliates
> +# > +# This program and the accompanying materials are licensed and made available > +# under the terms and conditions of the BSD License which accompanies this > +# distribution. The full text of the license may be found at > +# http://opensource.org/licenses/bsd-license.php > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR > +# IMPLIED. > +# > +# > +## > + > +[Defines] > + INF_VERSION = 0x0001001A > + BASE_NAME = Armada70x0DbBoardDescLib > + FILE_GUID = 3164c8d9-19d4-4ad6-8196-cea094b1ddf1 > + MODULE_TYPE = BASE > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = ArmadaBoardDescLib > + > +[Sources] > + Armada70x0DbBoardDescLib.c > + > +[Packages] > + MdeModulePkg/MdeModulePkg.dec > + MdePkg/MdePkg.dec > + Silicon/Marvell/Marvell.dec > + > +[LibraryClasses] > + DebugLib > + IoLib > diff --git a/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c > new file mode 100644 > index 0000000..51e6687 > --- /dev/null > +++ b/Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c > @@ -0,0 +1,43 @@ > +/** > +* > +* Copyright (C) 2018, Marvell International Ltd. and its affiliates. > +* > +* This program and the accompanying materials are licensed and made available > +* under the terms and conditions of the BSD License which accompanies this > +* distribution. The full text of the license may be found at > +* http://opensource.org/licenses/bsd-license.php > +* > +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. > +* > +**/ > + > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +STATIC MV_I2C_IO_EXPANDER_DESC mI2cIoExpanderDescTemplate = { > + PCA9555_ID, > + 0x21, > + 0x0, > +}; > + > +EFI_STATUS > +EFIAPI > +ArmadaBoardDescGpioGet ( > + IN OUT MV_I2C_IO_EXPANDER_DESC **I2cIoExpanderDesc, > + IN OUT UINTN *I2cIoExpanderCount > + ) > +{ > + *I2cIoExpanderCount = 1; > + *I2cIoExpanderDesc = &mI2cIoExpanderDescTemplate; > + > + return EFI_SUCCESS; > +} > -- > 2.7.4 >