os/nandboot-R2_0_4/mtd/mtd.h File Reference

#include <linux/types.h>
#include "mtd-abi.h"

Include dependency graph for mtd.h:

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

Go to the source code of this file.

Data Structures

struct  erase_info
struct  mtd_erase_region_info
struct  mtd_info
struct  mtd_notifier

Defines

#define MTD_CHAR_MAJOR   90
#define MTD_BLOCK_MAJOR   31
#define MAX_MTD_DEVICES   16
#define MTD_ERASE_PENDING   0x01
#define MTD_ERASING   0x02
#define MTD_ERASE_SUSPEND   0x04
#define MTD_ERASE_DONE   0x08
#define MTD_ERASE_FAILED   0x10
#define MTD_PROGREGION_SIZE(mtd)   (mtd)->oobblock
#define MTD_PROGREGION_CTRLMODE_VALID(mtd)   (mtd)->oobsize
#define MTD_PROGREGION_CTRLMODE_INVALID(mtd)   (mtd)->ecctype
#define MTD_ERASE(mtd, args...)   (*(mtd->erase))(mtd, args)
#define MTD_POINT(mtd, a, b, c, d)   (*(mtd->point))(mtd, a,b,c, (u_char **)(d))
#define MTD_UNPOINT(mtd, arg)   (*(mtd->unpoint))(mtd, (u_char *)arg)
#define MTD_READ(mtd, args...)   (*(mtd->read))(mtd, args)
#define MTD_WRITE(mtd, args...)   (*(mtd->write))(mtd, args)
#define MTD_READV(mtd, args...)   (*(mtd->readv))(mtd, args)
#define MTD_WRITEV(mtd, args...)   (*(mtd->writev))(mtd, args)
#define MTD_READECC(mtd, args...)   (*(mtd->read_ecc))(mtd, args)
#define MTD_WRITEECC(mtd, args...)   (*(mtd->write_ecc))(mtd, args)
#define MTD_READOOB(mtd, args...)   (*(mtd->read_oob))(mtd, args)
#define MTD_WRITEOOB(mtd, args...)   (*(mtd->write_oob))(mtd, args)
#define MTD_SYNC(mtd)   do { if (mtd->sync) (*(mtd->sync))(mtd); } while (0)
#define MTD_DEBUG_LEVEL0   (0)
#define MTD_DEBUG_LEVEL1   (1)
#define MTD_DEBUG_LEVEL2   (2)
#define MTD_DEBUG_LEVEL3   (3)
#define DEBUG(n, args...)   do { } while(0)

Functions

int add_mtd_device (struct mtd_info *mtd)
int del_mtd_device (struct mtd_info *mtd)
mtd_infoget_mtd_device (struct mtd_info *mtd, int num)
void put_mtd_device (struct mtd_info *mtd)
void register_mtd_user (struct mtd_notifier *new)
int unregister_mtd_user (struct mtd_notifier *old)
int default_mtd_writev (struct mtd_info *mtd, const struct kvec *vecs, unsigned long count, loff_t to, size_t *retlen)
int default_mtd_readv (struct mtd_info *mtd, struct kvec *vecs, unsigned long count, loff_t from, size_t *retlen)
static void mtd_erase_callback (struct erase_info *instr)


Define Documentation

#define DEBUG ( n,
args...   )     do { } while(0)

Definition at line 247 of file mtd.h.

#define MAX_MTD_DEVICES   16

Definition at line 40 of file mtd.h.

#define MTD_BLOCK_MAJOR   31

Definition at line 39 of file mtd.h.

#define MTD_CHAR_MAJOR   90

Definition at line 38 of file mtd.h.

#define MTD_DEBUG_LEVEL0   (0)

Definition at line 235 of file mtd.h.

Referenced by nand_do_read_ecc(), nand_do_write_oob(), nand_erase_nand(), nand_read_oob(), nand_read_raw(), nand_wait(), and nand_write_oob().

#define MTD_DEBUG_LEVEL1   (1)

Definition at line 236 of file mtd.h.

#define MTD_DEBUG_LEVEL2   (2)

Definition at line 237 of file mtd.h.

Referenced by nand_isbad_bbt().

#define MTD_DEBUG_LEVEL3   (3)

Definition at line 238 of file mtd.h.

