1 CONFIGURING PCI ENDPOINT USING CONFIGFS
2 Kishon Vijay Abraham I <kishon@ti.com>
4 The PCI Endpoint Core exposes configfs entry (pci_ep) to configure the
5 PCI endpoint function and to bind the endpoint function
6 with the endpoint controller. (For introducing other mechanisms to
7 configure the PCI Endpoint Function refer to [1]).
11 The PCI Endpoint Core layer creates pci_ep directory in the mounted configfs
12 directory. configfs can be mounted using the following command.
14 mount -t configfs none /sys/kernel/config
16 *) Directory Structure
18 The pci_ep configfs has two directories at its root: controllers and
19 functions. Every EPC device present in the system will have an entry in
20 the *controllers* directory and and every EPF driver present in the system
21 will have an entry in the *functions* directory.
23 /sys/kernel/config/pci_ep/
27 *) Creating EPF Device
29 Every registered EPF driver will be listed in controllers directory. The
30 entries corresponding to EPF driver will be created by the EPF core.
32 /sys/kernel/config/pci_ep/functions/
40 In order to create a <EPF device> of the type probed by <EPF Driver>, the
41 user has to create a directory inside <EPF DriverN>.
43 Every <EPF device> directory consists of the following entries that can be
44 used to configure the standard configuration header of the endpoint function.
45 (These entries are created by the framework when any new <EPF Device> is
63 Every registered EPC device will be listed in controllers directory. The
64 entries corresponding to EPC device will be created by the EPC core.
66 /sys/kernel/config/pci_ep/controllers/
68 ... <Symlink EPF Device11>/
69 ... <Symlink EPF Device12>/
72 ... <Symlink EPF Device21>/
73 ... <Symlink EPF Device22>/
76 The <EPC Device> directory will have a list of symbolic links to
77 <EPF Device>. These symbolic links should be created by the user to
78 represent the functions present in the endpoint device.
80 The <EPC Device> directory will also have a *start* field. Once
81 "1" is written to this field, the endpoint device will be ready to
82 establish the link with the host. This is usually done after
83 all the EPF devices are created and linked with the EPC device.
87 | <Directory: EPC name>/
88 | <Symbolic Link: Function>
91 | <Directory: EPF driver>/
92 | <Directory: EPF device>/
105 [1] -> Documentation/PCI/endpoint/pci-endpoint.txt