2 Kishon Vijay Abraham I <kishon@ti.com>
4 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.
6 However with the addition of EP-core in linux kernel, it is possible
7 to configure a PCI controller that can operate in EP mode to work as
10 The PCI endpoint test device is a virtual device (defined in software)
11 used to test the endpoint functionality and serve as a sample driver
12 for other PCI endpoint devices (to use the EP framework).
14 The PCI endpoint test device has the following registers:
16 1) PCI_ENDPOINT_TEST_MAGIC
17 2) PCI_ENDPOINT_TEST_COMMAND
18 3) PCI_ENDPOINT_TEST_STATUS
19 4) PCI_ENDPOINT_TEST_SRC_ADDR
20 5) PCI_ENDPOINT_TEST_DST_ADDR
21 6) PCI_ENDPOINT_TEST_SIZE
22 7) PCI_ENDPOINT_TEST_CHECKSUM
24 *) PCI_ENDPOINT_TEST_MAGIC
26 This register will be used to test BAR0. A known pattern will be written
27 and read back from MAGIC register to verify BAR0.
29 *) PCI_ENDPOINT_TEST_COMMAND:
31 This register will be used by the host driver to indicate the function
32 that the endpoint device must perform.
35 Bit 0 : raise legacy IRQ
37 Bit 2 - 7 : MSI interrupt number
38 Bit 8 : read command (read data from RC buffer)
39 Bit 9 : write command (write data to RC buffer)
40 Bit 10 : copy command (copy data from one RC buffer to another
43 *) PCI_ENDPOINT_TEST_STATUS
45 This register reflects the status of the PCI endpoint device.
55 Bit 7 : source address is invalid
56 Bit 8 : destination address is invalid
58 *) PCI_ENDPOINT_TEST_SRC_ADDR
60 This register contains the source address (RC buffer address) for the
63 *) PCI_ENDPOINT_TEST_DST_ADDR
65 This register contains the destination address (RC buffer address) for
66 the COPY/WRITE command.