staging: Driver for Altera PCI Express Chaining DMA reference design"
PATCH v3 1/1 staging: Driver for Altera PCI Express Chaining DMA reference design"
Altera PCI Express Chaining DMA driver
A reference driver that exercises the Chaining DMA logic reference design generated along the Altera FPGA PCI Express soft or hard core, only if instantiated using the MegaWizard, not the SOPC builder, of Quartus 8.1.
This driver can be used to test the logic instantiation and PCI Express layers and acts as a starting point for driving custom logic connected to the PCI Express End Point Chaining DMA engines.
PATCH v3 has some checkpatch.sh cleanups and adds the TODO file.
drivers/staging/Kconfig +2 -0
@@ -77,4 +77,6 @@ source "drivers/staging/asus_oled/Kconfig" source "drivers/staging/panel/Kconfig" +source "drivers/staging/altpciechdma/Kconfig" + endif # !STAGING_EXCLUDE_BUILD
drivers/staging/Makefile +1 -0
@@ -3,6 +3,7 @@ # fix for build system bug... obj-$(CONFIG_STAGING) += staging.o +obj-$(CONFIG_ALTERA_PCIE_CHDMA) += altpciechdma/ obj-$(CONFIG_ET131X) += et131x/ obj-$(CONFIG_SLICOSS) += slicoss/ obj-$(CONFIG_SXG) += sxg/
drivers/staging/altpciechdma/Kconfig new file +10 -0
@@ -0,0 +1,10 @@ +config ALTERA_PCIE_CHDMA + tristate "Altera PCI Express Chaining DMA driver" + depends on PCI + default N + ---help--- + A reference driver that exercises the Chaining DMA logic reference + design generated along the Altera FPGA PCI Express soft or hard core, + only if instantiated using the MegaWizard, not the SOPC builder, of + Quartus 8.1. +
drivers/staging/altpciechdma/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_ALTERA_PCIE_CHDMA) += altpciechdma.o +
drivers/staging/altpciechdma/TODO new file +15 -0
@@ -0,0 +1,15 @@ +DONE: + - functionality similar to logic testbench + +TODO: + - checkpatch.pl cleanups. + - keep state of DMA engines. + - keep data structure that keeps state of each transfer. + - interrupt handler should iterate over outstanding descriptor tables. + - complete userspace cdev to read/write using the DMA engines. + - split off the DMA support functions in a module, re-usable by custom + drivers. + +Please coordinate work with, and send patches to +Leon Woestenberg <[email protected]> +
drivers/staging/altpciechdma/altpciechdma.c new file +1185 -0
1,185 lines not on this page · raw message
Quoted 7 lines · On Mon, Dec 01, 2008 at 08:45:57AM -0500, [email protected] wrote:
Altera PCI Express Chaining DMA driver
A reference driver that exercises the Chaining DMA logic reference design generated along the Altera FPGA PCI Express soft or hard core, only if instantiated using the MegaWizard, not the SOPC builder, of Quartus 8.1.
Quoted 5 lines
This driver can be used to test the logic instantiation and PCI Express layers and acts as a starting point for driving custom logic connected to the PCI Express End Point Chaining DMA engines.
PATCH v3 has some
checkpatch.shcleanups and adds the TODO file.
I got a build error with this version, and had to remove the #include <byteorder.h> line.
After that, I get the following build warnings:
CC [M] drivers/staging/altpciechdma/altpciechdma.odrivers/staging/altpciechdma/altpciechdma.c: In function ‘dma_test’:drivers/staging/altpciechdma/altpciechdma.c:541: warning: cast from pointer to integer of different size drivers/staging/altpciechdma/altpciechdma.c:548: warning: assignment makes integer from pointer without a cast drivers/staging/altpciechdma/altpciechdma.c: In function ‘probe’:drivers/staging/altpciechdma/altpciechdma.c:803: warning: cast from pointer to integer of different size drivers/staging/altpciechdma/altpciechdma.c:931: warning: label ‘err_rev’ defined but not used drivers/staging/altpciechdma/altpciechdma.c:914: warning: label ‘err_cdev’ defined but not used drivers/staging/altpciechdma/altpciechdma.c: At top level:drivers/staging/altpciechdma/altpciechdma.c:416: warning: ‘ape_sg_to_chdma_table’ defined but not used
Also, sparse spits out a lot of warnings as well.
Care to send me a follow-on patch to fix these up?
thanks,
greg k-h