Referenced by nand_do_read_ecc(), nand_do_read_oob(), nand_do_write_oob(), nand_erase_nand(), nand_read_oob(), and nand_sync().

#define MTD_ERASE ( mtd,
args...   )     (*(mtd->erase))(mtd, args)

Definition at line 208 of file mtd.h.

#define MTD_ERASE_DONE   0x08

Definition at line 45 of file mtd.h.

Referenced by nand_erase_nand().

#define MTD_ERASE_FAILED   0x10

Definition at line 46 of file mtd.h.

Referenced by nand_erase_nand().

#define MTD_ERASE_PENDING   0x01

Definition at line 42 of file mtd.h.

#define MTD_ERASE_SUSPEND   0x04

Definition at line 44 of file mtd.h.

#define MTD_ERASING   0x02

Definition at line 43 of file mtd.h.

Referenced by nand_erase_nand().

#define MTD_POINT ( mtd,
a,
b,
c,
d   )     (*(mtd->point))(mtd, a,b,c, (u_char **)(d))

Definition at line 209 of file mtd.h.

#define MTD_PROGREGION_CTRLMODE_INVALID ( mtd   )     (mtd)->ecctype

Definition at line 97 of file mtd.h.

#define MTD_PROGREGION_CTRLMODE_VALID ( mtd   )     (mtd)->oobsize

Definition at line 96 of file mtd.h.

#define MTD_PROGREGION_SIZE ( mtd   )     (mtd)->oobblock

Definition at line 95 of file mtd.h.

#define MTD_READ ( mtd,
args...   )     (*(mtd->read))(mtd, args)

Definition at line 211 of file mtd.h.

#define MTD_READECC ( mtd,
args...   )     (*(mtd->read_ecc))(mtd, args)

Definition at line 215 of file mtd.h.

#define MTD_READOOB ( mtd,
args...   )     (*(mtd->read_oob))(mtd, args)

Definition at line 217 of file mtd.h.

#define MTD_READV ( mtd,
args...   )     (*(mtd->readv))(mtd, args)

Definition at line 213 of file mtd.h.

#define MTD_SYNC ( mtd   )     do { if (mtd->sync) (*(mtd->sync))(mtd); } while (0)

Definition at line 219 of file mtd.h.

#define MTD_UNPOINT ( mtd,
arg   )     (*(mtd->unpoint))(mtd, (u_char *)arg)

Definition at line 210 of file mtd.h.

#define MTD_WRITE ( mtd,
args...   )     (*(mtd->write))(mtd, args)

Definition at line 212 of file mtd.h.

#define MTD_WRITEECC ( mtd,
args...   )     (*(mtd->write_ecc))(mtd, args)

Definition at line 216 of file mtd.h.

#define MTD_WRITEOOB ( mtd,
args...   )     (*(mtd->write_oob))(mtd, args)

Definition at line 218 of file mtd.h.

#define MTD_WRITEV ( mtd,
args...   )     (*(mtd->writev))(mtd, args)

Definition at line 214 of file mtd.h.


Function Documentation

int add_mtd_device ( struct mtd_info mtd  ) 

Definition at line 30 of file mtd-compat.c.

int default_mtd_readv ( struct mtd_info mtd,
struct kvec vecs,
unsigned long  count,
loff_t  from,
size_t *  retlen 
)

int default_mtd_writev ( struct mtd_info mtd,
const struct kvec vecs,
unsigned long  count,
loff_t  to,
size_t *  retlen 
)

int del_mtd_device ( struct mtd_info mtd  ) 

Definition at line 31 of file mtd-compat.c.

Referenced by nand_release().

struct mtd_info* get_mtd_device ( struct mtd_info mtd,
int  num 
)

Definition at line 33 of file mtd-compat.c.

static void mtd_erase_callback ( struct erase_info instr  )  [inline, static]

Definition at line 225 of file mtd.h.

References erase_info::callback.

Referenced by nand_erase_nand().

void put_mtd_device ( struct mtd_info mtd  ) 

Definition at line 35 of file mtd-compat.c.

void register_mtd_user ( struct mtd_notifier new  ) 

Definition at line 37 of file mtd-compat.c.

int unregister_mtd_user ( struct mtd_notifier old  ) 

Definition at line 38 of file mtd-compat.c.


Generated on Fri Nov 28 00:08:35 2008 for elphel by  doxygen 1.5.1