#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_info * | get_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 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_LEVEL2 (2) |
#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_DONE 0x08 |
#define MTD_ERASE_FAILED 0x10 |
#define MTD_ERASING 0x02 |
#define MTD_READECC | ( | mtd, | |||
args... | ) | (*(mtd->read_ecc))(mtd, args) |
#define MTD_READOOB | ( | mtd, | |||
args... | ) | (*(mtd->read_oob))(mtd, args) |
#define MTD_SYNC | ( | mtd | ) | do { if (mtd->sync) (*(mtd->sync))(mtd); } while (0) |
#define MTD_UNPOINT | ( | mtd, | |||
arg | ) | (*(mtd->unpoint))(mtd, (u_char *)arg) |
#define MTD_WRITEECC | ( | mtd, | |||
args... | ) | (*(mtd->write_ecc))(mtd, args) |
#define MTD_WRITEOOB | ( | mtd, | |||
args... | ) | (*(mtd->write_oob))(mtd, args) |
#define MTD_WRITEV | ( | mtd, | |||
args... | ) | (*(mtd->writev))(mtd, args) |
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 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.