1 .. SPDX-License-Identifier: GPL-2.0
3 =======================================
4 Configuring PCI Endpoint Using CONFIGFS
5 =======================================
7 :Author: Kishon Vijay Abraham I <kishon@ti.com>
9 The PCI Endpoint Core exposes configfs entry (pci_ep) to configure the
10 PCI endpoint function and to bind the endpoint function
11 with the endpoint controller. (For introducing other mechanisms to
12 configure the PCI Endpoint Function refer to [1]).
17 The PCI Endpoint Core layer creates pci_ep directory in the mounted configfs
18 directory. configfs can be mounted using the following command::
20 mount -t configfs none /sys/kernel/config
25 The pci_ep configfs has two directories at its root: controllers and
26 functions. Every EPC device present in the system will have an entry in
27 the *controllers* directory and and every EPF driver present in the system
28 will have an entry in the *functions* directory.
31 /sys/kernel/config/pci_ep/
38 Every registered EPF driver will be listed in controllers directory. The
39 entries corresponding to EPF driver will be created by the EPF core.
42 /sys/kernel/config/pci_ep/functions/
50 In order to create a <EPF device> of the type probed by <EPF Driver>, the
51 user has to create a directory inside <EPF DriverN>.
53 Every <EPF device> directory consists of the following entries that can be
54 used to configure the standard configuration header of the endpoint function.
55 (These entries are created by the framework when any new <EPF Device> is
75 Every registered EPC device will be listed in controllers directory. The
76 entries corresponding to EPC device will be created by the EPC core.
79 /sys/kernel/config/pci_ep/controllers/
81 ... <Symlink EPF Device11>/
82 ... <Symlink EPF Device12>/
85 ... <Symlink EPF Device21>/
86 ... <Symlink EPF Device22>/
89 The <EPC Device> directory will have a list of symbolic links to
90 <EPF Device>. These symbolic links should be created by the user to
91 represent the functions present in the endpoint device.
93 The <EPC Device> directory will also have a *start* field. Once
94 "1" is written to this field, the endpoint device will be ready to
95 establish the link with the host. This is usually done after
96 all the EPF devices are created and linked with the EPC device.
100 | <Directory: EPC name>/
101 | <Symbolic Link: Function>
104 | <Directory: EPF driver>/
105 | <Directory: EPF device>/
118 [1] :doc:`pci-endpoint`