public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Marcin Wojtas <mw@semihalf.com>
Cc: edk2-devel@lists.01.org, ard.biesheuvel@linaro.org,
	nadavh@marvell.com, jsd@semihalf.com, jaz@semihalf.com,
	kostap@marvell.com
Subject: Re: [platforms: PATCH 04/12] Marvell/Armada70x0Db: Introduce board description library
Date: Tue, 4 Dec 2018 15:27:48 +0000	[thread overview]
Message-ID: <20181204152748.hxug6syd7p4j2uti@bivouac.eciton.net> (raw)
In-Reply-To: <1540000661-1956-5-git-send-email-mw@semihalf.com>

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 <mw@semihalf.com>
> ---
>  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<BR>
> +#
> +#  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 <Uefi.h>
> +
> +#include <Library/ArmadaBoardDescLib.h>
> +#include <Library/BaseMemoryLib.h>
> +#include <Library/DebugLib.h>
> +#include <Library/IoLib.h>
> +#include <Library/MemoryAllocationLib.h>
> +#include <Library/UefiBootServicesTableLib.h>
> +
> +#include <Protocol/MvGpio.h>
> +
> +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
> 


  reply	other threads:[~2018-12-04 15:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-20  1:57 [platforms: PATCH 00/12] Armada7k8k GPIO support Marcin Wojtas
2018-10-20  1:57 ` [platforms: PATCH 01/12] Marvell/Library: ArmadaSoCDescLib: Add GPIO information Marcin Wojtas
2018-11-14  1:10   ` Leif Lindholm
2018-11-14  6:05     ` Marcin Wojtas
2018-11-14 17:33       ` Leif Lindholm
2018-11-21  1:26         ` Marcin Wojtas
2018-11-26 14:49           ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 02/12] Marvell/Library: ArmadaBoardDescLib: " Marcin Wojtas
2018-11-14  1:12   ` Leif Lindholm
2018-11-14  6:16     ` Marcin Wojtas
2018-11-14 17:29       ` Leif Lindholm
2018-12-04 15:18     ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 03/12] SolidRun/Armada80x0McBin: Introduce board description library Marcin Wojtas
2018-12-04 15:23   ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 04/12] Marvell/Armada70x0Db: " Marcin Wojtas
2018-12-04 15:27   ` Leif Lindholm [this message]
2018-10-20  1:57 ` [platforms: PATCH 05/12] Marvell/Armada80x0Db: " Marcin Wojtas
2018-12-04 15:31   ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 06/12] Marvell/Drivers: MvBoardDesc: Extend protocol with GPIO support Marcin Wojtas
2018-12-04 15:42   ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 07/12] Marvell/Protocol: Introduce MARVELL_GPIO_PROTOCOL Marcin Wojtas
2018-12-04 16:00   ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 08/12] Marvell/Drivers: MvGpioDxe: Introduce platform GPIO driver Marcin Wojtas
2018-12-04 16:37   ` Leif Lindholm
2018-12-04 16:40     ` Ard Biesheuvel
2018-12-04 17:19       ` Leif Lindholm
2018-12-04 17:20         ` Ard Biesheuvel
2018-10-20  1:57 ` [platforms: PATCH 09/12] Marvell/Drivers: I2c: Use common header for macros Marcin Wojtas
2018-12-04 16:38   ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 10/12] Marvell/Drivers: MvPca95xxDxe: Introduce I2C GPIO driver Marcin Wojtas
2018-12-04 17:02   ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 11/12] Marvell/Armada7k8k: Enable GPIO drivers compilation Marcin Wojtas
2018-12-04 17:06   ` Leif Lindholm
2018-10-20  1:57 ` [platforms: PATCH 12/12] Marvell/Armada7k8k: Introduce NonDiscoverable device init routines Marcin Wojtas
2018-12-04 17:16   ` Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181204152748.hxug6syd7p4j2uti@bivouac.eciton.net \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox