From patchwork Fri Aug 18 14:57:52 2017 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: 110397 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp934958obb; Fri, 18 Aug 2017 07:58:38 -0700 (PDT) X-Received: by 10.98.81.1 with SMTP id f1mr8918281pfb.94.1503068318294; Fri, 18 Aug 2017 07:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503068318; cv=none; d=google.com; s=arc-20160816; b=jibJDDUS5+JD/VPmMFD9Fa+OUB94GjwfJlwiJeOmnCN2L0vssN2CXdCZBsBT76yynX 2DEMc+0+epgNQ/C+5Zy33tJQXh7qk8s7KfGArTI5PjLCBv1dbriaSDjSXv/iDb577fGG kGHEuv/nLPKo7s1b9XjiIqMowkxUEFIUMyQ+RgekF4t9i7JpF7BbKKn7jCfbOjx1auto so2HzgMFmR2q+kcXeD2v6wjBhh0BMSQcQhlY4pATdahZbbwmNLV4Ia9t9FpCWdx7WxeS SN51fdY6NvOzHR0jYowWDBm8NNyfY5LCdqlFtFL3IXXcoslXnOHUpAB2E2yB7ntyZEH6 QJfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=HW9Fm4CjFY+c9Fe4xpz89vrUm6pqFI4M5qTDlM29C50=; b=Z6ONc2k+ZhfdP7CKHjugK3ULR2jBXwfGgEFfyZqj2rp5BrmtrCH1gttwsU9NdDPAtI jnYOfeDLiu1vXK+uUEpCLarWAIZfvX+ivkz4cgTuEVHC7C2soiUrHIO8zeQlM3VLo2ts BzhseVG4Rxw5W99+hUtACv8k3x2YE0GYslqj2ayPJLj/ICmm9PbkCCJWq5PjKN1T6T/Y K9W6/fxBkzaDWfcdCQJ+RbJ7qM9v5c7Le7trbVBdjSOcck1MInHvQ57sgJk3gSdvx0U/ AQilFVgrDHvqlSxHlA2OEQQLI4i2WbPs2CMebnaJEjIkKKHR7Ybb2HjrLoiKLqQn6BDj aUTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PBtowDSi; 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 n6si4059725pla.609.2017.08.18.07.58.37; Fri, 18 Aug 2017 07:58:38 -0700 (PDT) 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=PBtowDSi; 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 S1751687AbdHRO6c (ORCPT + 26 others); Fri, 18 Aug 2017 10:58:32 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:19565 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751075AbdHRO63 (ORCPT ); Fri, 18 Aug 2017 10:58:29 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7IEwN4R007503; Fri, 18 Aug 2017 09:58:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1503068303; bh=K80xuJetHRpA7/ma1TWtojeDhzL2xI0nNbVT8uzODLo=; h=From:To:CC:Subject:Date; b=PBtowDSiju5Gyl4VM5MfdkP43IXAVlhFObUOWhHNyBoZmji3Niv3P8yFCLwAPEu2M Aavh1EG+1Fj0AHSznjTPyMHtVkHn+oddhp0UNDsG4lGAhkbjnzSLp3NsKbmr5JDa5v s5UjbglhzILemvJSF0mUSWvKI8VdO8Z/ACwtU3zE= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7IEwNs8002566; Fri, 18 Aug 2017 09:58:23 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 18 Aug 2017 09:58:23 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Fri, 18 Aug 2017 09:58:23 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7IEwKjw023721; Fri, 18 Aug 2017 09:58:20 -0500 From: Kishon Vijay Abraham I To: Bjorn Helgaas CC: Joao Pinto , Arnd Bergmann , , , , , , Subject: [PATCH 00/18] PCI: endpoint: Make pci-epf-test more flexible Date: Fri, 18 Aug 2017 20:27:52 +0530 Message-ID: <20170818145810.17649-1-kishon@ti.com> X-Mailer: git-send-email 2.11.0 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 Hi Bjorn, I've collected all the patches for PCI Endpoint in this series. This series contains PCI endpoint fixes and making pci-epf-test more flexible in terms of mapping PCI_ENDPOINT_TEST regs to any BARs, work with linkup notification etc. I've been having most of these patches in my local tree created while adding support for endpoint in TI's K2G platform. I've also included fix from others who are trying to use the PCI Endpoint Framework in their own platforms. It also contains minor changes in pci/dwc/ like resetting BARs in the EP controller and providing a page size to pci_epc_mem. I can send this part separately based on some of your branch if you'd prefer that. This also contains patches for host side pci_endpoint_test driver in drivers/misc. I've pushed the series to pci-endpoint tree, the details of which are given below. Thanks Kishon The following changes since commit 5771a8c08880cdca3bfb4a3fc6d309d6bba20877: Linux v4.13-rc1 (2017-07-15 15:22:10 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kishon/pci-endpoint.git tags/pci-ep-for-4.14 for you to fetch changes up to 31802acb56e040bf5f269b2bad159583fc804d68: tools: PCI: Add a missing option help line (2017-08-18 19:23:36 +0530) ---------------------------------------------------------------- PCI: endpoint: for 4.14 PCI endpoint core: *) Add support for page size to be configurable (for managing address region within the controller) *) Add an API to get matching "pci_epf_device_id" *) Use of_dma_configure() to set initial dma mask of pci_epf device *) Do not abort if endpoint function drivers have not populated ->remove() callback pci-epf-test function driver: *) Add support to poll early for host commands *) Add support to use _any_ BAR's to map PCI_ENDPOINT_TEST regs pci_endpoint_test PCI driver: *) Add support for PCI_ENDPOINT_TEST regs to be mapped to any BAR *) Add support to provide aligned buffer addresses *) Enable/Disable MSI using module param Signed-off-by: Kishon Vijay Abraham I ---------------------------------------------------------------- Kishon Vijay Abraham I (16): PCI: endpoint: pci-epc-core: Use of_dma_configure() to set initial dma mask PCI: endpoint: pci-epf-core: Add an API to get matching "pci_epf_device_id" PCI: endpoint: pci-epf-core: Make ->remove() callback optional PCI: endpoint: pci-epc-mem: Add support for configurable page size PCI: endpoint: functions/pci-epf-test: Add "volatile" to pci_epf_test_reg PCI: endpoint: functions/pci-epf-test: Do not reset *command* inadvertently PCI: endpoint: functions/pci-epf-test: Add support to use _any_ BAR's to map PCI_ENDPOINT_TEST regs PCI: endpoint: functions/pci-epf-test: Add support to poll early for host commands PCI: dwc: designware: Provide page_size to pci_epc_mem PCI: dwc: dra7xx: Reset all BARs during initialization PCI: dwc: designware-ep: Do not disable BARs during initialization misc: pci_endpoint_test: Add support for PCI_ENDPOINT_TEST regs to be mapped to any BAR misc: pci_endpoint_test: Add support to provide aligned buffer addresses misc: pci_endpoint_test: Add support to not enable MSI interrupts misc: pci_endpoint_test: Avoid using hard coded BAR sizes misc: pci_endpoint_test: Enable/Disable MSI using module param Shawn Lin (1): PCI: endpoint: functions/pci-epf-test: Remove the ->remove() callback Stan Drozd (1): tools: PCI: Add a missing option help line drivers/misc/pci_endpoint_test.c | 132 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------- drivers/pci/dwc/pci-dra7xx.c | 13 +++++++++++++ drivers/pci/dwc/pcie-designware-ep.c | 7 ++----- drivers/pci/dwc/pcie-designware.h | 1 + drivers/pci/endpoint/functions/pci-epf-test.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------ drivers/pci/endpoint/pci-epc-core.c | 11 +++++++++-- drivers/pci/endpoint/pci-epc-mem.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++--------- drivers/pci/endpoint/pci-epf-core.c | 21 +++++++++++++++++++-- include/linux/pci-epc.h | 8 +++++++- include/linux/pci-epf.h | 2 ++ tools/pci/pcitest.c | 1 + 11 files changed, 276 insertions(+), 78 deletions(-) -- 2.11.0