os/linux-2.6-tag--devboard-R2_10-4/arch/cris/arch-v32/drivers/elphel/fpgactrl353.c File Reference

#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 fpgactrl353.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 Documentation

#define D1 ( x   ) 

Definition at line 95 of file fpgactrl353.c.

#define D1I ( x   )     x

Definition at line 99 of file fpgactrl353.c.

#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/>. ! -----------------------------------------------------------------------------** !

Log
fpgactrl353.c,v
! Revision 1.1.1.1 2008/11/27 20:04:00 elphel ! ! ! Revision 1.5 2008/09/22 22:55:48 elphel ! snapshot ! ! Revision 1.4 2008/09/20 00:29:50 elphel ! moved driver major/minor numbers to a single file - include/asm-cris/elphel/driver_numbers.h ! ! Revision 1.3 2008/09/16 00:49:30 elphel ! snapshot ! ! Revision 1.2 2008/09/12 00:23:59 elphel ! removed cc353.c, cc353.h ! ! Revision 1.1.1.1 2007/08/17 10:23:18 elphel ! This is a fresh tree based on elphel353-2.10 ! ! Revision 1.7 2007/08/17 10:23:18 spectr_rain ! switch to GPL3 license ! ! Revision 1.6 2007/07/20 10:17:46 spectr_rain ! *** empty log message *** ! ! Revision 1.2 2007/05/21 17:45:10 elphel ! boundary scan support, added 359/347 detection ! ! Revision 1.1.1.1 2007/02/23 10:11:48 elphel ! initial import into CVS ! ! Revision 1.2 2005/05/10 21:08:49 elphel ! *** empty log message *** !

Definition at line 87 of file fpgactrl353.c.

#define FPGA_DRIVER_NAME   "fpga_control"

Definition at line 104 of file fpgactrl353.c.

#define FPGA_MAXMINOR   10

Definition at line 105 of file fpgactrl353.c.

#define FPGA_MODULE_DESCRIPTION   "FPGA control driver for Elphel (R) Model 353 camera"

Definition at line 103 of file fpgactrl353.c.

#define MD1 ( x   ) 

Definition at line 97 of file fpgactrl353.c.

#define MDD1 ( x   ) 

Definition at line 98 of file fpgactrl353.c.


Function Documentation

static int __init fpga_init ( void   )  [static]

Definition at line 251 of file fpgactrl353.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 fpgactrl353.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 fpgactrl353.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 fpgactrl353.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 fpgactrl353.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 fpgactrl353.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 fpgactrl353.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 fpgactrl353.c.

References FPGA_MODULE_DESCRIPTION, ioremap, port_csp0_addr, port_csp4_addr, and printk.

MODULE_AUTHOR ( "Andrey Filippov <andrey@elphel.com>."   ) 

MODULE_DESCRIPTION ( FPGA_MODULE_DESCRIPTION   ) 

module_init ( fpga_init   ) 

MODULE_LICENSE ( "GPL"   ) 


Variable Documentation

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 fpgactrl353.c.

const char fpga_name[] = "fpga_control" [static]

Definition at line 109 of file fpgactrl353.c.

int minors[FPGA_MAXMINOR+1] [static]

Definition at line 110 of file fpgactrl353.c.


Generated on Fri Nov 28 00:07:57 2008 for elphel by  doxygen 1.5.1