summaryrefslogtreecommitdiffstats
path: root/Documentation/PCI/endpoint
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2019-05-14 10:47:33 -0400
committerBjorn Helgaas <bhelgaas@google.com>2019-05-30 18:54:34 -0400
commitbf2c2658d4b6baed13c274da7091428772b5cb03 (patch)
treefd339ee4f52319b57cc4279efc9d2019d96ca365 /Documentation/PCI/endpoint
parentd4518e4ac64cae18f953f8a433359ea1face4b52 (diff)
Documentation: PCI: convert endpoint/pci-test-function.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>
Diffstat (limited to 'Documentation/PCI/endpoint')
-rw-r--r--Documentation/PCI/endpoint/index.rst1
-rw-r--r--Documentation/PCI/endpoint/pci-test-function.rst (renamed from Documentation/PCI/endpoint/pci-test-function.txt)84
2 files changed, 51 insertions, 34 deletions
diff --git a/Documentation/PCI/endpoint/index.rst b/Documentation/PCI/endpoint/index.rst
index 3951de9f923c..b680a3fc4fec 100644
--- a/Documentation/PCI/endpoint/index.rst
+++ b/Documentation/PCI/endpoint/index.rst
@@ -9,3 +9,4 @@ PCI Endpoint Framework
9 9
10 pci-endpoint 10 pci-endpoint
11 pci-endpoint-cfs 11 pci-endpoint-cfs
12 pci-test-function
diff --git a/Documentation/PCI/endpoint/pci-test-function.txt b/Documentation/PCI/endpoint/pci-test-function.rst
index 5916f1f592bb..3c8521d7aa31 100644
--- a/Documentation/PCI/endpoint/pci-test-function.txt
+++ b/Documentation/PCI/endpoint/pci-test-function.rst
@@ -1,5 +1,10 @@
1 PCI TEST 1.. SPDX-License-Identifier: GPL-2.0
2 Kishon Vijay Abraham I <kishon@ti.com> 2
3=================
4PCI Test Function
5=================
6
7:Author: Kishon Vijay Abraham I <kishon@ti.com>
3 8
4Traditionally PCI RC has always been validated by using standard 9Traditionally PCI RC has always been validated by using standard
5PCI cards like ethernet PCI cards or USB PCI cards or SATA PCI cards. 10PCI cards like ethernet PCI cards or USB PCI cards or SATA PCI cards.
@@ -23,65 +28,76 @@ The PCI endpoint test device has the following registers:
23 8) PCI_ENDPOINT_TEST_IRQ_TYPE 28 8) PCI_ENDPOINT_TEST_IRQ_TYPE
24 9) PCI_ENDPOINT_TEST_IRQ_NUMBER 29 9) PCI_ENDPOINT_TEST_IRQ_NUMBER
25 30
26*) PCI_ENDPOINT_TEST_MAGIC 31* PCI_ENDPOINT_TEST_MAGIC
27 32
28This register will be used to test BAR0. A known pattern will be written 33This register will be used to test BAR0. A known pattern will be written
29and read back from MAGIC register to verify BAR0. 34and read back from MAGIC register to verify BAR0.
30 35
31*) PCI_ENDPOINT_TEST_COMMAND: 36* PCI_ENDPOINT_TEST_COMMAND
32 37
33This register will be used by the host driver to indicate the function 38This register will be used by the host driver to indicate the function
34that the endpoint device must perform. 39that the endpoint device must perform.
35 40
36Bitfield Description: 41======== ================================================================
37 Bit 0 : raise legacy IRQ 42Bitfield Description
38 Bit 1 : raise MSI IRQ 43======== ================================================================
39 Bit 2 : raise MSI-X IRQ 44Bit 0 raise legacy IRQ
40 Bit 3 : read command (read data from RC buffer) 45Bit 1 raise MSI IRQ
41 Bit 4 : write command (write data to RC buffer) 46Bit 2 raise MSI-X IRQ
42 Bit 5 : copy command (copy data from one RC buffer to another 47Bit 3 read command (read data from RC buffer)
43 RC buffer) 48Bit 4 write command (write data to RC buffer)
49Bit 5 copy command (copy data from one RC buffer to another RC buffer)
50======== ================================================================
44 51
45*) PCI_ENDPOINT_TEST_STATUS 52* PCI_ENDPOINT_TEST_STATUS
46 53
47This register reflects the status of the PCI endpoint device. 54This register reflects the status of the PCI endpoint device.
48 55
49Bitfield Description: 56======== ==============================
50 Bit 0 : read success 57Bitfield Description
51 Bit 1 : read fail 58======== ==============================
52 Bit 2 : write success 59Bit 0 read success
53 Bit 3 : write fail 60Bit 1 read fail
54 Bit 4 : copy success 61Bit 2 write success
55 Bit 5 : copy fail 62Bit 3 write fail
56 Bit 6 : IRQ raised 63Bit 4 copy success
57 Bit 7 : source address is invalid 64Bit 5 copy fail
58 Bit 8 : destination address is invalid 65Bit 6 IRQ raised
59 66Bit 7 source address is invalid
60*) PCI_ENDPOINT_TEST_SRC_ADDR 67Bit 8 destination address is invalid
68======== ==============================
69
70* PCI_ENDPOINT_TEST_SRC_ADDR
61 71
62This register contains the source address (RC buffer address) for the 72This register contains the source address (RC buffer address) for the
63COPY/READ command. 73COPY/READ command.
64 74
65*) PCI_ENDPOINT_TEST_DST_ADDR 75* PCI_ENDPOINT_TEST_DST_ADDR
66 76
67This register contains the destination address (RC buffer address) for 77This register contains the destination address (RC buffer address) for
68the COPY/WRITE command. 78the COPY/WRITE command.
69 79
70*) PCI_ENDPOINT_TEST_IRQ_TYPE 80* PCI_ENDPOINT_TEST_IRQ_TYPE
71 81
72This register contains the interrupt type (Legacy/MSI) triggered 82This register contains the interrupt type (Legacy/MSI) triggered
73for the READ/WRITE/COPY and raise IRQ (Legacy/MSI) commands. 83for the READ/WRITE/COPY and raise IRQ (Legacy/MSI) commands.
74 84
75Possible types: 85Possible types:
76 - Legacy : 0
77 - MSI : 1
78 - MSI-X : 2
79 86
80*) PCI_ENDPOINT_TEST_IRQ_NUMBER 87====== ==
88Legacy 0
89MSI 1
90MSI-X 2
91====== ==
92
93* PCI_ENDPOINT_TEST_IRQ_NUMBER
81 94
82This register contains the triggered ID interrupt. 95This register contains the triggered ID interrupt.
83 96
84Admissible values: 97Admissible values:
85 - Legacy : 0 98
86 - MSI : [1 .. 32] 99====== ===========
87 - MSI-X : [1 .. 2048] 100Legacy 0
101MSI [1 .. 32]
102MSI-X [1 .. 2048]
103====== ===========