diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2017-01-10 20:30:26 +0530 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2017-02-16 18:07:16 +0530 |
commit | a198e6155a59e90eee107e610710248947a45aa1 (patch) | |
tree | 927a7ff44906734e73cf0bc086809e4caad27931 | |
parent | c897a03b4560721aee47434f9a1559c91d99761a (diff) | |
download | pci-ep-a198e6155a59e90eee107e610710248947a45aa1.tar.gz |
Documentation: PCI: Guide to use pci endpoint configfs
Add Documentation to help users use pci endpoint to configure
pci endpoint function and to bind the endpoint function
with endpoint controller.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
-rw-r--r-- | Documentation/PCI/00-INDEX | 2 | ||||
-rw-r--r-- | Documentation/PCI/endpoint/pci-endpoint-cfs.txt | 84 |
2 files changed, 86 insertions, 0 deletions
diff --git a/Documentation/PCI/00-INDEX b/Documentation/PCI/00-INDEX index ba950b296bd8bf..f84a23c7c74b40 100644 --- a/Documentation/PCI/00-INDEX +++ b/Documentation/PCI/00-INDEX @@ -14,3 +14,5 @@ pcieaer-howto.txt - the PCI Express Advanced Error Reporting Driver Guide HOWTO endpoint/pci-endpoint.txt - guide to add endpoint controller driver and endpoint function driver. +endpoint/pci-endpoint-cfs.txt + - guide to use configfs to configure the pci endpoint function. diff --git a/Documentation/PCI/endpoint/pci-endpoint-cfs.txt b/Documentation/PCI/endpoint/pci-endpoint-cfs.txt new file mode 100644 index 00000000000000..d9f87346565535 --- /dev/null +++ b/Documentation/PCI/endpoint/pci-endpoint-cfs.txt @@ -0,0 +1,84 @@ + CONFIGURING PCI ENDPOINT USING CONFIGFS + Kishon Vijay Abraham I <kishon@ti.com> + +The PCI Endpoint Core exposes configfs entry (pci_ep) in order to configure the +PCI endpoint function and in order to bind the endpoint function +with the endpoint controller. (For introducing other mechanisms to +configure the PCI Endpoint Function refer [1]). + +*) Mounting configfs + +The PCI Endpoint Core layer creates pci_ep directory in the mounted configfs +directory. configfs can be mounted using the following command. + + mount -t configfs none /sys/kernel/config + +*) Directory Structure + +The pci_ep configfs directory structure has been created to reflect the +natural tree like structure of PCI devices. So every directory created +inside pci_ep represents a EPC device and every directory created inside +epf directory represents EPF device. + +/sys/kernel/config/pci_ep/ + | <dir>/ --------------------------------------> [2] + | epc + | epf/ + | <dir>/ --------------------------> [3] + | vendorid + | deviceid + | revid + | progif_code + | subclass_code + | baseclass_code + | cache_line_size + | subsys_vendor_id + | subsys_id + | interrupt_pin + | function + +*) Creating configfs entry for EPC + +Any directory created inside *pci_ep* represents an EPC device. In the above +directory structure [2] represents an EPC device. It consists of + + *) epc: Use it to associate the configfs entry to an actual EPC device. + The list of valid entries for this field can be obtained from + ls /sys/class/pci_epc/ + + *) epf: Directory that contains all the endpoint functions. The name + of the created directory determines the driver this particular + epf device will be bound to. The name can be obtained either + from the function binding documentation [4] or + ls /sys/bus/pci-epf/drivers + + If more than one endpoint function device has to be bound to + the same driver, then the directory should be created using + the following notation + mkdir <name>.<num> + +*) Creating configfs entry for EPF + +Any directory created inside *epf* directory represents an EPF device. In the +above directory structure, [3] represents an EPF device. It 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 directory is created inside epf directory.) + + | vendorid + | deviceid + | revid + | progif_code + | subclass_code + | baseclass_code + | cache_line_size + | subsys_vendor_id + | subsys_id + | interrupt_pin + +The following entry identifies the function driver that is bound to the +function device + | function + +[1] -> Documentation/PCI/endpoint/pci-endpoint.txt +[4] -> Documentation/PCI/endpoint/function/binding/ |