os/linux-2.6-tag--devboard-R2_10-4/arch/cris/arch-v32/drivers/elphel/fpgaconf333.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/svinto.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/delay.h>
#include <asm/uaccess.h>
#include <asm/fpgaconfa.h>
#include "fpgaconf.h"
#include "fpgaconfi2c.h"
#include "fpgajtag.h"
#include "fpga_io.h"
#include "fpga_sdram.h"
#include "x313.h"

Include dependency graph for fpgaconf333.c:

Go to the source code of this file.

Defines

#define D(x)
#define D1(x)
#define FPGA_MAJOR   129
#define MY_MODULE_DESCRIPTION   "Elphel model 313 fpga/clock configuration driver"
#define FPGACONF_DRIVER_NAME   "fpga/clock configuration driver v1.0n"
#define FPGACONF_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)
int initClockDefault (void)
static int __init fpga_init (void)
 module_init (fpga_init)
 MODULE_LICENSE ("GPL")
 MODULE_AUTHOR ("Andrey Filippov <andrey@elphel.com>.")
 MODULE_DESCRIPTION (MY_MODULE_DESCRIPTION)
 MODULE_DESCRIPTION ("Elphel model 333 fpga download driver")

Variables

static const char fpga_name [] = "fpga_loader"
static int minors [FPGACONF_MAXMINOR+1]
static struct file_operations fpga_fops
static int fpga_state = 0


Define Documentation

#define D ( x   ) 

*************************************************************************** ! FILE NAME : fpgaconf333.c ! DESCRIPTION: TBD ! Copyright (C) 2002-2004 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
fpgaconf333.c,v
! 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:45 spectr_rain ! *** empty log message *** ! ! 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 74 of file fpgaconf333.c.

#define D1 ( x   ) 

Definition at line 75 of file fpgaconf333.c.

#define FPGA_MAJOR   129

Definition at line 76 of file fpgaconf333.c.

Referenced by fpga_init().

#define FPGACONF_DRIVER_NAME   "fpga/clock configuration driver v1.0n"

Definition at line 78 of file fpgaconf333.c.

Referenced by fpga_init().

#define FPGACONF_MAXMINOR   10

Definition at line 79 of file fpgaconf333.c.

Referenced by fpga_init().

#define MY_MODULE_DESCRIPTION   "Elphel model 313 fpga/clock configuration driver"

Definition at line 77 of file fpgaconf333.c.


Function Documentation

static int __init fpga_init ( void   )  [static]

Definition at line 331 of file fpgaconf333.c.

References fpga_fops, FPGA_MAJOR, fpga_name, fpga_state, FPGACONF_DRIVER_NAME, FPGACONF_MAXMINOR, initClockDefault(), initPortB(), 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 243 of file fpgaconf333.c.

References D, fi2c_ioctl(), fpga_io_ioctl(), FPGA_JTAG, FPGA_PA_RD, FPGA_PA_WR, FPGA_PGM, FPGA_STAT, fpga_state, FPGACONF_GETSTATE, FPGACONF_MINOR_I2C, FPGACONF_MINOR_IORW, I2C_READREG, I2C_WRITEREG, and printk.

static loff_t fpga_lseek ( struct file *  file,
loff_t  offset,
int  orig 
) [static]

Definition at line 304 of file fpgaconf333.c.

References D, FPGACONF_MINOR_SDRAM, fsdram_lseek(), and printk.

static int fpga_open ( struct inode *  inode,
struct file *  filp 
) [static]

Definition at line 148 of file fpgaconf333.c.

References D, D1, fpga_initSDRAM(), fpga_state, FPGA_STATE_CLOCKS, FPGA_STATE_LOADED, FPGA_STATE_SDRAM_INIT, FPGACONF_MINOR_I2C, FPGACONF_MINOR_IORW, FPGACONF_MINOR_JTAG, FPGACONF_MINOR_SDRAM, fsdram_open(), minors, and printk.

static ssize_t fpga_read ( struct file *  file,
char *  buf,
size_t  count,
loff_t *  off 
) [static]

Definition at line 313 of file fpgaconf333.c.

References FPGACONF_MINOR_SDRAM, and fsdram_read().

static int fpga_release ( struct inode *  inode,
struct file *  filp 
) [static]

Definition at line 212 of file fpgaconf333.c.

References D, fpga_state, FPGA_STATE_INITIALIZED, FPGACONF_MINOR_I2C, FPGACONF_MINOR_IORW, FPGACONF_MINOR_JTAG, FPGACONF_MINOR_SDRAM, 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 294 of file fpgaconf333.c.

References FPGACONF_MINOR_JTAG, FPGACONF_MINOR_SDRAM, and fsdram_write().

int initClockDefault ( void   ) 

Definition at line 110 of file fpgaconf333.c.

References fi2c_writeData(), and fpga_state.

Referenced by fpga_init().

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

MODULE_DESCRIPTION ( "Elphel model 333 fpga download driver  ) 

MODULE_DESCRIPTION ( MY_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 94 of file fpgaconf333.c.

Referenced by fpga_init().

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

Definition at line 80 of file fpgaconf333.c.

Referenced by fpga_init().

int fpga_state = 0 [static]

Definition at line 108 of file fpgaconf333.c.

int minors[FPGACONF_MAXMINOR+1] [static]

Definition at line 81 of file fpgaconf333.c.


Generated on Thu Aug 7 16:20:26 2008 for elphel by  doxygen 1.5.1