diff options
author | Changbin Du <changbin.du@gmail.com> | 2019-05-14 10:47:33 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-05-30 18:54:34 -0400 |
commit | bf2c2658d4b6baed13c274da7091428772b5cb03 (patch) | |
tree | fd339ee4f52319b57cc4279efc9d2019d96ca365 /Documentation/PCI/endpoint | |
parent | d4518e4ac64cae18f953f8a433359ea1face4b52 (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.rst | 1 | ||||
-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 | ================= | ||
4 | PCI Test Function | ||
5 | ================= | ||
6 | |||
7 | :Author: Kishon Vijay Abraham I <kishon@ti.com> | ||
3 | 8 | ||
4 | Traditionally PCI RC has always been validated by using standard | 9 | Traditionally PCI RC has always been validated by using standard |
5 | PCI cards like ethernet PCI cards or USB PCI cards or SATA PCI cards. | 10 | PCI 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 | ||
28 | This register will be used to test BAR0. A known pattern will be written | 33 | This register will be used to test BAR0. A known pattern will be written |
29 | and read back from MAGIC register to verify BAR0. | 34 | and read back from MAGIC register to verify BAR0. |
30 | 35 | ||
31 | *) PCI_ENDPOINT_TEST_COMMAND: | 36 | * PCI_ENDPOINT_TEST_COMMAND |
32 | 37 | ||
33 | This register will be used by the host driver to indicate the function | 38 | This register will be used by the host driver to indicate the function |
34 | that the endpoint device must perform. | 39 | that the endpoint device must perform. |
35 | 40 | ||
36 | Bitfield Description: | 41 | ======== ================================================================ |
37 | Bit 0 : raise legacy IRQ | 42 | Bitfield Description |
38 | Bit 1 : raise MSI IRQ | 43 | ======== ================================================================ |
39 | Bit 2 : raise MSI-X IRQ | 44 | Bit 0 raise legacy IRQ |
40 | Bit 3 : read command (read data from RC buffer) | 45 | Bit 1 raise MSI IRQ |
41 | Bit 4 : write command (write data to RC buffer) | 46 | Bit 2 raise MSI-X IRQ |
42 | Bit 5 : copy command (copy data from one RC buffer to another | 47 | Bit 3 read command (read data from RC buffer) |
43 | RC buffer) | 48 | Bit 4 write command (write data to RC buffer) |
49 | Bit 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 | ||
47 | This register reflects the status of the PCI endpoint device. | 54 | This register reflects the status of the PCI endpoint device. |
48 | 55 | ||
49 | Bitfield Description: | 56 | ======== ============================== |
50 | Bit 0 : read success | 57 | Bitfield Description |
51 | Bit 1 : read fail | 58 | ======== ============================== |
52 | Bit 2 : write success | 59 | Bit 0 read success |
53 | Bit 3 : write fail | 60 | Bit 1 read fail |
54 | Bit 4 : copy success | 61 | Bit 2 write success |
55 | Bit 5 : copy fail | 62 | Bit 3 write fail |
56 | Bit 6 : IRQ raised | 63 | Bit 4 copy success |
57 | Bit 7 : source address is invalid | 64 | Bit 5 copy fail |
58 | Bit 8 : destination address is invalid | 65 | Bit 6 IRQ raised |
59 | 66 | Bit 7 source address is invalid | |
60 | *) PCI_ENDPOINT_TEST_SRC_ADDR | 67 | Bit 8 destination address is invalid |
68 | ======== ============================== | ||
69 | |||
70 | * PCI_ENDPOINT_TEST_SRC_ADDR | ||
61 | 71 | ||
62 | This register contains the source address (RC buffer address) for the | 72 | This register contains the source address (RC buffer address) for the |
63 | COPY/READ command. | 73 | COPY/READ command. |
64 | 74 | ||
65 | *) PCI_ENDPOINT_TEST_DST_ADDR | 75 | * PCI_ENDPOINT_TEST_DST_ADDR |
66 | 76 | ||
67 | This register contains the destination address (RC buffer address) for | 77 | This register contains the destination address (RC buffer address) for |
68 | the COPY/WRITE command. | 78 | the COPY/WRITE command. |
69 | 79 | ||
70 | *) PCI_ENDPOINT_TEST_IRQ_TYPE | 80 | * PCI_ENDPOINT_TEST_IRQ_TYPE |
71 | 81 | ||
72 | This register contains the interrupt type (Legacy/MSI) triggered | 82 | This register contains the interrupt type (Legacy/MSI) triggered |
73 | for the READ/WRITE/COPY and raise IRQ (Legacy/MSI) commands. | 83 | for the READ/WRITE/COPY and raise IRQ (Legacy/MSI) commands. |
74 | 84 | ||
75 | Possible types: | 85 | Possible types: |
76 | - Legacy : 0 | ||
77 | - MSI : 1 | ||
78 | - MSI-X : 2 | ||
79 | 86 | ||
80 | *) PCI_ENDPOINT_TEST_IRQ_NUMBER | 87 | ====== == |
88 | Legacy 0 | ||
89 | MSI 1 | ||
90 | MSI-X 2 | ||
91 | ====== == | ||
92 | |||
93 | * PCI_ENDPOINT_TEST_IRQ_NUMBER | ||
81 | 94 | ||
82 | This register contains the triggered ID interrupt. | 95 | This register contains the triggered ID interrupt. |
83 | 96 | ||
84 | Admissible values: | 97 | Admissible values: |
85 | - Legacy : 0 | 98 | |
86 | - MSI : [1 .. 32] | 99 | ====== =========== |
87 | - MSI-X : [1 .. 2048] | 100 | Legacy 0 |
101 | MSI [1 .. 32] | ||
102 | MSI-X [1 .. 2048] | ||
103 | ====== =========== | ||