From patchwork Tue Jul 24 07:09:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 142739 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp6941990ljj; Tue, 24 Jul 2018 00:25:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeUdzVChhkRii9OzzV71qIqUBg8BUvGQTQTYqFkCCF9sSgpAG7gXm7khg9kHtKYRfmeuKQm X-Received: by 2002:a63:338e:: with SMTP id z136-v6mr14825955pgz.171.1532417123674; Tue, 24 Jul 2018 00:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532417123; cv=none; d=google.com; s=arc-20160816; b=zGumiqd2yMWNO6/KLK3eCN+5/gEiICv7U9q2wDXLV0NRFG2gM4ApxeimgHhk1Lhp6d q/4vQ8VyAtkBxoVTKRU1xaGYbHYKYrjIBBufXP3EbAycLIbQoEBthYKF8irB3xEwwW1h Ytn1FnZ3RV55qmK2opF596TC29NlKfpBr+DoB9vkNEIff5is1E8FMUWos1dZ3Riwhrmx SUASahFz8YVbCq5E5fEVczpxEVAzE1r2zDsHSDxdXOMwBONalRw9I7WkMtBslZNBpqRZ hnIGiNDpr2npUoF0CBALIxRNSbJp2BKVPLZaGYsNQdsdwgi/6iC5TM3aKOA+FTX0+e2N KNZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=Wlfkzyn4TtUHzpD2l5iZRqASiLGW3lW1STS0KtHY4Q0=; b=eDgy1Ohr7XDOutiv8N1k3kF1GhKjY+XnJaP/1NnZQaypWiE8Vyz6n807vTSjfkH74m BslVQowK83wKBRsco+mfl3CkdXOAmOzx1mVQj4vw5kkPsNt6T7HFM5bfEsm/WfC0oUw7 BEy/M5gpqXGWnla2tso5KwJLJAJoQtrb/qFulSqvnPoQX+ylBdYRpE7nudcjotQaDrzE XlAqDkkuToFt+pMwkTayOllP/TursxBNZvSIfA45sp+/GWcoduORw43rVS1QvjQCiW3J bDcG8uiVn05NzpJZXTnjmNPMW/yDP0n9/Lj0KqCQC4In0BdJeWpoYTsxdLads7LdwycG w+fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZCFq856U; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id j72-v6si10691754pfe.187.2018.07.24.00.25.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 00:25:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZCFq856U; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4A29D210C1B6C; Tue, 24 Jul 2018 00:25:23 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::541; helo=mail-pg1-x541.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (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 0AF0A210C1B64 for ; Tue, 24 Jul 2018 00:25:21 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id p23-v6so2230674pgv.13 for ; Tue, 24 Jul 2018 00:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uFC5Q96qjBEhAq4LWqwVWuD7toLzLy5GpVaE6q9K8oY=; b=ZCFq856Uh3bUV/Vno2hrJH1KnQMojXCQKfsu99ntTnC9PnZTSgDSf0GjnOLxIFVJ1+ iAB531QpV3Kwe297wdqNRnTV6/4ssyGa3K0FX83xSW0ONY/0aQ1un7rFO7sbOKbp9h4/ Lanw3XexKAxHXnCpt0be6C4CwsuMn3sHJ8+sM= 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=uFC5Q96qjBEhAq4LWqwVWuD7toLzLy5GpVaE6q9K8oY=; b=WJWAOtM9eNqjCE1pS+njN1q9pAZmACWYxt1TvUeJVWrkJs+cBWqP99/VQ7AWUUrkBK x/FFBY+T8V/DzbXLN9iGCtvBHCn/7Qh/b5j/SQII6YZhA13dB5s5iRDAR69UQl8zPqh3 nMcm/2RG4JCavfcrTvsd6inSEw93a4sUEvq+AJ5mefEgCQIbciJ/Fpsy2fj+YQ0K0UoC Kip2UEX03OOXVmvMgUbUKzFZv4+JK5qIqwQkLRlTN8WkhsvGvktR/IH9F/1G4AR7Yz57 4aHAlAbwIGT4BSBBXYBucRV0e65aXbifnN0NsmyfYRX04iRlcWh06ZYMdt39ms8Hio4Q qjoQ== X-Gm-Message-State: AOUpUlH4WwuY2g+XEzheZHZd96ju6w45sRyLACz3KneezczVhf74NGd4 +vEIaXX/WC7jlQ+jlSBvScAWqA== X-Received: by 2002:a62:e106:: with SMTP id q6-v6mr16709570pfh.75.1532417121590; Tue, 24 Jul 2018 00:25:21 -0700 (PDT) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id t14-v6sm11449788pgu.0.2018.07.24.00.24.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Jul 2018 00:25:21 -0700 (PDT) From: Ming Huang To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Tue, 24 Jul 2018 15:09:21 +0800 Message-Id: <20180724070922.63362-38-ming.huang@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180724070922.63362-1-ming.huang@linaro.org> References: <20180724070922.63362-1-ming.huang@linaro.org> Subject: [edk2] [PATCH edk2-platforms v1 37/38] Hisilicon/D06: Add PciPlatformLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: huangming23@huawei.com, xinliang.liu@linaro.org, john.garry@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, guoheyi@huawei.com, wanghuiqiang@huawei.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Add a Null PciPlatformLib for build D06. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ming Huang Signed-off-by: Heyi Guo --- Platform/Hisilicon/D06/D06.dsc | 1 + Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c | 69 ++++++++++++++++++++ Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf | 30 +++++++++ 3 files changed, 100 insertions(+) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc index a5640771ad..9a3128048e 100644 --- a/Platform/Hisilicon/D06/D06.dsc +++ b/Platform/Hisilicon/D06/D06.dsc @@ -96,6 +96,7 @@ FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !endif PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf + PciPlatformLib|Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf [LibraryClasses.common.SEC] ArmPlatformLib|Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibSec.inf diff --git a/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c new file mode 100644 index 0000000000..8f14117b09 --- /dev/null +++ b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c @@ -0,0 +1,69 @@ +/** @file +* +* Copyright (c) 2018, Hisilicon Limited. All rights reserved. +* Copyright (c) 2018, Linaro Limited. All rights reserved. +* +* 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 + + +/*++ + +Routine Description: + + Perform Platform initialization first in PciPlatform. + +Arguments: + +Returns: + + VOID. + +--*/ +VOID +EFIAPI +PciInitPlatform ( + VOID + ) +{ + + return; +} + +/*++ + +Routine Description: + + Perform Platform initialization by the phase indicated. + +Arguments: + + HostBridge - The associated PCI host bridge handle. + Phase - The phase of the PCI controller enumeration. + ChipsetPhase - Defines the execution phase of the PCI chipset driver. + +Returns: + +--*/ +VOID +EFIAPI +PhaseNotifyPlatform ( + IN EFI_HANDLE HostBridge, + IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase, + IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase + ) +{ + + return ; +} + diff --git a/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf new file mode 100644 index 0000000000..7648322522 --- /dev/null +++ b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf @@ -0,0 +1,30 @@ +## @file +# PCI Segment Library for Hisilicon Hi1610/Hi1616 SoC with multiple RCs +# +# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2018, Linaro Ltd. All rights reserved.
+# Copyright (c) 2018, Hisilicon Ltd. All rights reserved.
+# +# 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 = Hi1620PciPlatformLib + FILE_GUID = 29ba30da-68bc-46a5-888f-c65dabb67fd8 + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = PciPlatformLib + +[Sources] + Hi1620PciPlatformLib.c + +[Packages] + MdePkg/MdePkg.dec