From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::442; helo=mail-wr1-x442.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 00860210FC0D7 for ; Wed, 22 Aug 2018 09:12:14 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id v16-v6so2061187wro.11 for ; Wed, 22 Aug 2018 09:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ce2YfaNG8TlexamBeQtYNS3lyC3gdeZf6w9dEhi5QJI=; b=CZB4kLzCQ1Xov9ieEr9PpyBIraUubU6B51AH4io85MTe5rK2Kvia2JVcG5pIuukB96 FtXrrNZoVtAS0ehD1ZsN1Kw3MqyAEfHVk7VizpryOZEJ9fzFE2Dy30PuwqXq2E5uKlpV vXPPZ/oor6BXqFFF5dOHk9979HV0Iv6TjGre8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ce2YfaNG8TlexamBeQtYNS3lyC3gdeZf6w9dEhi5QJI=; b=dauQ3JucB1LR1AidhUJII0YlxisXdf+dDs7JLbOCpttt1HoUpSuyCTumK7YWgGwi2D YW7EYt46zPRvSVsYwA6pCe6sdnNxExyqNsSztuPa0+MJRqvWac7/n1defBdOhoM/NaBy pkp8MKCYoeaA9/1OBGeR6feuRCcGo9GiX9eZ0Pn6MmBJ55MDlrE3dHvMJeOIJ1y2cTih ZT84nGFZzXdVL9VPnkfgNeJAgGmfOHx6LMXTTk+XcENs9p/c13pKH1hFhLc1vs2EaJep iZJIZxd4BQmzS1eSW4yf3/ROoPLXW76CXUUJnKsCnNnOLoIiLhsT1neOuSCBpKYMxdH+ DCvA== X-Gm-Message-State: APzg51CLADx0Ay6RZ1mmL9bW1TjLN9j70QewLnV2nrkkaLzUY25w4Rdn XJvNRrHZdWAnSDr2yE3n/71HRvsMqb0= X-Google-Smtp-Source: ANB0VdYyL+7+elXMP/ATMzzOsoe3W0c1hcns9QdoZaJEBIjADt98EcGMEQFRfWABaKcJOCwk8CftsQ== X-Received: by 2002:a5d:674d:: with SMTP id l13-v6mr304925wrw.197.1534954333477; Wed, 22 Aug 2018 09:12:13 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id v16-v6sm2045408wrw.12.2018.08.22.09.12.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Aug 2018 09:12:12 -0700 (PDT) Date: Wed, 22 Aug 2018 17:12:10 +0100 From: Leif Lindholm To: Ming Huang Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, michael.d.kinney@intel.com, lersek@redhat.com, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org Message-ID: <20180822161210.zvxorrmbrl7debvd@bivouac.eciton.net> References: <20180814080903.50466-1-ming.huang@linaro.org> <20180814080903.50466-42-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180814080903.50466-42-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v2 41/43] 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: , X-List-Received-Date: Wed, 22 Aug 2018 16:12:15 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Aug 14, 2018 at 04:09:01PM +0800, Ming Huang wrote: > 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(+) > > 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; > +} > + > -- > 2.17.0 >