From patchwork Wed Mar 21 01:03:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 132153 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1538923ljb; Tue, 20 Mar 2018 18:03:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELt+d9HwXnLZdWiPx52cZ/+2CVa7WACcDOvimz90JVPU1qz9f42djCR3GBFgkgk4Vqm4K+P2 X-Received: by 2002:a17:902:aa02:: with SMTP id be2-v6mr18750268plb.86.1521594237522; Tue, 20 Mar 2018 18:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521594237; cv=none; d=google.com; s=arc-20160816; b=nb1haknUAVQOk77uQKbfP0NiMQ0WV3gmGr8nZmSdluAGmkGWadD22IIZLDxsZzXvvB irfrrwZ2QewadB2ouZewZdqAYxEh/l584uBZtOyVTUD5ulpK6KDYzLMXVo916CwaQ4FL TXmTv6HYMmMzuWsJMrpW++BvjJOAZFXckwxPrg3SlxkhvalxS3AHBIM4Mq/6S4ksKUNG 0ZVlU/u+g7oaIFFBKmsyBkB63GeqKwOn79OYCYN1SHZxDPIQtNpS9fhxKKSuYpXUkNf5 sQ2OnKQAfme6ac6GNb84zGWxiSKVo+2rreleZDt7dH7W3Yp9SD+JuSYePYzyES8aKJWU uHzg== 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:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=HldrkbH2bMh1hs6eyZMt3rY5bghbmBMXyPO6xawog3k=; b=Q/2EZElC9/YpIb/hApJ3yzlFLsatZmjlvM8hEbf39ZYb/gvkVTUBtsxd8JB3/CR1R6 9wqlpfVv9rwlBQ00kPwueukDvVJNQBVC6bicof4WSmaN4slHoIZpKYcd+0DH28i18ayN ggbqgm/4bk7olBL93gGFvVvaQXpFj5mLFLjNgj+XiF9KI9bSjfT/ZxxLRS+MzGO+igxk B4C5CxicFR3lmJa/VbeeIz2NENFrq1EWc82FgF1wO/XMZJsucu7LqivsvP/mUUuKo4Fa OZnZM/Lx5wsjKG8bsIKxtkiYV+Oe2TvSAJy8Ue3nX8EuhM2xjDgxpTvl4kwfp2MGWjMl i4KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UjqMuhWe; 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 s4-v6si2552587plj.458.2018.03.20.18.03.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 18:03:57 -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=UjqMuhWe; 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 5B8EE22571B59; Tue, 20 Mar 2018 17:57:26 -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:c05::242; helo=mail-pg0-x242.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (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 A5E23224BBC5E for ; Tue, 20 Mar 2018 17:57:25 -0700 (PDT) Received: by mail-pg0-x242.google.com with SMTP id s13so1340348pgn.12 for ; Tue, 20 Mar 2018 18:03:55 -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; bh=hwJoVDVYwkdaocm/YzWKmBcWfsOcw/EiOv8Qpdmlhr8=; b=UjqMuhWexU5/va+t4hj6+ikmx8C/0AxForQzcgqmnheHi4us6i4kQ3o9J3D1rKHHSF 8jLLut/C6bmNWDmIz+iQNoui2GOzk/GcpIKIn+Hn/enS2W1vd1XSl6o4n7QZCHaEm5fW t4vOFyUgbnPLr1VfxhRpI8DA+16XnyMEcc9sU= 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; bh=hwJoVDVYwkdaocm/YzWKmBcWfsOcw/EiOv8Qpdmlhr8=; b=j09pc2+sTW6ifVgjHNeAGTm8uoz6gN6cY46etS7ayBpMaQz9TAfjuuvUBmMdr+Byxu x3k481TuxR73xF8WNHyrdL4KCfpHPOjNbtNrkyIN0UbTf/92EVc0+AxVDa0SbUwrIa5N EueUVqtw1NgrkrR/4BQH0wfUCZ3b3/U6S1yFU8Y7H/SqS/43hXT72eeVSeBOPP7SYAna dQZn1R2t4ECKxh8jq0zQCl3T/QEZvd9+SmFX35iUcqN4ZXQMqdeafWU0Yr5xvijLd8fU AcQzimfe4X0WHav5MPkWBog6q31RrPUPMNs4zUAHpT20bIqxCYz/+iYyRrOLynccBwLY HU1Q== X-Gm-Message-State: AElRT7EoNJhfwlt8HuWj47+HXvVo87isB8KbIwJzH9oOZmQGfwUvAwPI 5nPSB/sO8R6JS3Xu349UqP4o9Npp/14= X-Received: by 10.98.74.143 with SMTP id c15mr15329607pfj.83.1521594235308; Tue, 20 Mar 2018 18:03:55 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.100]) by smtp.gmail.com with ESMTPSA id 184sm5702491pfg.124.2018.03.20.18.03.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Mar 2018 18:03:54 -0700 (PDT) From: Heyi Guo To: edk2-devel@lists.01.org Date: Wed, 21 Mar 2018 09:03:06 +0800 Message-Id: <1521594198-52523-1-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [PATCH edk2-platforms 00/12] Hisilicon/D0x: Switch to generic PciHostBridge X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Heyi Guo , Haojian Zhuang , Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" For BAR address translation support was added to edk2 generic PciHostBridge by commit 74d0a33, now we can also use it for D03/D05 platforms. This series of patches include 3 parts of change: - Preparation for the switch, moving platform specific code out of PciHostBridge driver. - Add depending libraries and protocol implementations, like PciHostBridgeLib, PciSegmentLib and CpuIo2 Protocol. - Other enhancement and refinement. Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Michael D Kinney Cc: Haojian Zhuang Heyi Guo (12): Hisilicon: Enable WARN and INFO debug message Hisilicon/D05/PlatformPciLib: fix misuse of macro Hisilicon/Pci: move ATU configuration to PcieInitDxe Hisilicon/Pci: Merge PciPlatform into PcieInit Driver Hisilicon/Pci: Move EnlargeAtuConfig0() to PcieInitDxe Hisilicon/PlatformPciLib: add segment for each root bridge Hisilicon: add PciHostBridgeLib Hisilicon: add PciCpuIo2Dxe Hisilicon: add PciSegmentLib for Hi161x Hisilicon/D0x: Switch to generic PciHostBridge driver Hisilicon: remove platform specific PciHostBridge Hisilicon/PlatformPciLib: clear redundant felds in RESOURCE_APPETURE Silicon/Hisilicon/Hisilicon.dsc.inc | 8 +- Platform/Hisilicon/D03/D03.dsc | 7 +- Platform/Hisilicon/D05/D05.dsc | 7 +- Platform/Hisilicon/D03/D03.fdf | 4 +- Platform/Hisilicon/D05/D05.fdf | 4 +- Platform/Hisilicon/D03/Drivers/PciPlatform/PciPlatform.inf | 53 - Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 51 + Silicon/Hisilicon/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf | 48 + Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf | 74 - Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitDxe.inf | 9 +- Silicon/Hisilicon/Hi1610/Library/Hi161xPciSegmentLib/Hi161xPciSegmentLib.inf | 36 + Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridge.h | 528 ----- {Platform/Hisilicon/D03/Drivers/PciPlatform => Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610}/PciPlatform.h | 0 Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitLib.h | 13 + Silicon/Hisilicon/Include/Library/PlatformPciLib.h | 3 +- Platform/Hisilicon/D03/Library/PlatformPciLib/PlatformPciLib.c | 24 +- Platform/Hisilicon/D05/Library/PlatformPciLib/PlatformPciLib.c | 66 +- Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c | 304 +++ Silicon/Hisilicon/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c | 557 +++++ Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridge.c | 1659 -------------- Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciRootBridgeIo.c | 2404 -------------------- {Platform/Hisilicon/D03/Drivers/PciPlatform => Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610}/PciPlatform.c | 12 + Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInit.c | 7 +- Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitAtu.c | 309 +++ Silicon/Hisilicon/Hi1610/Library/Hi161xPciSegmentLib/PciSegmentLib.c | 1503 ++++++++++++ 25 files changed, 2897 insertions(+), 4793 deletions(-) delete mode 100644 Platform/Hisilicon/D03/Drivers/PciPlatform/PciPlatform.inf create mode 100644 Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.inf create mode 100644 Silicon/Hisilicon/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf delete mode 100644 Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridgeDxe.inf create mode 100644 Silicon/Hisilicon/Hi1610/Library/Hi161xPciSegmentLib/Hi161xPciSegmentLib.inf delete mode 100644 Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridge.h rename {Platform/Hisilicon/D03/Drivers/PciPlatform => Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610}/PciPlatform.h (100%) create mode 100644 Platform/Hisilicon/Library/PciHostBridgeLib/PciHostBridgeLib.c create mode 100644 Silicon/Hisilicon/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c delete mode 100644 Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciHostBridge.c delete mode 100644 Silicon/Hisilicon/Drivers/PciHostBridgeDxe/PciRootBridgeIo.c rename {Platform/Hisilicon/D03/Drivers/PciPlatform => Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610}/PciPlatform.c (93%) create mode 100644 Silicon/Hisilicon/Hi1610/Drivers/PcieInit1610/PcieInitAtu.c create mode 100644 Silicon/Hisilicon/Hi1610/Library/Hi161xPciSegmentLib/PciSegmentLib.c -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Signed-off-by: Heyi Guo