Received: by 10.192.165.148 with SMTP id m20csp1906663imm; Thu, 3 May 2018 07:18:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp+a8kMclUlxeqipHQ/TtpmWZwD49xRq9wk9fHNuK40W0XHkqrmjF7go8VA+9ixAfBWcovi X-Received: by 2002:a65:62c2:: with SMTP id m2-v6mr19743934pgv.164.1525357127939; Thu, 03 May 2018 07:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525357127; cv=none; d=google.com; s=arc-20160816; b=j28gQor9a5Jaqq3JUXXNTxjo9LLSeLTo+b00Vhqun5Pngd6Cc9Z5loDxfXOHFGM5xC eyzCoAYDUTDQ6zw+B7FnUQmsxpjt9Od5829NUqSaXZVwUoOP1eUdrecFBHfk40a6oik8 nxo6FmSVGHgop4NPXpByV8a4zUlAZz37oHzLZbX20Pi2kXPwOMyJDVk3w6//OGYsZUJr qq9y3JH1jm6Z3QJ8COlcKgIoM/n0o2hElILJIUaKFRa0WqD1hsZKkWPRlMKOtyj20zPg IHefpuynHV1k99HkVU6xdfENR/CTtjjhYwunx34Dy/NMIawYD72QJgWSXDYI/tm9n3rU fanw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=MHisUKCjap6KZEQBs0x4XBZcX1e8rR1MYDklZ8DWmxk=; b=OCR8fXrLLHEQX0x7zf8rdR15tlvhz8DASvUtJyovA6mrzZqHPtVBMD7OxbPMBwI5Hy FoFLHeinqjbml6QcvqtOeJD3Tn0jub369+CpPZAvqFcloEGSzdkvr1wWo9hBvn40V6eA IPcNH+pp+1KD7kXhI4pcoghzZHtXrglsdEOQ9xkGN+Rao0FzuGZT5VXy+rnQUEOXvTg+ CozjQBz53j/CYcRD22gLuX6vcXB1eu3lMOvabo/MSorMGuJ86IJzquDyTAmAj+b3/YNE I6dJxDr3TsSdBvoWOIH8x+k3dZtkNtn5DXNGWUZxg/Dtrz7zwr3o56hzjwwIL9Xyt8xN IFoA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si14015570pfb.25.2018.05.03.07.18.34; Thu, 03 May 2018 07:18:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751568AbeECOQy (ORCPT + 99 others); Thu, 3 May 2018 10:16:54 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42576 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751512AbeECOQp (ORCPT ); Thu, 3 May 2018 10:16:45 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 271421435; Thu, 3 May 2018 07:16:44 -0700 (PDT) Received: from e107981-ln.cambridge.arm.com (e107981-ln.cambridge.arm.com [10.1.207.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5C9D33F25D; Thu, 3 May 2018 07:16:42 -0700 (PDT) Date: Thu, 3 May 2018 15:16:36 +0100 From: Lorenzo Pieralisi To: Kishon Vijay Abraham I Cc: Gustavo Pimentel , "bhelgaas@google.com" , "Joao.Pinto@synopsys.com" , "jingoohan1@gmail.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: Re: [PATCH v7 3/9] PCI: endpoint: functions/pci-epf-test: Add second entry Message-ID: <20180503141636.GA23270@e107981-ln.cambridge.arm.com> References: <20180426165605.GA6370@e107981-ln.cambridge.arm.com> <20180501115417.GD19391@e107981-ln.cambridge.arm.com> <5d625d04-38fe-7d5a-67fc-5ea92039474c@ti.com> <20180501142607.GA21911@e107981-ln.cambridge.arm.com> <20180502165144.GB4871@e107981-ln.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 03, 2018 at 12:03:15PM +0530, Kishon Vijay Abraham I wrote: [...] > >> Since the linkup notifier and BAR index (where auxiliary registers are > >> located) may be configurable and is something platform dependent, > >> perhaps the configuration of this variables should be done by module > >> parameter and not by configfs, leaving this configuration > >> responsibility in charge of each platform. > > > > They are platform dependent because they depend on the EP controller. > > That's why I said that those are EP controller parameters. I do not > > think they are module parameters either - they should be part of HW > > description in firmware. > > The problem is because pci-epf-test cannot be described in HW. pci-epf-test is > also not automatically bound to the EP controller but is bound by the user like > below > ln -s functions/pci_epf_test/func1 controllers/51000000.pcie_ep/ > > So given that user anyways has to bind the epf device to the controller, based > on the platform the user can use a different configfs entry like below > ln -s functions/pci_epf_test_dw/func1 controllers/51000000.pcie_ep/ or > ln -s functions/pci_epf_test_k2g/func1 controllers/21800000.pcie-ep/ > > If the epf can be described in dt, then something like below can be done > pcie1_ep: pcie_ep@51000000 { > compatible = "ti,dra7-pcie-ep"; > interrupts = <0 232 0x4>; > num-lanes = <1>; > num-ib-windows = <4>; > num-ob-windows = <16>; > phys = <&pcie1_phy>; > phy-names = "pcie-phy0"; > pci_epf_test: pci_epf_test@0 { > name = "pci_epf_test_dw"; > ; > } > }; > > With this pci-dra7xx.c driver should create pci_epf_device using > pci_epf_create("pci_epf_test_dw"); > > Then the driver_data corresponding to "pci_epf_test_dw" will select linkup > notifier or BAR index etc. Those two properties are properties of the EP controller (it is not 100% clear to me how the test BAR register is defined), is this correct ? If yes, given that those properties are not useful before an EPF is bound to an EPC, can't they be retrieved at bind time from the EPC controller data (that we can add through DT bindings) ? Thanks, Lorenzo