Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
sm_ftl.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/random.h>
#include <linux/hdreg.h>
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/sysfs.h>
#include <linux/bitops.h>
#include <linux/slab.h>
#include <linux/mtd/nand_ecc.h>
#include "nand/sm_common.h"
#include "sm_ftl.h"

Go to the source code of this file.

Data Structures

struct  sm_sysfs_attribute
 

Macros

#define NUM_ATTRIBUTES   1
 
#define SM_CIS_VENDOR_OFFSET   0x59
 

Functions

 module_param (cache_timeout, int, S_IRUGO)
 
 MODULE_PARM_DESC (cache_timeout,"Timeout (in ms) for cache flush (1000 ms default")
 
 module_param (debug, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (debug,"Debug level (0-2)")
 
ssize_t sm_attr_show (struct device *dev, struct device_attribute *attr, char *buf)
 
struct attribute_groupsm_create_sysfs_attributes (struct sm_ftl *ftl)
 
void sm_delete_sysfs_attributes (struct sm_ftl *ftl)
 
int sm_get_media_info (struct sm_ftl *ftl, struct mtd_info *mtd)
 
struct ftl_zonesm_get_zone (struct sm_ftl *ftl, int zone_num)
 
void sm_cache_init (struct sm_ftl *ftl)
 
void sm_cache_put (struct sm_ftl *ftl, char *buffer, int boffset)
 
int sm_cache_get (struct sm_ftl *ftl, char *buffer, int boffset)
 
int sm_cache_flush (struct sm_ftl *ftl)
 
 module_init (sm_module_init)
 
 module_exit (sm_module_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Maxim Levitsky <[email protected]>")
 
 MODULE_DESCRIPTION ("Smartmedia/xD mtd translation layer")
 

Variables

struct workqueue_structcache_flush_workqueue
 

Macro Definition Documentation

#define NUM_ATTRIBUTES   1

Definition at line 55 of file sm_ftl.c.

#define SM_CIS_VENDOR_OFFSET   0x59

Definition at line 56 of file sm_ftl.c.

Function Documentation

MODULE_AUTHOR ( "Maxim Levitsky <[email protected]>"  )
MODULE_DESCRIPTION ( "Smartmedia/xD mtd translation layer"  )
module_exit ( sm_module_exit  )
module_init ( sm_module_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( cache_timeout  ,
int  ,
S_IRUGO   
)
module_param ( debug  ,
int  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( cache_timeout  )
MODULE_PARM_DESC ( debug  ,
"Debug level (0-2)"   
)
ssize_t sm_attr_show ( struct device dev,
struct device_attribute attr,
char buf 
)

Definition at line 44 of file sm_ftl.c.

int sm_cache_flush ( struct sm_ftl ftl)

Definition at line 931 of file sm_ftl.c.

int sm_cache_get ( struct sm_ftl ftl,
char buffer,
int  boffset 
)

Definition at line 920 of file sm_ftl.c.

void sm_cache_init ( struct sm_ftl ftl)

Definition at line 902 of file sm_ftl.c.

void sm_cache_put ( struct sm_ftl ftl,
char buffer,
int  boffset 
)

Definition at line 912 of file sm_ftl.c.

struct attribute_group* sm_create_sysfs_attributes ( struct sm_ftl ftl)
read

Definition at line 57 of file sm_ftl.c.

void sm_delete_sysfs_attributes ( struct sm_ftl ftl)

Definition at line 110 of file sm_ftl.c.

int sm_get_media_info ( struct sm_ftl ftl,
struct mtd_info mtd 
)

Definition at line 574 of file sm_ftl.c.

struct ftl_zone* sm_get_zone ( struct sm_ftl ftl,
int  zone_num 
)
read

Definition at line 881 of file sm_ftl.c.

Variable Documentation

struct workqueue_struct* cache_flush_workqueue

Definition at line 25 of file sm_ftl.c.