From patchwork Thu Aug 16 12:12:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 144384 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2002009ljj; Thu, 16 Aug 2018 05:15:41 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwIohdygLVQV4BVu1YbrPEa3sQy0TIUaBKml0hq8mp133U4J5QZsUlseAU+cM3ZRGKQszqY X-Received: by 2002:a17:902:ba88:: with SMTP id k8-v6mr28731114pls.259.1534421741147; Thu, 16 Aug 2018 05:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534421741; cv=none; d=google.com; s=arc-20160816; b=Kh96El558RKHq202xWzGcaHC6p2Momy+L7/WGWPjoSsNv1PLB3NjdNg2dh/3QXhYOJ qvL+IqT9ZhjJR3OM22cq70xJU1IpIkPJs1uwR+HcYah2zFniOGKREb6ZWdeVczKVyE7O Ao9f2IX7ad6/Z3N6YcZIgXxUuSOG9xK3xXWUAMmrfRljdgEqBe57jkIDBrL/d/wLJQRX ZsBr9ib4HJKFqNMEkdsJX9LWpbIJL7vqOw/jXo1IErGl6NjVPHAnteWVWIjiq90nTSaa KlH4weFjaRnReOg+F5hxt4Xg/x2FpxA7QBQjT6ycePiqUrwtH9GgUZel4Fb8AXElfo60 Ir9w== 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=k/XzL7GGBQk7XfloH4ydXNFrrCZFdgJ59/r2cXeZTqI=; b=S1zsT4uFSxZPPFOuE7qVcSkWRKWaRh/DzyHw/JwGX6DGuI257Zb6Oj9X0x4CmsEYns 62jzTTEcNlvBJZtosNpPaH6OH3qQ0g0YjNtTenY0ZVDRtBF2nr6/PCGnzYk+vrOd1z+U B296cTzTydmo15PlbFjlm4/WE2ANtA2eTF0SKgK4F8bw4mDsXz4rQ1pJMD838OdxQiIG BmtRJ5gwabwJ+Y28OgUgFCjHqQmr04YJtXvljTRA7BBJNt/JFc8kwSwuM9XqDOnAZ6PJ Adgg8dpUGzart+mM70z+sUFfkRR53xfYxjnHXJhGWUV9cHCgHmVy2wvgTT4O9m4HLBOw EHIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WOQPE6F8; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 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. [198.145.21.10]) by mx.google.com with ESMTPS id i3-v6si21525150pld.454.2018.08.16.05.15.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 05:15:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WOQPE6F8; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 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 73895210F41D0; Thu, 16 Aug 2018 05:15:02 -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:400e:c01::241; helo=mail-pl0-x241.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl0-x241.google.com (mail-pl0-x241.google.com [IPv6:2607:f8b0:400e:c01::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 AF5EE210F41C4 for ; Thu, 16 Aug 2018 05:15:00 -0700 (PDT) Received: by mail-pl0-x241.google.com with SMTP id j8-v6so2006408pll.12 for ; Thu, 16 Aug 2018 05:15:00 -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=Mm+VVTC+6A/7GJ0YXugiu9UtarvRFOqe1sPM1fU+3bQ=; b=WOQPE6F8Mc3DAhZU+3EAPw/EzFEYdeatVbfX6ge/pp9bmkFbZcK6elodKvKwmrrjnX eKk0gh6+yWMWt9prE9As48ywa4EY4+uKLiB1anHHutVnbnp5WGtCHQB2w3skTMujCMDH hJMu7JyKonpaBjnaaRIUA4hFqzPlD6Ie43qmw= 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=Mm+VVTC+6A/7GJ0YXugiu9UtarvRFOqe1sPM1fU+3bQ=; b=ktqdeaNhgBKuiCZorVhityyGYt70MD+jDJkoEcR5Tai1cX/+Atd/20VkA11dllL5Zh CBE1w16d0dDGQ05saFwzEkTXyfEhdxOH0I/M+kBE/WUUXmDbupuZxX68gmz7CyQMgvTb ZeAxEptzq6O0cwQixvpVm/JXbLbPb46h6M//4xR9Ic9twGNmGd/c4AYan/XaxjipLGYs FBTZm2vcODty7V/KEoHWchtd7ICofq7kEF6zBArVRIe6ZjzrYBtT7g0m64raAuj+b+y1 /m50of7EiVKKNS4LahFsh1udY6ZSoFN9H5ieKQsWzgiu93yzVJi+3OmlByjeuLaoI4wi yQjA== X-Gm-Message-State: AOUpUlGpcH53yZCnqDCAjT2j+vzVMd8zeMFvexBjNpodVxQsZgs8Kn0h jSd6hDU3RY+HVoEnGRZIyBmChQ== X-Received: by 2002:a17:902:528a:: with SMTP id a10-v6mr28991309pli.199.1534421700310; Thu, 16 Aug 2018 05:15:00 -0700 (PDT) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id j27-v6sm46736311pfj.91.2018.08.16.05.14.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 16 Aug 2018 05:14:59 -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: Thu, 16 Aug 2018 20:12:37 +0800 Message-Id: <20180816121239.44129-35-ming.huang@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180816121239.44129-1-ming.huang@linaro.org> References: <20180816121239.44129-1-ming.huang@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 34/36] 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, 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 --- 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.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 fad6fcc747..053ea894d5 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; +} +