2 * Host side test driver to test endpoint functionality
4 * Copyright (C) 2017 Texas Instruments
5 * Author: Kishon Vijay Abraham I <kishon@ti.com>
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 of
9 * the License as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #include <linux/crc32.h>
21 #include <linux/delay.h>
24 #include <linux/interrupt.h>
25 #include <linux/irq.h>
26 #include <linux/miscdevice.h>
27 #include <linux/module.h>
28 #include <linux/mutex.h>
29 #include <linux/random.h>
30 #include <linux/slab.h>
31 #include <linux/pci.h>
32 #include <linux/pci_ids.h>
34 #include <linux/pci_regs.h>
36 #include <uapi/linux/pcitest.h>
38 #define DRV_MODULE_NAME "pci-endpoint-test"
40 #define IRQ_TYPE_UNDEFINED -1
41 #define IRQ_TYPE_LEGACY 0
42 #define IRQ_TYPE_MSI 1
43 #define IRQ_TYPE_MSIX 2
45 #define PCI_ENDPOINT_TEST_MAGIC 0x0
47 #define PCI_ENDPOINT_TEST_COMMAND 0x4
48 #define COMMAND_RAISE_LEGACY_IRQ BIT(0)
49 #define COMMAND_RAISE_MSI_IRQ BIT(1)
50 #define COMMAND_RAISE_MSIX_IRQ BIT(2)
51 #define COMMAND_READ BIT(3)
52 #define COMMAND_WRITE BIT(4)
53 #define COMMAND_COPY BIT(5)
55 #define PCI_ENDPOINT_TEST_STATUS 0x8
56 #define STATUS_READ_SUCCESS BIT(0)
57 #define STATUS_READ_FAIL BIT(1)
58 #define STATUS_WRITE_SUCCESS BIT(2)
59 #define STATUS_WRITE_FAIL BIT(3)
60 #define STATUS_COPY_SUCCESS BIT(4)
61 #define STATUS_COPY_FAIL BIT(5)
62 #define STATUS_IRQ_RAISED BIT(6)
63 #define STATUS_SRC_ADDR_INVALID BIT(7)
64 #define STATUS_DST_ADDR_INVALID BIT(8)
66 #define PCI_ENDPOINT_TEST_LOWER_SRC_ADDR 0x0c
67 #define PCI_ENDPOINT_TEST_UPPER_SRC_ADDR 0x10
69 #define PCI_ENDPOINT_TEST_LOWER_DST_ADDR 0x14
70 #define PCI_ENDPOINT_TEST_UPPER_DST_ADDR 0x18
72 #define PCI_ENDPOINT_TEST_SIZE 0x1c
73 #define PCI_ENDPOINT_TEST_CHECKSUM 0x20
75 #define PCI_ENDPOINT_TEST_IRQ_TYPE 0x24
76 #define PCI_ENDPOINT_TEST_IRQ_NUMBER 0x28
78 static DEFINE_IDA(pci_endpoint_test_ida
);
80 #define to_endpoint_test(priv) container_of((priv), struct pci_endpoint_test, \
84 module_param(no_msi
, bool, 0444);
85 MODULE_PARM_DESC(no_msi
, "Disable MSI interrupt in pci_endpoint_test");
87 static int irq_type
= IRQ_TYPE_MSI
;
88 module_param(irq_type
, int, 0444);
89 MODULE_PARM_DESC(irq_type
, "IRQ mode selection in pci_endpoint_test (0 - Legacy, 1 - MSI, 2 - MSI-X)");
100 struct pci_endpoint_test
{
101 struct pci_dev
*pdev
;
103 void __iomem
*bar
[6];
104 struct completion irq_raised
;
107 /* mutex to protect the ioctls */
109 struct miscdevice miscdev
;
110 enum pci_barno test_reg_bar
;
114 struct pci_endpoint_test_data
{
115 enum pci_barno test_reg_bar
;
120 static inline u32
pci_endpoint_test_readl(struct pci_endpoint_test
*test
,
123 return readl(test
->base
+ offset
);
126 static inline void pci_endpoint_test_writel(struct pci_endpoint_test
*test
,
127 u32 offset
, u32 value
)
129 writel(value
, test
->base
+ offset
);
132 static inline u32
pci_endpoint_test_bar_readl(struct pci_endpoint_test
*test
,
135 return readl(test
->bar
[bar
] + offset
);
138 static inline void pci_endpoint_test_bar_writel(struct pci_endpoint_test
*test
,
139 int bar
, u32 offset
, u32 value
)
141 writel(value
, test
->bar
[bar
] + offset
);
144 static irqreturn_t
pci_endpoint_test_irqhandler(int irq
, void *dev_id
)
146 struct pci_endpoint_test
*test
= dev_id
;
149 reg
= pci_endpoint_test_readl(test
, PCI_ENDPOINT_TEST_STATUS
);
150 if (reg
& STATUS_IRQ_RAISED
) {
151 test
->last_irq
= irq
;
152 complete(&test
->irq_raised
);
153 reg
&= ~STATUS_IRQ_RAISED
;
155 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_STATUS
,
161 static void pci_endpoint_test_free_irq_vectors(struct pci_endpoint_test
*test
)
163 struct pci_dev
*pdev
= test
->pdev
;
165 pci_free_irq_vectors(pdev
);
168 static bool pci_endpoint_test_alloc_irq_vectors(struct pci_endpoint_test
*test
,
172 struct pci_dev
*pdev
= test
->pdev
;
173 struct device
*dev
= &pdev
->dev
;
177 case IRQ_TYPE_LEGACY
:
178 irq
= pci_alloc_irq_vectors(pdev
, 1, 1, PCI_IRQ_LEGACY
);
180 dev_err(dev
, "Failed to get Legacy interrupt\n");
183 irq
= pci_alloc_irq_vectors(pdev
, 1, 32, PCI_IRQ_MSI
);
185 dev_err(dev
, "Failed to get MSI interrupts\n");
188 irq
= pci_alloc_irq_vectors(pdev
, 1, 2048, PCI_IRQ_MSIX
);
190 dev_err(dev
, "Failed to get MSI-X interrupts\n");
193 dev_err(dev
, "Invalid IRQ type selected\n");
200 test
->num_irqs
= irq
;
205 static void pci_endpoint_test_release_irq(struct pci_endpoint_test
*test
)
208 struct pci_dev
*pdev
= test
->pdev
;
209 struct device
*dev
= &pdev
->dev
;
211 for (i
= 0; i
< test
->num_irqs
; i
++)
212 devm_free_irq(dev
, pci_irq_vector(pdev
, i
), test
);
217 static bool pci_endpoint_test_request_irq(struct pci_endpoint_test
*test
)
221 struct pci_dev
*pdev
= test
->pdev
;
222 struct device
*dev
= &pdev
->dev
;
224 for (i
= 0; i
< test
->num_irqs
; i
++) {
225 err
= devm_request_irq(dev
, pci_irq_vector(pdev
, i
),
226 pci_endpoint_test_irqhandler
,
227 IRQF_SHARED
, DRV_MODULE_NAME
, test
);
236 case IRQ_TYPE_LEGACY
:
237 dev_err(dev
, "Failed to request IRQ %d for Legacy\n",
238 pci_irq_vector(pdev
, i
));
241 dev_err(dev
, "Failed to request IRQ %d for MSI %d\n",
242 pci_irq_vector(pdev
, i
),
246 dev_err(dev
, "Failed to request IRQ %d for MSI-X %d\n",
247 pci_irq_vector(pdev
, i
),
255 static bool pci_endpoint_test_bar(struct pci_endpoint_test
*test
,
256 enum pci_barno barno
)
261 struct pci_dev
*pdev
= test
->pdev
;
263 if (!test
->bar
[barno
])
266 size
= pci_resource_len(pdev
, barno
);
268 if (barno
== test
->test_reg_bar
)
271 for (j
= 0; j
< size
; j
+= 4)
272 pci_endpoint_test_bar_writel(test
, barno
, j
, 0xA0A0A0A0);
274 for (j
= 0; j
< size
; j
+= 4) {
275 val
= pci_endpoint_test_bar_readl(test
, barno
, j
);
276 if (val
!= 0xA0A0A0A0)
283 static bool pci_endpoint_test_legacy_irq(struct pci_endpoint_test
*test
)
287 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_TYPE
,
289 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_NUMBER
, 0);
290 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_COMMAND
,
291 COMMAND_RAISE_LEGACY_IRQ
);
292 val
= wait_for_completion_timeout(&test
->irq_raised
,
293 msecs_to_jiffies(1000));
300 static bool pci_endpoint_test_msi_irq(struct pci_endpoint_test
*test
,
301 u16 msi_num
, bool msix
)
304 struct pci_dev
*pdev
= test
->pdev
;
306 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_TYPE
,
307 msix
== false ? IRQ_TYPE_MSI
:
309 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_NUMBER
, msi_num
);
310 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_COMMAND
,
311 msix
== false ? COMMAND_RAISE_MSI_IRQ
:
312 COMMAND_RAISE_MSIX_IRQ
);
313 val
= wait_for_completion_timeout(&test
->irq_raised
,
314 msecs_to_jiffies(1000));
318 if (pci_irq_vector(pdev
, msi_num
- 1) == test
->last_irq
)
324 static bool pci_endpoint_test_copy(struct pci_endpoint_test
*test
, size_t size
)
329 dma_addr_t src_phys_addr
;
330 dma_addr_t dst_phys_addr
;
331 struct pci_dev
*pdev
= test
->pdev
;
332 struct device
*dev
= &pdev
->dev
;
334 dma_addr_t orig_src_phys_addr
;
336 dma_addr_t orig_dst_phys_addr
;
338 size_t alignment
= test
->alignment
;
342 if (size
> SIZE_MAX
- alignment
)
345 if (irq_type
< IRQ_TYPE_LEGACY
|| irq_type
> IRQ_TYPE_MSIX
) {
346 dev_err(dev
, "Invalid IRQ type option\n");
350 orig_src_addr
= dma_alloc_coherent(dev
, size
+ alignment
,
351 &orig_src_phys_addr
, GFP_KERNEL
);
352 if (!orig_src_addr
) {
353 dev_err(dev
, "Failed to allocate source buffer\n");
358 if (alignment
&& !IS_ALIGNED(orig_src_phys_addr
, alignment
)) {
359 src_phys_addr
= PTR_ALIGN(orig_src_phys_addr
, alignment
);
360 offset
= src_phys_addr
- orig_src_phys_addr
;
361 src_addr
= orig_src_addr
+ offset
;
363 src_phys_addr
= orig_src_phys_addr
;
364 src_addr
= orig_src_addr
;
367 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_LOWER_SRC_ADDR
,
368 lower_32_bits(src_phys_addr
));
370 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_UPPER_SRC_ADDR
,
371 upper_32_bits(src_phys_addr
));
373 get_random_bytes(src_addr
, size
);
374 src_crc32
= crc32_le(~0, src_addr
, size
);
376 orig_dst_addr
= dma_alloc_coherent(dev
, size
+ alignment
,
377 &orig_dst_phys_addr
, GFP_KERNEL
);
378 if (!orig_dst_addr
) {
379 dev_err(dev
, "Failed to allocate destination address\n");
381 goto err_orig_src_addr
;
384 if (alignment
&& !IS_ALIGNED(orig_dst_phys_addr
, alignment
)) {
385 dst_phys_addr
= PTR_ALIGN(orig_dst_phys_addr
, alignment
);
386 offset
= dst_phys_addr
- orig_dst_phys_addr
;
387 dst_addr
= orig_dst_addr
+ offset
;
389 dst_phys_addr
= orig_dst_phys_addr
;
390 dst_addr
= orig_dst_addr
;
393 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_LOWER_DST_ADDR
,
394 lower_32_bits(dst_phys_addr
));
395 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_UPPER_DST_ADDR
,
396 upper_32_bits(dst_phys_addr
));
398 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_SIZE
,
401 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_TYPE
, irq_type
);
402 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_NUMBER
, 1);
403 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_COMMAND
,
406 wait_for_completion(&test
->irq_raised
);
408 dst_crc32
= crc32_le(~0, dst_addr
, size
);
409 if (dst_crc32
== src_crc32
)
412 dma_free_coherent(dev
, size
+ alignment
, orig_dst_addr
,
416 dma_free_coherent(dev
, size
+ alignment
, orig_src_addr
,
423 static bool pci_endpoint_test_write(struct pci_endpoint_test
*test
, size_t size
)
428 dma_addr_t phys_addr
;
429 struct pci_dev
*pdev
= test
->pdev
;
430 struct device
*dev
= &pdev
->dev
;
432 dma_addr_t orig_phys_addr
;
434 size_t alignment
= test
->alignment
;
437 if (size
> SIZE_MAX
- alignment
)
440 if (irq_type
< IRQ_TYPE_LEGACY
|| irq_type
> IRQ_TYPE_MSIX
) {
441 dev_err(dev
, "Invalid IRQ type option\n");
445 orig_addr
= dma_alloc_coherent(dev
, size
+ alignment
, &orig_phys_addr
,
448 dev_err(dev
, "Failed to allocate address\n");
453 if (alignment
&& !IS_ALIGNED(orig_phys_addr
, alignment
)) {
454 phys_addr
= PTR_ALIGN(orig_phys_addr
, alignment
);
455 offset
= phys_addr
- orig_phys_addr
;
456 addr
= orig_addr
+ offset
;
458 phys_addr
= orig_phys_addr
;
462 get_random_bytes(addr
, size
);
464 crc32
= crc32_le(~0, addr
, size
);
465 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_CHECKSUM
,
468 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_LOWER_SRC_ADDR
,
469 lower_32_bits(phys_addr
));
470 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_UPPER_SRC_ADDR
,
471 upper_32_bits(phys_addr
));
473 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_SIZE
, size
);
475 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_TYPE
, irq_type
);
476 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_NUMBER
, 1);
477 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_COMMAND
,
480 wait_for_completion(&test
->irq_raised
);
482 reg
= pci_endpoint_test_readl(test
, PCI_ENDPOINT_TEST_STATUS
);
483 if (reg
& STATUS_READ_SUCCESS
)
486 dma_free_coherent(dev
, size
+ alignment
, orig_addr
, orig_phys_addr
);
492 static bool pci_endpoint_test_read(struct pci_endpoint_test
*test
, size_t size
)
496 dma_addr_t phys_addr
;
497 struct pci_dev
*pdev
= test
->pdev
;
498 struct device
*dev
= &pdev
->dev
;
500 dma_addr_t orig_phys_addr
;
502 size_t alignment
= test
->alignment
;
505 if (size
> SIZE_MAX
- alignment
)
508 if (irq_type
< IRQ_TYPE_LEGACY
|| irq_type
> IRQ_TYPE_MSIX
) {
509 dev_err(dev
, "Invalid IRQ type option\n");
513 orig_addr
= dma_alloc_coherent(dev
, size
+ alignment
, &orig_phys_addr
,
516 dev_err(dev
, "Failed to allocate destination address\n");
521 if (alignment
&& !IS_ALIGNED(orig_phys_addr
, alignment
)) {
522 phys_addr
= PTR_ALIGN(orig_phys_addr
, alignment
);
523 offset
= phys_addr
- orig_phys_addr
;
524 addr
= orig_addr
+ offset
;
526 phys_addr
= orig_phys_addr
;
530 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_LOWER_DST_ADDR
,
531 lower_32_bits(phys_addr
));
532 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_UPPER_DST_ADDR
,
533 upper_32_bits(phys_addr
));
535 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_SIZE
, size
);
537 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_TYPE
, irq_type
);
538 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_IRQ_NUMBER
, 1);
539 pci_endpoint_test_writel(test
, PCI_ENDPOINT_TEST_COMMAND
,
542 wait_for_completion(&test
->irq_raised
);
544 crc32
= crc32_le(~0, addr
, size
);
545 if (crc32
== pci_endpoint_test_readl(test
, PCI_ENDPOINT_TEST_CHECKSUM
))
548 dma_free_coherent(dev
, size
+ alignment
, orig_addr
, orig_phys_addr
);
553 static bool pci_endpoint_test_set_irq(struct pci_endpoint_test
*test
,
556 struct pci_dev
*pdev
= test
->pdev
;
557 struct device
*dev
= &pdev
->dev
;
559 if (req_irq_type
< IRQ_TYPE_LEGACY
|| req_irq_type
> IRQ_TYPE_MSIX
) {
560 dev_err(dev
, "Invalid IRQ type option\n");
564 if (irq_type
== req_irq_type
)
567 pci_endpoint_test_release_irq(test
);
568 pci_endpoint_test_free_irq_vectors(test
);
570 if (!pci_endpoint_test_alloc_irq_vectors(test
, req_irq_type
))
573 if (!pci_endpoint_test_request_irq(test
))
576 irq_type
= req_irq_type
;
580 pci_endpoint_test_free_irq_vectors(test
);
581 irq_type
= IRQ_TYPE_UNDEFINED
;
585 static long pci_endpoint_test_ioctl(struct file
*file
, unsigned int cmd
,
590 struct pci_endpoint_test
*test
= to_endpoint_test(file
->private_data
);
592 mutex_lock(&test
->mutex
);
596 if (bar
< 0 || bar
> 5)
598 ret
= pci_endpoint_test_bar(test
, bar
);
600 case PCITEST_LEGACY_IRQ
:
601 ret
= pci_endpoint_test_legacy_irq(test
);
605 ret
= pci_endpoint_test_msi_irq(test
, arg
, cmd
== PCITEST_MSIX
);
608 ret
= pci_endpoint_test_write(test
, arg
);
611 ret
= pci_endpoint_test_read(test
, arg
);
614 ret
= pci_endpoint_test_copy(test
, arg
);
616 case PCITEST_SET_IRQTYPE
:
617 ret
= pci_endpoint_test_set_irq(test
, arg
);
619 case PCITEST_GET_IRQTYPE
:
625 mutex_unlock(&test
->mutex
);
629 static const struct file_operations pci_endpoint_test_fops
= {
630 .owner
= THIS_MODULE
,
631 .unlocked_ioctl
= pci_endpoint_test_ioctl
,
634 static int pci_endpoint_test_probe(struct pci_dev
*pdev
,
635 const struct pci_device_id
*ent
)
642 struct device
*dev
= &pdev
->dev
;
643 struct pci_endpoint_test
*test
;
644 struct pci_endpoint_test_data
*data
;
645 enum pci_barno test_reg_bar
= BAR_0
;
646 struct miscdevice
*misc_device
;
648 if (pci_is_bridge(pdev
))
651 test
= devm_kzalloc(dev
, sizeof(*test
), GFP_KERNEL
);
655 test
->test_reg_bar
= 0;
660 irq_type
= IRQ_TYPE_LEGACY
;
662 data
= (struct pci_endpoint_test_data
*)ent
->driver_data
;
664 test_reg_bar
= data
->test_reg_bar
;
665 test
->alignment
= data
->alignment
;
666 irq_type
= data
->irq_type
;
669 init_completion(&test
->irq_raised
);
670 mutex_init(&test
->mutex
);
672 err
= pci_enable_device(pdev
);
674 dev_err(dev
, "Cannot enable PCI device\n");
678 err
= pci_request_regions(pdev
, DRV_MODULE_NAME
);
680 dev_err(dev
, "Cannot obtain PCI resources\n");
681 goto err_disable_pdev
;
684 pci_set_master(pdev
);
686 if (!pci_endpoint_test_alloc_irq_vectors(test
, irq_type
))
687 goto err_disable_irq
;
689 if (!pci_endpoint_test_request_irq(test
))
690 goto err_disable_irq
;
692 for (bar
= BAR_0
; bar
<= BAR_5
; bar
++) {
693 if (pci_resource_flags(pdev
, bar
) & IORESOURCE_MEM
) {
694 base
= pci_ioremap_bar(pdev
, bar
);
696 dev_err(dev
, "Failed to read BAR%d\n", bar
);
697 WARN_ON(bar
== test_reg_bar
);
699 test
->bar
[bar
] = base
;
703 test
->base
= test
->bar
[test_reg_bar
];
706 dev_err(dev
, "Cannot perform PCI test without BAR%d\n",
711 pci_set_drvdata(pdev
, test
);
713 id
= ida_simple_get(&pci_endpoint_test_ida
, 0, 0, GFP_KERNEL
);
716 dev_err(dev
, "Unable to get id\n");
720 snprintf(name
, sizeof(name
), DRV_MODULE_NAME
".%d", id
);
721 misc_device
= &test
->miscdev
;
722 misc_device
->minor
= MISC_DYNAMIC_MINOR
;
723 misc_device
->name
= kstrdup(name
, GFP_KERNEL
);
724 if (!misc_device
->name
) {
728 misc_device
->fops
= &pci_endpoint_test_fops
,
730 err
= misc_register(misc_device
);
732 dev_err(dev
, "Failed to register device\n");
739 kfree(misc_device
->name
);
742 ida_simple_remove(&pci_endpoint_test_ida
, id
);
745 for (bar
= BAR_0
; bar
<= BAR_5
; bar
++) {
747 pci_iounmap(pdev
, test
->bar
[bar
]);
749 pci_endpoint_test_release_irq(test
);
752 pci_endpoint_test_free_irq_vectors(test
);
753 pci_release_regions(pdev
);
756 pci_disable_device(pdev
);
761 static void pci_endpoint_test_remove(struct pci_dev
*pdev
)
765 struct pci_endpoint_test
*test
= pci_get_drvdata(pdev
);
766 struct miscdevice
*misc_device
= &test
->miscdev
;
768 if (sscanf(misc_device
->name
, DRV_MODULE_NAME
".%d", &id
) != 1)
773 misc_deregister(&test
->miscdev
);
774 kfree(misc_device
->name
);
775 ida_simple_remove(&pci_endpoint_test_ida
, id
);
776 for (bar
= BAR_0
; bar
<= BAR_5
; bar
++) {
778 pci_iounmap(pdev
, test
->bar
[bar
]);
781 pci_endpoint_test_release_irq(test
);
782 pci_endpoint_test_free_irq_vectors(test
);
784 pci_release_regions(pdev
);
785 pci_disable_device(pdev
);
788 static const struct pci_device_id pci_endpoint_test_tbl
[] = {
789 { PCI_DEVICE(PCI_VENDOR_ID_TI
, PCI_DEVICE_ID_TI_DRA74x
) },
790 { PCI_DEVICE(PCI_VENDOR_ID_TI
, PCI_DEVICE_ID_TI_DRA72x
) },
791 { PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS
, 0xedda) },
794 MODULE_DEVICE_TABLE(pci
, pci_endpoint_test_tbl
);
796 static struct pci_driver pci_endpoint_test_driver
= {
797 .name
= DRV_MODULE_NAME
,
798 .id_table
= pci_endpoint_test_tbl
,
799 .probe
= pci_endpoint_test_probe
,
800 .remove
= pci_endpoint_test_remove
,
802 module_pci_driver(pci_endpoint_test_driver
);
804 MODULE_DESCRIPTION("PCI ENDPOINT TEST HOST DRIVER");
805 MODULE_AUTHOR("Kishon Vijay Abraham I <kishon@ti.com>");
806 MODULE_LICENSE("GPL v2");