Main Page | Data Structures | File List | Data Fields | Globals

axis_sram.h File Reference


Detailed Description

Shares definitions between smart card code and interrupt code.

Author:
Andrew Roca
Shares definitions between smart card code and interrupt code

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/list.h>
#include <linux/ioport.h>
#include <linux/serial.h>
#include <linux/interrupt.h>
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/mtd/mtd.h>
#include <linux/crypto.h>
#include <asm/uaccess.h>
#include "axis_sram_config.h"
#include "axis.h"
#include "axis_hardware.h"
#include "axis_pci.h"

Include dependency graph for axis_sram.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  access_control_entry
 Associates a bitmask and an address. More...

struct  sram_access_control
 wraps up the data needed to control the Axis read/write enables More...

struct  sram_block
 sram memory control block More...


Defines

#define AXIS_SRAM_ENABLE_OFFSET   (0x0+CONTROL_OFFSET)
#define LONG_SHIFT   4
#define AXIS_READ_ENABLED   (1<<0)
#define AXIS_WRITE_ENABLED   (1<<1)
#define AXIS_AUTO_ACCESS   (1<<2)

Functions

int build_sram_config (struct axis_pci_device_entry *device)
 Read the table defined in sram_config and convert it to a set of memory devices.

void delete_sram_config (struct axis_pci_device_entry *device)
 Removes any SRAM devices created.

void create_proc_sram_entries (struct axis_pci_device_entry *device)
 Creates a /proc directory fills it entries that output the current SRAM configuration.

void delete_proc_sram_entries (struct axis_pci_device_entry *device)
 Deletes the SRAM related entries in the /Proc filesystem.


Variables

sram_config_entry axis_sram_config []
 structure to define SRAM configuration

file_operations ram_file_operations


Define Documentation

#define AXIS_AUTO_ACCESS   (1<<2)
 

#define AXIS_READ_ENABLED   (1<<0)
 

#define AXIS_SRAM_ENABLE_OFFSET   (0x0+CONTROL_OFFSET)
 

#define AXIS_WRITE_ENABLED   (1<<1)
 

#define LONG_SHIFT   4
 


Function Documentation

int build_sram_config struct axis_pci_device_entry device  ) 
 

Read the table defined in sram_config and convert it to a set of memory devices.

Returns:
0 on success
Parameters:
device - hardware master structure

The SRAM configuration is compiled into the axis_sram_config structure this function reads the structure and creates partitions and devices according to the elements found there.

Note at current if more than one MTD device is defined the MTD system seems to cause a kernel panic when the second MTD device is removed this happens in response to a module unload triggered by a rmmod axis command.

Here is the call graph for this function:

void create_proc_sram_entries struct axis_pci_device_entry device  ) 
 

Creates a /proc directory fills it entries that output the current SRAM configuration.

Returns:
none
Parameters:
device - Pointer to the hardware master control block
This function creates a directory entry (under Axis) in the /proc file system and then creates entries in it, one for each SRAM partition defined. Each entry will output data describing the current state of the partition

Here is the call graph for this function:

void delete_proc_sram_entries struct axis_pci_device_entry device  ) 
 

Deletes the SRAM related entries in the /Proc filesystem.

Returns:
none
Parameters:
device - Pointer to the hardware master control block
Deletes the SRAM related entries in the /Proc filesystem

Here is the call graph for this function:

void delete_sram_config struct axis_pci_device_entry device  ) 
 

Removes any SRAM devices created.

Returns:
0 on success
Parameters:
device - hardware master structure

Called if the driver is unloaded this destroys the drivers it created.

Note at current if more than one MTD device is defined the MTD system seems to cause a kernel panic when the second MTD device is removed this happens in response to a module unload triggered by a rmmod axis command.


Variable Documentation

struct sram_config_entry axis_sram_config[]
 

structure to define SRAM configuration

struct file_operations ram_file_operations
 

Defines a table of file operations for an Axis Ram device Users open a generic Axis device if the TYPE part of the minor number is an SRAM device we replace the generic axis file operations structure for the open file with this. (Budget virtual construction??) This way we only need to register one axis device type with the kernel but can still code devices individually


Generated on Fri Jan 28 12:35:33 2005 for Axis Kernel Driver by doxygen 1.3.6