Direct DMA
Contents
Direct DMA
This is an implementation of DMA between the FPGA and the main memory of an Elphel 353 camera.
Requirements/preparation
We used the 7.1.7.26 version of the Elphel software. To use this driver you will have to recompile the kernel (and because of this, also reflash the camera), and create a proper device file.
Since we will be using a new device (file in /dev), we'll have to create it as well; but, since the /dev filesystem is read-only, this must be done when creating the camera image (and therefore requires reflashing the camera).
Needless to say, you can recompile the kernel and arrange for the creation of the device at the same time so you will only have to reflash the camera once to apply both changes.
Kernel recompilation
The original Elphel drivers are compiled inside of the kernel (i.e., not as modules). Since they use resources like the interruption line, they must be removed from the kernel, because to do proper DMA we need to be able to handle the interruption issued when the FPGA finishes the data transfer.
To remove these parts, you'll have to edit the file elphel353/os/linux-2.6/arch/cris/arch-v32/drivers/elphel/Makefile so it looks like this obj-$(CONFIG_ETRAX_ELPHEL353) += fpga_common.o obj-$(CONFIG_ETRAX_ELPHEL353) += fpgajtag.o obj-$(CONFIG_ETRAX_ELPHEL353) += fpgaclocks.o obj-$(CONFIG_ETRAX_ELPHEL353) += fpga_sdram.o #obj-$(CONFIG_ETRAX_ELPHEL353) += fpga_io.o #obj-$(CONFIG_ETRAX_ELPHEL353) += fpgactrl.o #obj-$(CONFIG_ETRAX_ELPHEL353) += cc3x3.o #obj-$(CONFIG_ETRAX_ELPHEL353) += cxi2c.o #obj-$(CONFIG_ETRAX_ELPHEL353) += cxsdram.o #obj-$(CONFIG_ETRAX_ELPHEL353) += cxdma.o #obj-$(CONFIG_ETRAX_ELPHEL353) += hist.o #obj-$(CONFIG_ETRAX_ELPHEL353) += ext353.o #obj-$(CONFIG_ETRAX_ELPHEL353) += circbuf.o #obj-$(CONFIG_ETRAX_ELPHEL353) += exif353.o #obj-$(CONFIG_ETRAX_ELPHEL353) += stream.o #obj-$(CONFIG_ETRAX_ELPHEL_MT9X001) += mt9x001.o #obj-$(CONFIG_ETRAX_ELPHEL347) += ???.o #obj-$(CONFIG_ETRAX_ELPHEL_KAI11002) += ???.o #obj-$(CONFIG_ETRAX_ELPHEL_KAI16000) += ???.o