Hello everyone, This is the third posting of these drivers, taking into account comments from earlier postings. The DMAEngine patches are in mainline now, and therefore are not part of this series anymore. RFCv2 -> RFCv3: - use miscdevice framework (removing the carma class) - add bitfile readback capability to the programmer RFCv1 -> RFCv2: - change comments to kerneldoc format - Kconfig improvements - use the videobuf_dma_sg API in the programmer - updates for Freescale DMAEngine DMA_SLAVE API changes Information about the CARMA board: The CARMA board is essentially an MPC8349EA MDS reference design with a 1GHz ADC and 4 high powered data processing FPGAs connected to the local bus. It is all packed into a compact PCI form factor. It is used at the Owens Valley Radio Observatory as the main component in the correlator system. For more information, see this webpage, maintained by the board's hardware engineer: http://www.mmarray.org/~dwh/carma_board/index.html These drivers are the necessary pieces to get the data processing FPGAs working and producing data. Despite the fact that the hardware is custom and we are the only users, I'd still like to get the drivers upstream. Several people have suggested that this is possible. Some further patches will be forthcoming. I have a driver for the LED subsystem and the PPS subsystem. The LED register layout is expected to change soon, so I won't post the driver until that is finished. The PPS driver will be posted seperately from this patch series; it is very generic. Thanks to everyone who has provided comments on earlier versions! Ira W. Snyder (2): misc: add CARMA DATA-FPGA Access Driver misc: add CARMA DATA-FPGA Programmer support drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/carma/Kconfig | 18 + drivers/misc/carma/Makefile | 2 + drivers/misc/carma/carma-fpga-program.c | 1084 +++++++++++++++++++++++ ...
This adds support for programming the data processing FPGAs on the OVRO CARMA board. These FPGAs have a special programming sequence that requires that we program the Freescale DMA engine, which is only available inside the kernel. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> --- drivers/misc/carma/Kconfig | 9 + drivers/misc/carma/Makefile | 1 + drivers/misc/carma/carma-fpga-program.c | 1084 +++++++++++++++++++++++++++++++ 3 files changed, 1094 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/carma/carma-fpga-program.c diff --git a/drivers/misc/carma/Kconfig b/drivers/misc/carma/Kconfig index 4be183f..e57a9d3 100644 --- a/drivers/misc/carma/Kconfig +++ b/drivers/misc/carma/Kconfig @@ -7,3 +7,12 @@ config CARMA_FPGA Say Y here to include support for communicating with the data processing FPGAs on the OVRO CARMA board. +config CARMA_FPGA_PROGRAM + tristate "CARMA DATA-FPGA Programmer" + depends on FSL_SOC && PPC_83xx && MEDIA_SUPPORT && HAS_DMA && FSL_DMA + select VIDEOBUF_DMA_SG + default n + help + Say Y here to include support for programming the data processing + FPGAs on the OVRO CARMA board. + diff --git a/drivers/misc/carma/Makefile b/drivers/misc/carma/Makefile index 0b69fa7..ff36ac2 100644 --- a/drivers/misc/carma/Makefile +++ b/drivers/misc/carma/Makefile @@ -1 +1,2 @@ obj-$(CONFIG_CARMA_FPGA) += carma-fpga.o +obj-$(CONFIG_CARMA_FPGA_PROGRAM) += carma-fpga-program.o diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c new file mode 100644 index 0000000..ef16cb3 --- /dev/null +++ b/drivers/misc/carma/carma-fpga-program.c @@ -0,0 +1,1084 @@ +/* + * CARMA Board DATA-FPGA Programmer + * + * Copyright (c) 2009-2010 Ira W. Snyder <iws@ovro.caltech.edu> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either ...
This driver allows userspace to access the data processing FPGAs on the OVRO CARMA board. It has two modes of operation: 1) random access This allows users to poke any DATA-FPGA registers by using mmap to map the address region directly into their memory map. 2) correlation dumping When correlating, the DATA-FPGA's have special requirements for getting the data out of their memory before the next correlation. This nominally happens at 64Hz (every 15.625ms). If the data is not dumped before the next correlation, data is lost. The data dumping driver handles buffering up to 1 second worth of correlation data from the FPGAs. This lowers the realtime scheduling requirements for the userspace process reading the device. Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> --- drivers/misc/Kconfig | 1 + drivers/misc/Makefile | 1 + drivers/misc/carma/Kconfig | 9 + drivers/misc/carma/Makefile | 1 + drivers/misc/carma/carma-fpga.c | 1433 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 1445 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/carma/Kconfig create mode 100644 drivers/misc/carma/Makefile create mode 100644 drivers/misc/carma/carma-fpga.c diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 4d073f1..f457f14 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -457,5 +457,6 @@ source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" source "drivers/misc/iwmc3200top/Kconfig" source "drivers/misc/ti-st/Kconfig" +source "drivers/misc/carma/Kconfig" endif # MISC_DEVICES diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 98009cc..2c1610e 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -42,3 +42,4 @@ obj-$(CONFIG_ARM_CHARLCD) += arm-charlcd.o obj-$(CONFIG_PCH_PHUB) += pch_phub.o obj-y += ti-st/ obj-$(CONFIG_AB8500_PWM) += ab8500-pwm.o +obj-y += carma/ diff --git a/drivers/misc/carma/Kconfig ...
