Commit d4518e4a authored by Changbin Du's avatar Changbin Du Committed by Bjorn Helgaas
Browse files

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: default avatarChangbin Du <changbin.du@gmail.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent d8946fc3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,3 +8,4 @@ PCI Endpoint Framework
   :maxdepth: 2

   pci-endpoint
   pci-endpoint-cfs
+56 −43
Original line number Diff line number Diff line
                   CONFIGURING PCI ENDPOINT USING CONFIGFS
                    Kishon Vijay Abraham I <kishon@ti.com>
.. SPDX-License-Identifier: GPL-2.0

=======================================
Configuring PCI Endpoint Using CONFIGFS
=======================================

:Author: Kishon Vijay Abraham I <kishon@ti.com>

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/

*) 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/
		.. <EPF Driver1>/
@@ -44,6 +54,7 @@ Every <EPF device> 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 <EPF Device> is
created)
::

		.. <EPF Driver1>/
			... <EPF Device 11>/
@@ -58,10 +69,12 @@ created)
				... subsys_id
				... interrupt_pin

*) EPC Device
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/
		.. <EPC Device1>/
@@ -81,7 +94,7 @@ The <EPC Device> 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/
				| <Directory: EPC name>/
@@ -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`