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::241; helo=mail-lj1-x241.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (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 BA0CA2117B569 for ; Fri, 19 Oct 2018 18:58:09 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id 63-v6so32383667ljs.4 for ; Fri, 19 Oct 2018 18:58:09 -0700 (PDT) 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=QFUGJL7kWAnQUhvQGBHgJpcANVXxTrey13uEkymbG4Y=; b=qFJ065oi2NCVD4vEEs3SSTJtNNFLlJ/Rx3uLBLxa98MXN38Rc+ijwQqiWWRNNcZiie 230Ardqd4r+JlM7fLayuNXArLMbIJf24Wm8XfCWQUhd4COini+Sd5m0e0TRze7GBsdXH G4TvD7W400Gkf8cHVLv9gVS/oD4o34atx5ANojSTs4K4z8kA1X0LkTTRmkfFFsHfY8qU zTZUt5X78L4ZwPPXDEP0j6aVJxcIUZyUM6+W476IYgSvn0jbQvvbvOi2w4jAGz/ygR4Q p6OVHDBSVm1GODF6Fw1ZYcfMByetDyjnfuif8uFZIBEIMR3ISG7f2VEPOJAaRDRPYFtQ /CXQ== 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=QFUGJL7kWAnQUhvQGBHgJpcANVXxTrey13uEkymbG4Y=; b=I4qQj76cB+klU0Wii66Hx6KLLzLriXq98wZRvjneZEteQhkC3iQNKt1ciyI9fuyzkn qcCkfOH6LNo2ETjUEQO4w9EBjV3e9xUa51ERn6d+flkM0zpi/fTu23NNG2rTLe9Yqoh5 teRtAuQjKYSLZesHzMH9TVwSwfsH2RNtQ+BUg+l4PfI7T6+/yfBUn/0g9kcZ+WOK3sum z7obRRrzPK1Y6roilVMuZ6Lr13QDvBmmWC9hSJUnElRqD8aPOPud3TJp1wLJMVlKVtrS ZgMYx6Mi/nFFaRpIwxd/+e/QkC44YSiMAjUmPpl6DY4lZXE3i9R3cvtSZBAtyCJtN2xL 5mgA== X-Gm-Message-State: ABuFfoiYDNxV0Nb3M6vnbw+GeC5iYrSqjJpYDCfYQRkYQOILGswO8S1u 3Xx7w06Ae6SVkVMIkPkShd7yCP8g1uY= X-Google-Smtp-Source: ACcGV61PE53nRA0MXmWiyGrQR2TV77BkEYWq14bYhjTu2ZfHP8c7pAMpdC7V8XGkLInckfRFgajK3Q== X-Received: by 2002:a2e:7608:: with SMTP id r8-v6mr23511635ljc.175.1540000687367; Fri, 19 Oct 2018 18:58:07 -0700 (PDT) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id p63-v6sm5562777lfg.46.2018.10.19.18.58.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Oct 2018 18:58:06 -0700 (PDT) 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: Sat, 20 Oct 2018 03:57:32 +0200 Message-Id: <1540000661-1956-4-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540000661-1956-1-git-send-email-mw@semihalf.com> References: <1540000661-1956-1-git-send-email-mw@semihalf.com> Subject: [platforms: PATCH 03/12] SolidRun/Armada80x0McBin: 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: Sat, 20 Oct 2018 01:58:10 -0000 This patch implements ArmadaBoarDescLib library for Armada80x0McBin comunity board and introduces ArmadaBoardDescGpioGet routine with per-board I2C IO expander description. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc | 3 ++ Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf | 34 ++++++++++++++++++ Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c | 36 ++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf create mode 100644 Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c diff --git a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc index 52e2b9b..077224d 100644 --- a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc +++ b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc @@ -55,6 +55,9 @@ [Components.AARCH64] Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin.inf +[LibraryClasses.common] + ArmadaBoardDescLib|Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf + ################################################################################ # # Pcd Section - list of all EDK II PCD Entries defined by this Platform diff --git a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.inf new file mode 100644 index 0000000..63a4f66 --- /dev/null +++ b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.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 = ArmadaMcBinBoardDescLib + FILE_GUID = 8208558f-5f33-46e2-b5c5-43354384389e + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = ArmadaBoardDescLib + +[Sources] + Armada80x0McBinBoardDescLib.c + +[Packages] + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Silicon/Marvell/Marvell.dec + +[LibraryClasses] + DebugLib + IoLib diff --git a/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c new file mode 100644 index 0000000..979db11 --- /dev/null +++ b/Platform/SolidRun/Armada80x0McBin/Armada80x0McBinBoardDescLib/Armada80x0McBinBoardDescLib.c @@ -0,0 +1,36 @@ +/** +* +* 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 + +EFI_STATUS +EFIAPI +ArmadaBoardDescGpioGet ( + IN OUT MV_I2C_IO_EXPANDER_DESC **I2cIoExpanderDesc, + IN OUT UINTN *I2cIoExpanderCount + ) +{ + /* No I2C IO expanders on board */ + *I2cIoExpanderDesc = NULL; + *I2cIoExpanderCount = 0; + + return EFI_SUCCESS; +} -- 2.7.4