#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/autoconf.h>
#include <asm/system.h>
#include <asm/arch/memmap.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/delay.h>
#include <asm/uaccess.h>
#include <asm/elphel/driver_numbers.h>
#include <asm/elphel/fpgaconfa.h>
#include <asm/elphel/c313a.h>
#include "fpgactrl.h"
#include "fpga_io.h"
#include "fpga_sdram.h"
#include "x3x3.h"
Include dependency graph for fpgactrl.c:
Go to the source code of this file.
Defines | |
#define | ELPHEL_DEBUG_THIS 0 |
#define | D1(x) |
#define | MD1(x) |
#define | MDD1(x) |
#define | D1I(x) x |
#define | FPGA_MODULE_DESCRIPTION "FPGA control driver for Elphel (R) Model 353 camera" |
#define | FPGA_DRIVER_NAME "fpga_control" |
#define | FPGA_MAXMINOR 10 |
Functions | |
static int | fpga_open (struct inode *inode, struct file *filp) |
static int | fpga_release (struct inode *inode, struct file *filp) |
static int | fpga_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) |
static ssize_t | fpga_write (struct file *file, const char *buf, size_t count, loff_t *off) |
static loff_t | fpga_lseek (struct file *file, loff_t offset, int orig) |
static ssize_t | fpga_read (struct file *file, char *buf, size_t count, loff_t *off) |
void | init_elphel_ioremap (void) |
static int __init | fpga_init (void) |
module_init (fpga_init) | |
MODULE_LICENSE ("GPL") | |
MODULE_AUTHOR ("Andrey Filippov <andrey@elphel.com>.") | |
MODULE_DESCRIPTION (FPGA_MODULE_DESCRIPTION) | |
Variables | |
static const char | fpga_name [] = "fpga_control" |
static int | minors [FPGA_MAXMINOR+1] |
static struct file_operations | fpga_fops |
#define D1 | ( | x | ) |
Definition at line 95 of file fpgactrl.c.
Definition at line 99 of file fpgactrl.c.
Referenced by get_qtable(), init_qtable_fpga(), init_qtable_head_cache(), set_gamma_table(), set_qtable_fpga(), setFramePar(), setFramePars(), and setFrameParsAtomic().
#define ELPHEL_DEBUG_THIS 0 |
*************************************************************************** ! FILE NAME : fpgactrl353.c ! DESCRIPTION: Provides sensor-independent access to FPGA in Elphel mModel 353 camera ! Includes I/O for the dedicated (to FPGA) DDR SDRAM ! Copyright 2002-2007 (C) Elphel, Inc. ! -----------------------------------------------------------------------------** ! ! 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 version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** !
Definition at line 87 of file fpgactrl.c.
#define FPGA_DRIVER_NAME "fpga_control" |
#define FPGA_MAXMINOR 10 |
#define FPGA_MODULE_DESCRIPTION "FPGA control driver for Elphel (R) Model 353 camera" |
#define MD1 | ( | x | ) |
Definition at line 97 of file fpgactrl.c.
#define MDD1 | ( | x | ) |
static int __init fpga_init | ( | void | ) | [static] |
Definition at line 251 of file fpgactrl.c.
References FPGA_DRIVER_NAME, fpga_fops, FPGA_MAJOR, FPGA_MAXMINOR, fpga_name, fpga_state, init_elphel_ioremap(), KERN_ERR, minors, and printk.
static int fpga_ioctl | ( | struct inode * | inode, | |
struct file * | filp, | |||
unsigned int | cmd, | |||
unsigned long | arg | |||
) | [static] |
Definition at line 190 of file fpgactrl.c.
References D1, fpga_io_ioctl(), fpga_state, FPGACONF_GETSTATE, FPGACONF_MINOR_IORW, and printk.
static loff_t fpga_lseek | ( | struct file * | file, | |
loff_t | offset, | |||
int | orig | |||
) | [static] |
Definition at line 218 of file fpgactrl.c.
References D1, fpga_io_lseek(), fpga_io_table_lseek(), FPGACONF_MINOR_IORW, FPGACONF_MINOR_SDRAM, FPGACONF_MINOR_TABLES, fsdram_lseek(), and printk.
static int fpga_open | ( | struct inode * | inode, | |
struct file * | filp | |||
) | [static] |
Definition at line 134 of file fpgactrl.c.
References D1, fpga_initSDRAM(), fpga_state, FPGA_STATE_CLOCKS, FPGA_STATE_LOADED, FPGA_STATE_SDRAM_INIT, FPGACONF_MINOR_IORW, FPGACONF_MINOR_SDRAM, FPGACONF_MINOR_TABLES, fsdram_open(), MD1, minors, printk, and X313_IS_SDRAM_ON.
static ssize_t fpga_read | ( | struct file * | file, | |
char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) | [static] |
Definition at line 228 of file fpgactrl.c.
References fpga_io_read(), FPGACONF_MINOR_IORW, FPGACONF_MINOR_SDRAM, and fsdram_read().
static int fpga_release | ( | struct inode * | inode, | |
struct file * | filp | |||
) | [static] |
Definition at line 170 of file fpgactrl.c.
References D1, FPGACONF_MINOR_IORW, FPGACONF_MINOR_SDRAM, FPGACONF_MINOR_TABLES, fsdram_release(), minors, and printk.
static ssize_t fpga_write | ( | struct file * | file, | |
const char * | buf, | |||
size_t | count, | |||
loff_t * | off | |||
) | [static] |
Definition at line 208 of file fpgactrl.c.
References D1, fpga_io_table_write(), fpga_io_write(), FPGACONF_MINOR_IORW, FPGACONF_MINOR_SDRAM, FPGACONF_MINOR_TABLES, fsdram_write(), and printk.
void init_elphel_ioremap | ( | void | ) |
Definition at line 239 of file fpgactrl.c.
References FPGA_MODULE_DESCRIPTION, ioremap, port_csp0_addr, port_csp4_addr, and printk.
Referenced by fpga_init().
MODULE_AUTHOR | ( | "Andrey Filippov <andrey@elphel.com>." | ) |
MODULE_DESCRIPTION | ( | FPGA_MODULE_DESCRIPTION | ) |
module_init | ( | fpga_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |
struct file_operations fpga_fops [static] |
Initial value:
{ owner: THIS_MODULE, open: fpga_open, release: fpga_release, ioctl: fpga_ioctl, llseek: fpga_lseek, read: fpga_read, write: fpga_write }
Definition at line 123 of file fpgactrl.c.
Referenced by fpga_init().
const char fpga_name[] = "fpga_control" [static] |
int minors[FPGA_MAXMINOR+1] [static] |
Definition at line 110 of file fpgactrl.c.