From patchwork Tue Dec 31 11:35:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 182672 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp7470986ild; Tue, 31 Dec 2019 03:34:09 -0800 (PST) X-Google-Smtp-Source: APXvYqy7LZ8r7RGHaMGp6pIm1K1+oSZgfm49ugVfkRrC9Gun8DI8Dw7bk1UVQRXuX0HXjZN+Xblp X-Received: by 2002:a05:6830:121a:: with SMTP id r26mr72769961otp.225.1577792049542; Tue, 31 Dec 2019 03:34:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577792049; cv=none; d=google.com; s=arc-20160816; b=Yc3A+vlI+6+gMn2Wd0ZyV1O48IVuxkC4Y9wQu6L4oZNeZyWSRzg7fka8vPGC2Xc4zC MKA41ZwVSPQ3J1God91SYSwQLq+KMDWwhlegYZQudBP97X63NZBLnTNXarayannULAt5 9zdRFNzvyW1llJByv4ZyeyD0ZuM22APA8Wg91W6iZWcjkBe88FA9vHLUPUfPYHIIR5dL UX8l4MSZwu5p+yhYmtma3d+n6Z95c+ecu7duccu7xrwWuB0lv94e1c9o+bxEvXQN/724 IqRjDpfRz+oWPqTClYn3x7mIyTjmFkffMPli3kLzd43jHQKYUyEBkEqs35zZd4AztAhl nKuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=Pajx8yxPYy9hpNMBr5wGSpnGBlMhhMxaOBX8Gt0CXWc=; b=yBwFZysKpaFQ6e8CRTOwSrTv5ybR9hQ/Eqw3b7TnVhURSWG4pYOf0FJNQbIfPV/5hW xOzdyaPByDBzjq8chqJJlkrL/kSiSFuL2FAY4BEyL5/bTBqi1iSZhPsUhcGvR6ywSoZ2 DF6IfvLh46ZXtm34c4bTwzFJJDZRu6D3g8iKWAsxT3S7cttpDyXLFCjK4Av3Kd5hwAE0 Boc6i2mcb0rrzaQ6OxQmQo1b5qkNKfO6JkXjOm8pwJZDrMAliCLGQIhoWeRqCxc+UVj1 LpmjEI4oc8D3nBTjCuKd4v8J9Whz7kSwd2esE3gUPerVeqblwrAF5Cd40TK3GexNgB9+ 4AvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=xpYlx9RH; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si5530313oth.104.2019.12.31.03.34.09; Tue, 31 Dec 2019 03:34:09 -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=@ti.com header.s=ti-com-17Q1 header.b=xpYlx9RH; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727106AbfLaLeI (ORCPT + 27 others); Tue, 31 Dec 2019 06:34:08 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:33404 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726334AbfLaLeH (ORCPT ); Tue, 31 Dec 2019 06:34:07 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBVBXdPS121093; Tue, 31 Dec 2019 05:33:39 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1577792019; bh=Pajx8yxPYy9hpNMBr5wGSpnGBlMhhMxaOBX8Gt0CXWc=; h=From:To:CC:Subject:Date; b=xpYlx9RH8ZH2mpS8/0vaGZcJSzosrfpZvtfmjD+XskBPHD7wRj7lmrQdKnAWcps01 XgIP7Jx1gW8KBXspH1MtP0jXF0Q77WwGlKCgrA48SkReVbeZJcBVVk2QFkuuCJCIPA Xe+tPtDK3uDAHChnP0yA5QxGTW6jrGSnfDLfS2NA= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBVBXd3M090029 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 31 Dec 2019 05:33:39 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 31 Dec 2019 05:33:39 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 31 Dec 2019 05:33:39 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBVBXX31024759; Tue, 31 Dec 2019 05:33:34 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Bjorn Helgaas , Andrew Murray , Tom Joseph , Rob Herring , Arnd Bergmann , Jingoo Han , Gustavo Pimentel , Shawn Lin , Heiko Stuebner CC: , , Jonathan Corbet , Greg Kroah-Hartman , , , , Subject: [PATCH 0/7] Add SR-IOV support in PCIe Endpoint Core Date: Tue, 31 Dec 2019 17:05:27 +0530 Message-ID: <20191231113534.30405-1-kishon@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Patch series *) Adds support to add virtual functions to enable endpoint controller which supports SR-IOV capability *) Add support in Cadence endpoint driver to configure virtual functions *) Enable pci_endpoint_test driver to create pci_device for virtual functions Here both physical functions and virtual functions use the same pci_endpoint_test driver and existing pcitest utility can be used to test virtual functions also. This series is created on top of [1], [2], [3] & [4] [1] -> http://lore.kernel.org/r/20191209092147.22901-1-kishon@ti.com [2] -> http://lore.kernel.org/r/20191211124608.887-1-kishon@ti.com [3] -> http://lore.kernel.org/r/20191230123315.31037-1-kishon@ti.com [4] -> http://lore.kernel.org/r/20191231100331.6316-1-kishon@ti.com Kishon Vijay Abraham I (7): Documentation: PCI: endpoint/pci-endpoint-cfs: Guide to use SR-IOV dt-bindings: PCI: cadence: Add binding to specify max virtual functions PCI: endpoint: Add support to add virtual function in endpoint core PCI: endpoint: Add support to link a physical function to a virtual function PCI: endpoint: Add virtual function number in pci_epc ops PCI: cadence: Add support to configure virtual functions misc: pci_endpoint_test: Populate sriov_configure ops to configure SR-IOV device .../PCI/endpoint/pci-endpoint-cfs.rst | 12 +- .../bindings/pci/cdns,cdns-pcie-ep.txt | 2 + .../bindings/pci/ti,j721e-pci-ep.yaml | 8 + drivers/misc/pci_endpoint_test.c | 1 + .../pci/controller/cadence/pcie-cadence-ep.c | 232 +++++++++++++++--- drivers/pci/controller/cadence/pcie-cadence.h | 7 + .../pci/controller/dwc/pcie-designware-ep.c | 36 +-- drivers/pci/controller/pcie-rockchip-ep.c | 18 +- drivers/pci/endpoint/functions/pci-epf-test.c | 64 ++--- drivers/pci/endpoint/pci-ep-cfs.c | 24 ++ drivers/pci/endpoint/pci-epc-core.c | 126 +++++++--- drivers/pci/endpoint/pci-epf-core.c | 92 ++++++- include/linux/pci-epc.h | 53 ++-- include/linux/pci-epf.h | 16 +- 14 files changed, 541 insertions(+), 150 deletions(-) -- 2.17.1