Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3790078yba; Tue, 23 Apr 2019 09:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxt0c6e2KTqsq5cIqUpTc7NsyEa37sKgG/x6WErCUxc6bpGHzJqKGTNYpwkzhO/ob6mjnKx X-Received: by 2002:a63:ed4e:: with SMTP id m14mr26094125pgk.182.1556037499020; Tue, 23 Apr 2019 09:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556037499; cv=none; d=google.com; s=arc-20160816; b=TJOY5mrIEG1WP2Cfk9NudjSe7q94U9iJw62x3nwSHxmedjbf/4O9QewVxpdKdIfWoX iJRSU0COQcBIxePNa/0kZ3jamCp4ut5Owa1KcddPisVIsjyRrVfAYprjiM+Vk71oAw5E RguQ6Evj0FMrQADchXs28cn0jkl8drrWt5CgzpP7t9HoTxqqmM8bBuh6SRBMMjbmcVU5 w/8ADSKwA4l1koc/cfMYtaVem7qPAyYvkca85OuBCbHu4oVuQjQEjSXXrwMa6fNgKJDB OV/oL+Bq6G5MY7Pz9k4A+PvJlNakLEMBBzDDWjPWqs+ToAEygtH45jKnMf9k3vmHQQpl cEGA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1Gd8uAluhwpSrTMHyHIeaXrT2bcwIAaHkdeZrwzi8Fk=; b=0RgVCzgnzw1B9XY+uuo7fKhqBP7/9TjfrLa4kykg6D81gJheb1oFa+3qqaWPu93s9Y 2oQ8xnS0JQxito5pMMJ3e2k9UT6DiU84quEhxXaAiqoPj6ZL6lYej216cB31ZdU9Fbjx Bn6+IowNZaUH8aEkt6o0pKrYOHxeLy23wZY4Rn0okj5QEtCPDIrpsPg4FzRHyob0vQ/9 mdsLSEv71316dh8rn8jkpYjGbWjLJTVXzMQBja2oyAzVT8n2JRoHCCfQFRiEQRSvS2nX D2hd68Esth1zy8OBlfY8JB1DVYFMHvWaZH0LigD3YhFw+y92uDN9WIGIWYOBFEPwB5Yu 5GFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nKunKPSD; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3si15073197pgr.189.2019.04.23.09.38.03; Tue, 23 Apr 2019 09:38:19 -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=@gmail.com header.s=20161025 header.b=nKunKPSD; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729219AbfDWQgA (ORCPT + 99 others); Tue, 23 Apr 2019 12:36:00 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:42256 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728752AbfDWQf7 (ORCPT ); Tue, 23 Apr 2019 12:35:59 -0400 Received: by mail-pl1-f193.google.com with SMTP id x15so3438925pln.9; Tue, 23 Apr 2019 09:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1Gd8uAluhwpSrTMHyHIeaXrT2bcwIAaHkdeZrwzi8Fk=; b=nKunKPSD9rnDmtlbljP9FVv7kZZQuCn8hJNCnM0Nhbve5xdeJdsELwZx4ak4diyShV uT/6iwi2LVm5cHAwGbLU58FqksoPZSYqLYsrjFOfswF7gKkNdCX1rSCPbzy2460AYTNw f5f3Z/uW/PEWap+NT68LjkJAo16QD4Ttmv5l5Gj0c1ZAQ4aaguhOyLgrzaCyME9aMYH0 uutekP1SDei2uwWpDDDPyKkKWlAlya6btBGx81Q51klg838jUm2SB1wDyGdi3uhaiHGu 73m6JrKG3t7TRfHG+tT4Rv/7Yzg8E5dfkVzAY/p6X+lo3JUrYEfb8BqN8xeJpC2DoLO5 rNQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1Gd8uAluhwpSrTMHyHIeaXrT2bcwIAaHkdeZrwzi8Fk=; b=LEdMX3lLy+9UnTyQdeyomQkAf0TrbokGnrsncaMibqGERqfjBIRbi186rHXcpTPsRC HOi5JmEouuI55bjAw0Krv96/FT1HDyhOoI0XeM9PzXsUcGQEhA3qZkTw9NWRy8rh8zhT HjgW2plP42n6ObAeRfJUZ6POPbV96zBrPekoVPFC1e+63rG0LEhSfKPVf7PtaRrbUKm+ KmYdUK9RiDcA+np2wsYifzvwNQ7sTtATdzUPnxy+/0giREm6umQ75fy/ak2XUUDhEXKi ZryWYj3vP9EqkTwFcP+674ppt0P9v9/nu+X65IKybwk4mmkZIekiOT15nKzdLMxC9+Nc 817g== X-Gm-Message-State: APjAAAXDpvQRBDr6yfwsuBrSLH4grqz//CQGOuXlO/XosyjVwJg9wlUM 71L9r7Vly7jf4w/sR3fbSYQ= X-Received: by 2002:a17:902:c1:: with SMTP id a59mr26246918pla.176.1556037358821; Tue, 23 Apr 2019 09:35:58 -0700 (PDT) Received: from localhost.localdomain ([104.238.181.70]) by smtp.gmail.com with ESMTPSA id v1sm24364801pff.81.2019.04.23.09.35.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 09:35:58 -0700 (PDT) From: Changbin Du To: Jonathan Corbet Cc: Bjorn Helgaas , rjw@rjwysocki.net, linux-pci@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, fenghua.yu@intel.com, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, mchehab+samsung@kernel.org, Changbin Du Subject: [PATCH v4 34/63] Documentation: PCI: convert endpoint/pci-endpoint-cfs.txt to reST Date: Wed, 24 Apr 2019 00:29:03 +0800 Message-Id: <20190423162932.21428-35-changbin.du@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423162932.21428-1-changbin.du@gmail.com> References: <20190423162932.21428-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas --- Documentation/PCI/endpoint/index.rst | 1 + ...-endpoint-cfs.txt => pci-endpoint-cfs.rst} | 99 +++++++++++-------- 2 files changed, 57 insertions(+), 43 deletions(-) rename Documentation/PCI/endpoint/{pci-endpoint-cfs.txt => pci-endpoint-cfs.rst} (64%) diff --git a/Documentation/PCI/endpoint/index.rst b/Documentation/PCI/endpoint/index.rst index 0db4f2fcd7f0..3951de9f923c 100644 --- a/Documentation/PCI/endpoint/index.rst +++ b/Documentation/PCI/endpoint/index.rst @@ -8,3 +8,4 @@ PCI Endpoint Framework :maxdepth: 2 pci-endpoint + pci-endpoint-cfs diff --git a/Documentation/PCI/endpoint/pci-endpoint-cfs.txt b/Documentation/PCI/endpoint/pci-endpoint-cfs.rst similarity index 64% rename from Documentation/PCI/endpoint/pci-endpoint-cfs.txt rename to Documentation/PCI/endpoint/pci-endpoint-cfs.rst index d740f29960a4..b6d39cdec56e 100644 --- a/Documentation/PCI/endpoint/pci-endpoint-cfs.txt +++ b/Documentation/PCI/endpoint/pci-endpoint-cfs.rst @@ -1,41 +1,51 @@ - CONFIGURING PCI ENDPOINT USING CONFIGFS - Kishon Vijay Abraham I +.. SPDX-License-Identifier: GPL-2.0 + +======================================= +Configuring PCI Endpoint Using CONFIGFS +======================================= + +:Author: Kishon Vijay Abraham I The PCI Endpoint Core exposes configfs entry (pci_ep) to configure the PCI endpoint function and to bind the endpoint function with the endpoint controller. (For introducing other mechanisms to configure the PCI Endpoint Function refer to [1]). -*) Mounting configfs +Mounting configfs +================= The PCI Endpoint Core layer creates pci_ep directory in the mounted configfs -directory. configfs can be mounted using the following command. +directory. configfs can be mounted using the following command:: mount -t configfs none /sys/kernel/config -*) Directory Structure +Directory Structure +=================== The pci_ep configfs has two directories at its root: controllers and functions. Every EPC device present in the system will have an entry in the *controllers* directory and and every EPF driver present in the system will have an entry in the *functions* directory. +:: -/sys/kernel/config/pci_ep/ - .. controllers/ - .. functions/ + /sys/kernel/config/pci_ep/ + .. controllers/ + .. functions/ -*) Creating EPF Device +Creating EPF Device +=================== Every registered EPF driver will be listed in controllers directory. The entries corresponding to EPF driver will be created by the EPF core. +:: -/sys/kernel/config/pci_ep/functions/ - .. / - ... / - ... / - .. / - ... / - ... / + /sys/kernel/config/pci_ep/functions/ + .. / + ... / + ... / + .. / + ... / + ... / In order to create a of the type probed by , the user has to create a directory inside . @@ -44,34 +54,37 @@ Every directory consists of the following entries that can be used to configure the standard configuration header of the endpoint function. (These entries are created by the framework when any new is created) - - .. / - ... / - ... vendorid - ... deviceid - ... revid - ... progif_code - ... subclass_code - ... baseclass_code - ... cache_line_size - ... subsys_vendor_id - ... subsys_id - ... interrupt_pin - -*) EPC Device +:: + + .. / + ... / + ... vendorid + ... deviceid + ... revid + ... progif_code + ... subclass_code + ... baseclass_code + ... cache_line_size + ... subsys_vendor_id + ... subsys_id + ... interrupt_pin + +EPC Device +========== Every registered EPC device will be listed in controllers directory. The entries corresponding to EPC device will be created by the EPC core. - -/sys/kernel/config/pci_ep/controllers/ - .. / - ... / - ... / - ... start - .. / - ... / - ... / - ... start +:: + + /sys/kernel/config/pci_ep/controllers/ + .. / + ... / + ... / + ... start + .. / + ... / + ... / + ... start The directory will have a list of symbolic links to . These symbolic links should be created by the user to @@ -81,7 +94,7 @@ The directory will also have a *start* field. Once "1" is written to this field, the endpoint device will be ready to establish the link with the host. This is usually done after all the EPF devices are created and linked with the EPC device. - +:: | controllers/ | / @@ -102,4 +115,4 @@ all the EPF devices are created and linked with the EPC device. | interrupt_pin | function -[1] -> Documentation/PCI/endpoint/pci-endpoint.txt +[1] :doc:`pci-endpoint` -- 2.20.1