os/linux-2.6-tag--devboard-R2_10-4/arch/cris/arch-v32/drivers/elphel/fpga_sdram353.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/io.h>
#include <asm/irq.h>
#include <asm/delay.h>
#include <asm/uaccess.h>
#include <asm/elphel/c313a.h>
#include <asm/elphel/fpgaconfa.h>
#include "fpgactrl.h"
#include "fpga_sdram.h"
#include "x3x3.h"

Include dependency graph for fpga_sdram353.c:

Go to the source code of this file.

Defines

#define D(x)
#define MD2(x)
#define DEBUG_MODE1

Functions

void fpga_resetSDRAM (void)
void fpga_initSDRAM (void)
int fsdram_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
ssize_t fsdram_read (struct file *file, char *buf, size_t count, loff_t *off)
int read_page_to_buffer (unsigned long sa)
ssize_t fsdram_write (struct file *file, const char *buf, size_t count, loff_t *off)
loff_t fsdram_lseek (struct file *file, loff_t offset, int orig)
int fsdram_open (struct inode *inode, struct file *filp)
int fsdram_release (void)

Variables

static int sdbuf [128]
static char * sdbytebuf = (char *) sdbuf


Define Documentation

#define D ( x   ) 

*************************************************************************** ! FILE NAME : fpga_sdram333.c ! DESCRIPTION: TBD ! Copyright (C) 2002-2006 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
fpga_sdram353.c,v
! Revision 1.1.1.1 2008/11/27 20:04:00 elphel ! ! ! Revision 1.5 2008/10/25 20:01:33 elphel ! just put notes about not using file->f_pos in read() and write() ! ! Revision 1.4 2008/09/22 22:55:48 elphel ! snapshot ! ! Revision 1.3 2008/09/16 00:49:31 elphel ! snapshot ! ! Revision 1.2 2008/06/16 06:51:21 elphel ! work in progress, intermediate commit ! ! 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.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 79 of file fpga_sdram353.c.

#define DEBUG_MODE1

Definition at line 83 of file fpga_sdram353.c.

#define MD2 ( x   ) 

Definition at line 81 of file fpga_sdram353.c.


Function Documentation

void fpga_initSDRAM ( void   ) 

Definition at line 93 of file fpga_sdram353.c.

References fpga_state, FPGA_STATE_SDRAM_INIT, MD2, port_csp0_addr, printk, udelay, X313_SDRAM_OFF, X313_SDRAM_ON, and X313_WA_SD_MANCMD.

void fpga_resetSDRAM ( void   ) 

Definition at line 87 of file fpga_sdram353.c.

References fpga_state, FPGA_STATE_SDRAM_INIT, MD2, printk, and X313_SDRAM_OFF.

int fsdram_ioctl ( struct inode *  inode,
struct file *  file,
unsigned int  cmd,
unsigned long  arg 
)

Definition at line 133 of file fpga_sdram353.c.

loff_t fsdram_lseek ( struct file *  file,
loff_t  offset,
int  orig 
)

Definition at line 273 of file fpga_sdram353.c.

References D, fpga_resetSDRAM(), LSEEK_FSDRAM_RESET, printk, SEEK_CUR, SEEK_END, SEEK_SET, and X313_SDRAM_SIZE.

int fsdram_open ( struct inode *  inode,
struct file *  filp 
)

Definition at line 318 of file fpga_sdram353.c.

References D, fpga_initSDRAM(), printk, X313_IS_SDRAM_ON, and X313_SDRAM_SIZE.

ssize_t fsdram_read ( struct file *  file,
char *  buf,
size_t  count,
loff_t *  off 
)

Definition at line 137 of file fpga_sdram353.c.

References D, port_csp0_addr, port_csp4_addr, printk, sa, sdbuf, sdbytebuf, X313_CHN_EN, X313_INIT_SDCHAN, X313_IS_SDRAM_ON, X313_SDRAM_SIZE, X313_SR, X313_WA_SD_PIOWIN, and X313_WA_SDPIO_NEXT.

int fsdram_release ( void   ) 

Definition at line 330 of file fpga_sdram353.c.

References D, and printk.

ssize_t fsdram_write ( struct file *  file,
const char *  buf,
size_t  count,
loff_t *  off 
)

Definition at line 208 of file fpga_sdram353.c.

References D, fp, port_csp0_addr, printk, read_page_to_buffer(), sa, sdbuf, sdbytebuf, udelay, X313_CHN_EN, X313_INIT_SDCHAN, X313_IS_SDRAM_ON, X313_SDRAM_SIZE, X313_SR, X313_WA_SD_PIOWIN, and X313_WA_SDPIO_NEXT.

int read_page_to_buffer ( unsigned long  sa  ) 

Definition at line 188 of file fpga_sdram353.c.

References D, port_csp4_addr, printk, sdbuf, X313_CHN_DIS, X313_CHN_EN, X313_INIT_SDCHAN, X313_SR, and X313_WA_SD_PIOWIN.


Variable Documentation

int sdbuf[128] [static]

Definition at line 84 of file fpga_sdram353.c.

char* sdbytebuf = (char *) sdbuf [static]

Definition at line 85 of file fpga_sdram353.c.


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