nidas  v1.2-1520
Macros | Functions | Variables
mesa.c File Reference
#include <linux/fs.h>
#include <linux/moduleparam.h>
#include <linux/module.h>
#include <linux/version.h>
#include <asm/io.h>
#include <linux/poll.h>
#include <linux/ioport.h>
#include <linux/cdev.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <nidas/linux/mesa.h>
#include <nidas/linux/ver_macros.h>
#include <nidas/linux/irigclock.h>
#include <nidas/linux/klog.h>
#include <nidas/linux/util.h>
#include <nidas/linux/isa_bus.h>
#include <nidas/linux/Revision.h>

Macros

#define REPO_REVISION   "unknown"
 
#define DEVNAME_MESA   "mesa"
 
#define MESA_CNTR_SAMPLE_QUEUE_SIZE   128
 
#define MESA_RADAR_SAMPLE_QUEUE_SIZE   32
 
#define MESA_P260X_SAMPLE_QUEUE_SIZE   32
 

Functions

 MODULE_AUTHOR ("Mike Spowart <spowart@ucar.edu>")
 
 MODULE_DESCRIPTION ("Mesa ISA driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (REPO_REVISION)
 
 module_param_array (ioport, int, numboards, S_IRUGO)
 
 MODULE_PARM_DESC (ioport,"ISA memory base of each board (default 0x220)")
 
static void read_counter (void *ptr)
 
static void read_radar (void *ptr)
 
static void read_260x (void *ptr)
 
static void outportbwswap (struct MESA_Board *brd, unsigned char thebyte)
 
static int load_start (struct MESA_Board *brd)
 
static int load_finish (struct MESA_Board *brd)
 
static int load_program (struct MESA_Board *brd, struct mesa_prog *buf)
 
static int close_ports (struct MESA_Board *brd)
 
static int mesa_open (struct inode *inode, struct file *filp)
 
static int mesa_release (struct inode *inode, struct file *filp)
 
static int data_ready (struct MESA_Board *brd)
 
static unsigned int mesa_poll (struct file *filp, poll_table *wait)
 
static ssize_t mesa_read (struct file *filp, char __user *buf, size_t count, loff_t *f_pos)
 
static long mesa_ioctl (struct file *filp, unsigned int cmd, unsigned long arg)
 
static void mesa_cleanup (void)
 
static int __init mesa_init (void)
 
 module_init (mesa_init)
 
 module_exit (mesa_cleanup)
 

Variables

static struct MESA_Board * boards = 0
 
static int numboards = 0
 
static unsigned int ioport [MESA_4I34_MAX_NR_DEVS] = { 0x220, 0, 0, 0 }
 
static dev_t mesa_device = MKDEV(0, 0)
 
static struct cdev mesa_cdev
 
static struct class * mesa_class
 
static struct file_operations mesa_fops
 

Macro Definition Documentation

#define DEVNAME_MESA   "mesa"

Referenced by mesa_init().

#define MESA_CNTR_SAMPLE_QUEUE_SIZE   128

Referenced by mesa_ioctl(), and read_counter().

#define MESA_P260X_SAMPLE_QUEUE_SIZE   32

Referenced by mesa_ioctl(), and read_260x().

#define MESA_RADAR_SAMPLE_QUEUE_SIZE   32

Referenced by mesa_ioctl(), and read_radar().

#define REPO_REVISION   "unknown"

Referenced by mesa_init().

Function Documentation

static int close_ports ( struct MESA_Board *  brd)
static
static int data_ready ( struct MESA_Board *  brd)
inlinestatic

Referenced by mesa_poll(), and mesa_read().

static int load_finish ( struct MESA_Board *  brd)
static

Referenced by mesa_ioctl().

static int load_program ( struct MESA_Board *  brd,
struct mesa_prog buf 
)
static
static int load_start ( struct MESA_Board *  brd)
static

Referenced by mesa_ioctl().

static void mesa_cleanup ( void  )
static
static int __init mesa_init ( void  )
static
static long mesa_ioctl ( struct file *  filp,
unsigned int  cmd,
unsigned long  arg 
)
static
static int mesa_open ( struct inode *  inode,
struct file *  filp 
)
static

References boards, MSECS_PER_SEC, and numboards.

static unsigned int mesa_poll ( struct file *  filp,
poll_table *  wait 
)
static

References data_ready().

static ssize_t mesa_read ( struct file *  filp,
char __user *  buf,
size_t  count,
loff_t *  f_pos 
)
static
static int mesa_release ( struct inode *  inode,
struct file *  filp 
)
static

References close_ports().

MODULE_AUTHOR ( "Mike Spowart <spowart@ucar.edu>"  )
MODULE_DESCRIPTION ( "Mesa ISA driver"  )
module_exit ( mesa_cleanup  )
module_init ( mesa_init  )
MODULE_LICENSE ( "GPL"  )
module_param_array ( ioport  ,
int  ,
numboards  ,
S_IRUGO   
)
MODULE_PARM_DESC ( ioport  ,
"ISA memory base of each board (default 0x220)"   
)
MODULE_VERSION ( REPO_REVISION  )
static void outportbwswap ( struct MESA_Board *  brd,
unsigned char  thebyte 
)
static

Referenced by load_program().

static void read_260x ( void *  ptr)
static
static void read_counter ( void *  ptr)
static
static void read_radar ( void *  ptr)
static

Variable Documentation

struct MESA_Board* boards = 0
static

Referenced by mesa_cleanup(), mesa_init(), and mesa_open().

unsigned int ioport[MESA_4I34_MAX_NR_DEVS] = { 0x220, 0, 0, 0 }
static

Referenced by mesa_init().

struct cdev mesa_cdev
static

Referenced by mesa_cleanup(), and mesa_init().

struct class* mesa_class
static

Referenced by mesa_cleanup(), and mesa_init().

dev_t mesa_device = MKDEV(0, 0)
static

Referenced by mesa_cleanup(), and mesa_init().

struct file_operations mesa_fops
static
Initial value:
= {
.owner = THIS_MODULE,
.read = mesa_read,
.poll = mesa_poll,
.open = mesa_open,
.unlocked_ioctl = mesa_ioctl,
.release = mesa_release,
.llseek = no_llseek,
}
static long mesa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
Definition: mesa.c:618
static unsigned int mesa_poll(struct file *filp, poll_table *wait)
Definition: mesa.c:562
static ssize_t mesa_read(struct file *filp, char __user *buf, size_t count, loff_t *f_pos)
Definition: mesa.c:575
static int mesa_release(struct inode *inode, struct file *filp)
Definition: mesa.c:537
static int mesa_open(struct inode *inode, struct file *filp)
Definition: mesa.c:489

Referenced by mesa_init().

int numboards = 0
static

Referenced by mesa_cleanup(), mesa_init(), and mesa_open().