Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1055655ybl; Fri, 10 Jan 2020 11:16:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxB4fEK4b/7N3hAl9h4KjEQlF5SeqFcalmmOsmCL39Frx0qpA0cVkY3qVw+xqcIJnYtm8GW X-Received: by 2002:a9d:67c1:: with SMTP id c1mr4021850otn.161.1578683775064; Fri, 10 Jan 2020 11:16:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578683775; cv=none; d=google.com; s=arc-20160816; b=bXDvWzokNBLqC5wzoa0TNFYA6b0wr7L7ul35D96zXuliZ+bEjoLu3cY37ILK7FYHNw BR73hyJ0Bo/JMVJdQnTyCpzoJ6EWqx/IQrOhTX4OSz2fW97pMQELFGxV6xxgfMAFuEYz S+eAHxEGReYqXntffcEu5GjZyM3FyGUhQOUETc/1L5luGHt7fvXWEWhRvfyj1YUiaKQT 2MnF/x8Dp9PplTkeAgZhv815oxbqxjo20NdSrClNjn2lo05c065WU/qar8RRJBW0s6En wyj1LPjgKTkDplCzdRI9KTr+2APx7pAZ1Gnm+HIf44PNUqn8lt23mTjh4h1WW3iLezIy 3tZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=ijKK/DiU1QbdSZI//ZXmG99ZEoUzM/+Rr+0S/t1xBHU=; b=B3JfZqV2aRpnP5cpsuNLF96hpf86AK6oUbnmvqXFNUXkRhS9JfidQQsdXuK1XgIDlW Xr134FM5qtldG6xkncFc7TbSNS59OnX7HxxRYCN+Av+2yVHvafkaiUx25EYxjHlrYrbY aejI2x4yLOQpO7Cda22Oi4bBShi3MwmEiVQ3TKVsJDFCl2VPGsuK4Ztcx58qXkTnZqBF GheJkRAtPUD+mswsnn8vIlALImtFSMeUIFAuHU3FTYF0bqCBZnc1ES1rIMmpesMWS4Aa r2vp9Yt91+y6xxmPnXsJXBRxOhpe5aV51Du5XgjMWVU8L3T7YkBkleOWCFI6VIlPuBX9 bhqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=a9XjmD7v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j143si1578095oib.16.2020.01.10.11.16.03; Fri, 10 Jan 2020 11:16:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=a9XjmD7v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728019AbgAJTPJ (ORCPT + 99 others); Fri, 10 Jan 2020 14:15:09 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:1659 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727612AbgAJTPJ (ORCPT ); Fri, 10 Jan 2020 14:15:09 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 10 Jan 2020 11:14:50 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 10 Jan 2020 11:15:08 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 10 Jan 2020 11:15:08 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 10 Jan 2020 19:15:08 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 10 Jan 2020 19:15:08 +0000 Received: from vidyas-desktop.nvidia.com (Not Verified[10.24.37.48]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 10 Jan 2020 11:15:07 -0800 From: Vidya Sagar To: , , , , , , CC: , , , , , , , Subject: [PATCH V3 0/2] PCI: Add MCFG quirks for Tegra194 host controllers Date: Sat, 11 Jan 2020 00:44:58 +0530 Message-ID: <20200110191500.9538-1-vidyas@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200106082709.14370-1-vidyas@nvidia.com> References: <20200106082709.14370-1-vidyas@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1578683690; bh=ijKK/DiU1QbdSZI//ZXmG99ZEoUzM/+Rr+0S/t1xBHU=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=a9XjmD7vpFdKxUPscAV1tPEV+9JDgitMBH9OKMH3NETpDRHbK+JlZwqHKIIF0xJbU fnabinmenQjQjf3Ys7EUXue4hATK3hFof/wbfZLzOANr1C1tgFL+/koGp5KN/R2tsL tVjga8Jup/uU+FKx2yDW8LDrEaok3SzUrvNJwrrG7+I9XPio4uCLDJxtO0DsggFXgB Duwa7xXH35P0ijXtfSmM5zXbSUZnsk6G9wdpXEGBVE01ERa2jJfEzslXr5hm8/SphO NNQCkL2IJ5jaCzoae1BPlC7y1S9eg1hhyJOGwlhXzvLsr1WLFd/baB0oqx+uU7QiE/ eUZf3Bk+HSeVg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The PCIe controller in Tegra194 SoC is not completely ECAM-compliant. With the current hardware design limitations in place, ECAM can be enabled only for one controller (C5 controller to be precise) with bus numbers starting from 160 instead of 0. A different approach is taken to avoid this abnormal way of enabling ECAM for just one controller but to enable configuration space access for all the other controllers. In this approach, ops are added through MCFG quirk mechanism which access the configuration spaces by dynamically programming iATU (internal AddressTranslation Unit) to generate respective configuration accesses just like the way it is done in DesignWare core sub-system. To increase the size of ECAM, a device-tree change is pushed in this series to move the IO window from 32-bit PCIe aperture to 64-bit PCIe aperture leaving the entire 32MB of 32-bit aperture for configuration space access. V3: * Pushed a device-tree change in the series to enable more space for ECAM Vidya Sagar (2): arm64: tegra: Re-order PCIe aperture mappings to support ACPI boot PCI: Add MCFG quirks for Tegra194 host controllers arch/arm64/boot/dts/nvidia/tegra194.dtsi | 36 ++++---- drivers/acpi/pci_mcfg.c | 7 ++ drivers/pci/controller/dwc/Kconfig | 3 +- drivers/pci/controller/dwc/Makefile | 2 +- drivers/pci/controller/dwc/pcie-tegra194.c | 102 +++++++++++++++++++++ include/linux/pci-ecam.h | 1 + 6 files changed, 131 insertions(+), 20 deletions(-) -- 2.17.1