From patchwork Thu Aug 23 16:07:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 144969 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp316090ljw; Thu, 23 Aug 2018 09:10:54 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx0dkYe5nGmmksfYJvpAwYVFQv5rE5wCX2eL9DfufXQ4R+HQPSNNv57Mv0RKDtG4cogZ6tw X-Received: by 2002:a62:7983:: with SMTP id u125-v6mr63103770pfc.177.1535040654402; Thu, 23 Aug 2018 09:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535040654; cv=none; d=google.com; s=arc-20160816; b=HCMkISWL91UYuDf0tnOycRipjaXWAxZcWSQhrBz+vQny1k7N4i1SLZY0oWfFx5cCtg eXMM+dSIoxp3emE76ED+2bB8pEBxHemjVdnABhoKfEBQpg/fDyuU4uQLsl48Cx9SHEJC Sy/qSlk2Bkp0WM1bb5AhSwKHGS+efNcSUxshOr2mEn6UNAw6Ze/ujzVwPC03tzXaFDpy PFiSupAFdGEztQ/zCiepUoewMZu9qIihlX57l/FshA4XIeEOc2KFcQLaJATqVpjAAQpV jfXbD2dRF5mC30oS00cOJWDkb9pOCbqBJJEIp7ct4htHRpN4wyJE9dd0TnpJMBKHhHPN tlyg== 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=27QA9pQ2esIw1mqXvBOUY31WZRDYKGrf4H+ZeBmGpic=; b=zeRbwOeK1jPugiPKRhp3K8Dsf3+ZWqm5sN24yath2LR3O3jxUEBP5PGOcHPcjfuAxc uFI+Coa3un7wEJmTw15bFWS5bk3LPb/fjPioVYUqAWXrROy/oRxcub+710IyrUusGoiv +Gx1JujcDxcROQ2ot+Ub++PjCIGYaDqkoymxHNkULWQMPQVOypMjLwxGh2gaGAz7TyLm 8SS0h4Cgl/YaW9maOUQ5qkW8OqsJwYgQP6MzHx4oI/lGq3AqhuKPXiPCf1zDdxTHeRrF Y76GHjHrtMMxkvmhsGGxrnUxvkg9GUpAnVLPQ03O0he/QsGfouADrQn57KXQAluymftN c2AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YbLN2fIx; 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 l63-v6si4538637plb.106.2018.08.23.09.10.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 09:10:54 -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=YbLN2fIx; 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 BD28221106C6F; Thu, 23 Aug 2018 09:10:35 -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::544; helo=mail-pg1-x544.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (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 E93DE21106C6E for ; Thu, 23 Aug 2018 09:10:33 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id h17-v6so2832167pgv.3 for ; Thu, 23 Aug 2018 09:10:33 -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=Zcyf/MnRWHWEh8qBjg64t3z3FlY9M6CoA1aNiqX7dUQ=; b=YbLN2fIxBpxZjkDi2nDGzdfOmNqwIh0rIfONW8yzr+qqyw9j4QDhtjBTCH+tTdWZ5y /OGZH17Nve4A+YDptZ7VpOZfLP/AfimIa6rhrSBXLCGldVTDaCISYB7MKfnjjrRErxyx 09VwXwGrGsu1oh4kuJdck5CgaJBmnxLJ2FmOE= 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=Zcyf/MnRWHWEh8qBjg64t3z3FlY9M6CoA1aNiqX7dUQ=; b=EBF9djG3KMriRi4kl3tmefh4PBi9bqbDNVjKiOfE+lqIFmTvGZ5QSrFcZe5Vh6QEm5 1Xd61tlYdOm4T/JKAlktqmWLbVVVfxA6SDFwhzU0aLvrB4McmAApU7iZXbvDPV7JIbMN dwCmBK2Zgg7/b00nNxpSLqy/4wqivQuNT+hk4LJbtRUqQv5d2U01bqp4YdpVp1QbYLHA 3VYnkn096gesBdizmAvz2WFXf89Kn7D3E1dHZ4ORVSHsX3DYcDu4ppl/tLWowfkfuvxE noxdkXE+mPrpQ/hRC+PZxMJR/YhYU+z2WI6hrMKUc2ua20eU5iFI6PCUo+3J1x7eQGGs tB2g== X-Gm-Message-State: AOUpUlHrAwBa4SWCY5pLgJ3D98VgvR605VpbErwMR0av1+mtuk8qnVx3 fXqX2Y4GJNayErKSd/9uI46S9Q== X-Received: by 2002:a17:902:49:: with SMTP id 67-v6mr15322857pla.206.1535040633620; Thu, 23 Aug 2018 09:10:33 -0700 (PDT) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id d19-v6sm5788083pgv.61.2018.08.23.09.10.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Aug 2018 09:10:33 -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: Fri, 24 Aug 2018 00:07:42 +0800 Message-Id: <20180823160743.45638-31-ming.huang@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180823160743.45638-1-ming.huang@linaro.org> References: <20180823160743.45638-1-ming.huang@linaro.org> Subject: [edk2] [PATCH edk2-platforms v4 30/31] Hisilicon/D06: Add PciPlatformLib 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: , Cc: huangming23@huawei.com, xinliang.liu@linaro.org, john.garry@huawei.com, zhangjinsong2@huawei.com, guoheyi@huawei.com, huangdaode@hisilicon.com, michael.d.kinney@intel.com, lersek@redhat.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. The switch generic PciHostBridge patch set add two api for PciPlatform driver, so need to implement the two api for D06. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ming Huang Reviewed-by: Leif Lindholm --- Platform/Hisilicon/D06/D06.dsc | 1 + Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf | 30 +++++++++ Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c | 67 ++++++++++++++++++++ 3 files changed, 98 insertions(+) -- 2.18.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 e6bebfb78b..e828010abf 100644 --- a/Platform/Hisilicon/D06/D06.dsc +++ b/Platform/Hisilicon/D06/D06.dsc @@ -95,6 +95,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.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 diff --git a/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c new file mode 100644 index 0000000000..ff77974c0f --- /dev/null +++ b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c @@ -0,0 +1,67 @@ +/** @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; +} +