Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: PCI: convert endpoint/pci-endpoint-cfs.txt to reST

Convert plain text documentation to reStructuredText format and add it to
Sphinx TOC tree. No essential content change.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Changbin Du and committed by
Bjorn Helgaas
d4518e4a d8946fc3

+54 -40
+1
Documentation/PCI/endpoint/index.rst
··· 8 8 :maxdepth: 2 9 9 10 10 pci-endpoint 11 + pci-endpoint-cfs
+53 -40
Documentation/PCI/endpoint/pci-endpoint-cfs.txt Documentation/PCI/endpoint/pci-endpoint-cfs.rst
··· 1 - CONFIGURING PCI ENDPOINT USING CONFIGFS 2 - Kishon Vijay Abraham I <kishon@ti.com> 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ======================================= 4 + Configuring PCI Endpoint Using CONFIGFS 5 + ======================================= 6 + 7 + :Author: Kishon Vijay Abraham I <kishon@ti.com> 3 8 4 9 The PCI Endpoint Core exposes configfs entry (pci_ep) to configure the 5 10 PCI endpoint function and to bind the endpoint function 6 11 with the endpoint controller. (For introducing other mechanisms to 7 12 configure the PCI Endpoint Function refer to [1]). 8 13 9 - *) Mounting configfs 14 + Mounting configfs 15 + ================= 10 16 11 17 The PCI Endpoint Core layer creates pci_ep directory in the mounted configfs 12 - directory. configfs can be mounted using the following command. 18 + directory. configfs can be mounted using the following command:: 13 19 14 20 mount -t configfs none /sys/kernel/config 15 21 16 - *) Directory Structure 22 + Directory Structure 23 + =================== 17 24 18 25 The pci_ep configfs has two directories at its root: controllers and 19 26 functions. Every EPC device present in the system will have an entry in 20 27 the *controllers* directory and and every EPF driver present in the system 21 28 will have an entry in the *functions* directory. 29 + :: 22 30 23 - /sys/kernel/config/pci_ep/ 24 - .. controllers/ 25 - .. functions/ 31 + /sys/kernel/config/pci_ep/ 32 + .. controllers/ 33 + .. functions/ 26 34 27 - *) Creating EPF Device 35 + Creating EPF Device 36 + =================== 28 37 29 38 Every registered EPF driver will be listed in controllers directory. The 30 39 entries corresponding to EPF driver will be created by the EPF core. 40 + :: 31 41 32 - /sys/kernel/config/pci_ep/functions/ 33 - .. <EPF Driver1>/ 34 - ... <EPF Device 11>/ 35 - ... <EPF Device 21>/ 36 - .. <EPF Driver2>/ 37 - ... <EPF Device 12>/ 38 - ... <EPF Device 22>/ 42 + /sys/kernel/config/pci_ep/functions/ 43 + .. <EPF Driver1>/ 44 + ... <EPF Device 11>/ 45 + ... <EPF Device 21>/ 46 + .. <EPF Driver2>/ 47 + ... <EPF Device 12>/ 48 + ... <EPF Device 22>/ 39 49 40 50 In order to create a <EPF device> of the type probed by <EPF Driver>, the 41 51 user has to create a directory inside <EPF DriverN>. ··· 54 44 used to configure the standard configuration header of the endpoint function. 55 45 (These entries are created by the framework when any new <EPF Device> is 56 46 created) 47 + :: 57 48 58 - .. <EPF Driver1>/ 59 - ... <EPF Device 11>/ 60 - ... vendorid 61 - ... deviceid 62 - ... revid 63 - ... progif_code 64 - ... subclass_code 65 - ... baseclass_code 66 - ... cache_line_size 67 - ... subsys_vendor_id 68 - ... subsys_id 69 - ... interrupt_pin 49 + .. <EPF Driver1>/ 50 + ... <EPF Device 11>/ 51 + ... vendorid 52 + ... deviceid 53 + ... revid 54 + ... progif_code 55 + ... subclass_code 56 + ... baseclass_code 57 + ... cache_line_size 58 + ... subsys_vendor_id 59 + ... subsys_id 60 + ... interrupt_pin 70 61 71 - *) EPC Device 62 + EPC Device 63 + ========== 72 64 73 65 Every registered EPC device will be listed in controllers directory. The 74 66 entries corresponding to EPC device will be created by the EPC core. 67 + :: 75 68 76 - /sys/kernel/config/pci_ep/controllers/ 77 - .. <EPC Device1>/ 78 - ... <Symlink EPF Device11>/ 79 - ... <Symlink EPF Device12>/ 80 - ... start 81 - .. <EPC Device2>/ 82 - ... <Symlink EPF Device21>/ 83 - ... <Symlink EPF Device22>/ 84 - ... start 69 + /sys/kernel/config/pci_ep/controllers/ 70 + .. <EPC Device1>/ 71 + ... <Symlink EPF Device11>/ 72 + ... <Symlink EPF Device12>/ 73 + ... start 74 + .. <EPC Device2>/ 75 + ... <Symlink EPF Device21>/ 76 + ... <Symlink EPF Device22>/ 77 + ... start 85 78 86 79 The <EPC Device> directory will have a list of symbolic links to 87 80 <EPF Device>. These symbolic links should be created by the user to ··· 94 81 "1" is written to this field, the endpoint device will be ready to 95 82 establish the link with the host. This is usually done after 96 83 all the EPF devices are created and linked with the EPC device. 97 - 84 + :: 98 85 99 86 | controllers/ 100 87 | <Directory: EPC name>/ ··· 115 102 | interrupt_pin 116 103 | function 117 104 118 - [1] -> Documentation/PCI/endpoint/pci-endpoint.txt 105 + [1] :doc:`pci-endpoint`