From patchwork Thu Nov 12 17:53:52 2020 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: 324212 Delivered-To: patch@linaro.org Received: by 2002:a17:906:d156:0:0:0:0 with SMTP id br22csp902365ejb; Thu, 12 Nov 2020 09:54:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyxZl4sGSVfXZzV2rvHzPViptcR7d8B/2jZa0mNVU/uVTOJT6A57LoRrNAG86/SJPModj6 X-Received: by 2002:a17:906:c298:: with SMTP id r24mr486423ejz.76.1605203688345; Thu, 12 Nov 2020 09:54:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605203688; cv=none; d=google.com; s=arc-20160816; b=0S8XoW1SOxdnNg6O9U/J74LzA2RQ/9aIQ9xD84k32VwJwFLFojXdVCBkHpgSFuvhnG rvspyDtzeWb51c5gHyg7x3Bb+o37+zqhGLGsnJME6DlNK4iA7Hw9W/DO0z2N6CJlzUuj 8+kR7bqLHkT7idaiWaYk26Gm/lW6h60lt6TayOevOtOqF/mDh31Q8IKyCUDh9er3g+9d neZaNjHyNUB4pyGxGqqHjJTtziSDL6Q7uTLkOAwZHehLiy98y9w7g5OzoUPLoKoQOrA3 aYPwd4tuU/i9DQVqRLaoT2qqKvcVYWNSDKPUgJLAT9uBUlqwSeWcIvG1FyuYKUEoF1SG xJBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=HA3K100VAjy/WJiVUwI1rftvyIQDtTVShTwH9A10BPc=; b=fADEepXutGwlG2m6dcMQ5WZ2qvAgyBphnymlMb4igrO8V4RPMkI2aPkic06U7A/9bA t+Qd3rSuGCh/bIJQHggSaozc5s9p9iWykEWZxpRQNAnSbCKDbCNBN6y0iXjMzJI4CxoX GF4YGSOfzMfhV4rjc/Qo/XjRJkauyxMsbTEfvd3GefeqlKKhA4TDD0hROTuDKp/JyFw6 suvPwdv8WIafvx6WAQ8GlU8seFXqoR2l7o8N5uLVP/4VxKr7CVODr93SIKxs15FQynaO YYnbQ/Kr+imKRbkmk/ZZJ+ypU/NkezOqb2qkcWIIvF6CxI1CcXI8UZ6SqXl43ecFJ4rh 26Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CZB1+EY7; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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. [23.128.96.18]) by mx.google.com with ESMTP id jr8si4389348ejb.304.2020.11.12.09.54.46; Thu, 12 Nov 2020 09:54:48 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=CZB1+EY7; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S1726321AbgKLRyj (ORCPT + 6 others); Thu, 12 Nov 2020 12:54:39 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:58988 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbgKLRyh (ORCPT ); Thu, 12 Nov 2020 12:54:37 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0ACHs6rF028144; Thu, 12 Nov 2020 11:54:06 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605203646; bh=HA3K100VAjy/WJiVUwI1rftvyIQDtTVShTwH9A10BPc=; h=From:To:CC:Subject:Date; b=CZB1+EY7ZUKGNPw9RnUOGj366lJN4UWQdUiOGSzukNsV1RI0CH/29cTf4TjOv0ZbM rq65kLuL0i224Lp+ZLC45PvM8iPFWwRPenJxHdsMoqHEmnz7+W/1Vh9g6/9FnTVyBh I4msOU26EjwCo0d21l64VNJ0tp9CvD6UilkpSSAw= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0ACHs6ml027624 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Nov 2020 11:54:06 -0600 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 12 Nov 2020 11:54:06 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 12 Nov 2020 11:54:06 -0600 Received: from a0393678-ssd.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0ACHrx9q094087; Thu, 12 Nov 2020 11:54:00 -0600 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Rob Herring , Kishon Vijay Abraham I , Lorenzo Pieralisi , Arnd Bergmann , Tom Joseph , Jingoo Han , Gustavo Pimentel , Marek Vasut , Yoshihiro Shimoda , Shawn Lin , Heiko Stuebner CC: Greg Kroah-Hartman , , , , , , Subject: [PATCH v2 0/6] Add SR-IOV support in PCIe Endpoint Core Date: Thu, 12 Nov 2020 23:23:52 +0530 Message-ID: <20201112175358.2653-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 Precedence: bulk List-ID: X-Mailing-List: devicetree@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 as well. Changes from v1: *) Re-based and Re-worked to latest kernel 5.10.0-rc2+ (now has generic binding for EP) Patch series is created on top of NTB series [2] v1 of the patch series can be found @ [1] [1] -> http://lore.kernel.org/r/20191231113534.30405-1-kishon@ti.com [2] -> http://lore.kernel.org/r/20201111153559.19050-1-kishon@ti.com Kishon Vijay Abraham I (6): dt-bindings: PCI: pci-ep: Add binding to specify virtual function 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 .../devicetree/bindings/pci/pci-ep.yaml | 9 + drivers/misc/pci_endpoint_test.c | 1 + .../pci/controller/cadence/pcie-cadence-ep.c | 251 +++++++++++++++--- drivers/pci/controller/cadence/pcie-cadence.h | 7 + .../pci/controller/dwc/pcie-designware-ep.c | 36 +-- drivers/pci/controller/pcie-rcar-ep.c | 19 +- drivers/pci/controller/pcie-rockchip-ep.c | 18 +- drivers/pci/endpoint/functions/pci-epf-ntb.c | 83 +++--- drivers/pci/endpoint/functions/pci-epf-test.c | 66 +++-- drivers/pci/endpoint/pci-ep-cfs.c | 24 ++ drivers/pci/endpoint/pci-epc-core.c | 166 +++++++++--- drivers/pci/endpoint/pci-epf-core.c | 144 +++++++++- include/linux/pci-epc.h | 57 ++-- include/linux/pci-epf.h | 16 +- 14 files changed, 693 insertions(+), 204 deletions(-) -- 2.17.1