nand_chip Struct Reference

#include <nand.h>

Collaboration diagram for nand_chip:

Collaboration graph
[legend]

Data Fields

void __iomem * IO_ADDR_R
void __iomem * IO_ADDR_W
uint8_t(* read_byte )(struct mtd_info *mtd)
u16(* read_word )(struct mtd_info *mtd)
void(* write_buf )(struct mtd_info *mtd, const uint8_t *buf, int len)
void(* read_buf )(struct mtd_info *mtd, uint8_t *buf, int len)
int(* verify_buf )(struct mtd_info *mtd, const uint8_t *buf, int len)
void(* select_chip )(struct mtd_info *mtd, int chip)
int(* block_bad )(struct mtd_info *mtd, loff_t ofs, int getchip)
int(* block_markbad )(struct mtd_info *mtd, loff_t ofs)
void(* cmd_ctrl )(struct mtd_info *mtd, int dat, unsigned int ctrl)
int(* dev_ready )(struct mtd_info *mtd)
void(* cmdfunc )(struct mtd_info *mtd, unsigned command, int column, int page_addr)
int(* waitfunc )(struct mtd_info *mtd, struct nand_chip *this)
void(* erase_cmd )(struct mtd_info *mtd, int page)
int(* scan_bbt )(struct mtd_info *mtd)
int(* errstat )(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page)
int(* write_page )(struct mtd_info *mtd, struct nand_chip *chip, const uint8_t *buf, int page, int cached, int raw)
int chip_delay
unsigned int options
unsigned int full_id
int page_shift
int phys_erase_shift
int bbt_erase_shift
int chip_shift
int numchips
unsigned long chipsize
int pagemask
int pagebuf
int badblockpos
nand_state_t state
uint8_t * oob_poi
nand_hw_controlcontroller
nand_ecclayout * ecclayout
nand_ecc_ctrl ecc
nand_buffersbuffers
nand_hw_control hwcontrol
mtd_oob_ops ops
uint8_t * bbt
nand_bbt_descrbbt_td
nand_bbt_descrbbt_md
nand_bbt_descrbadblock_pattern
void * priv
void __iomem * IO_ADDR_R
void __iomem * IO_ADDR_W
u_char(* read_byte )(struct mtd_info *mtd)
void(* write_byte )(struct mtd_info *mtd, u_char byte)
void(* write_word )(struct mtd_info *mtd, u16 word)
void(* hwcontrol )(struct mtd_info *mtd, int cmd)
int(* calculate_ecc )(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code)
int(* correct_data )(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc)
void(* enable_hwecc )(struct mtd_info *mtd, int mode)
int eccmode
int eccsize
int eccbytes
int eccsteps
spinlock_t chip_lock
wait_queue_head_t wq
u_char * data_buf
u_char * oob_buf
int oobdirty
u_char * data_poi
nand_oobinfoautooob
uint8_t * bbt
nand_bbt_descrbbt_td
nand_bbt_descrbbt_md
nand_bbt_descrbadblock_pattern
nand_hw_controlcontroller
void * priv

Detailed Description

struct nand_chip - NAND Private Flash Chip Data : [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device : [BOARDSPECIFIC] address to write the 8 I/O lines of the flash device : [REPLACEABLE] read one byte from the chip : [REPLACEABLE] read one word from the chip : [REPLACEABLE] write data from the buffer to the chip : [REPLACEABLE] read data from the chip into the buffer : [REPLACEABLE] verify buffer contents against the chip data : [REPLACEABLE] select chip nr : [REPLACEABLE] check, if the block is bad : [REPLACEABLE] mark the block bad : [BOARDSPECIFIC] hardwarespecific funtion for controlling ALE/CLE/nCE. Also used to write command and address : [BOARDSPECIFIC] hardwarespecific function for accesing device ready/busy line If set to NULL no access to ready/busy is available and the ready/busy information is read from the chip status register : [REPLACEABLE] hardwarespecific function for writing commands to the chip : [REPLACEABLE] hardwarespecific function for wait on ready : [BOARDSPECIFIC] ecc control ctructure : buffer structure for read/write : platform-specific hardware control structure : oob operation operands : [INTERN] erase command write function, selectable due to AND support : [REPLACEABLE] function to scan bad block table : [BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR) : [INTERN] wait queue to sleep on if a NAND operation is in progress : [INTERN] the current state of the NAND device : poison value buffer : [INTERN] number of address bits in a page (column address bits) : [INTERN] number of address bits in a physical eraseblock : [INTERN] number of address bits in a bbt entry : [INTERN] number of address bits in one chip : [INTERN] internal buffer for one page + oob : [INTERN] oob buffer for one eraseblock : [INTERN] indicates that oob_buf must be reinitialized : [INTERN] pointer to a data buffer : [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about special functionality. See the defines for further explanation : [INTERN] position of the bad block marker in the oob area : [INTERN] number of physical chips : [INTERN] the size of one chip for multichip arrays : [INTERN] page number mask = number of (pages / chip) - 1 : [INTERN] holds the pagenumber which is currently in data_buf : [REPLACEABLE] the default ecc placement scheme : [INTERN] bad block table pointer : [REPLACEABLE] bad block table descriptor for flash lookup : [REPLACEABLE] bad block table mirror descriptor : [REPLACEABLE] bad block scan pattern used for initial bad block scan : [REPLACEABLE] a pointer to a hardware controller structure which is shared among multiple independend devices : [OPTIONAL] pointer to private chip date : [OPTIONAL] hardware specific function to perform additional error status checks (determine if errors are correctable) : [REPLACEABLE] High-level page write function

Definition at line 361 of file nand.h.


Field Documentation

void __iomem* nand_chip::IO_ADDR_R

Definition at line 362 of file nand.h.

Referenced by crisv32_nand_flash_probe(), nand_read_buf(), nand_read_buf16(), nand_read_byte(), nand_read_byte16(), nand_read_word(), nand_verify_buf(), and nand_verify_buf16().

void __iomem* nand_chip::IO_ADDR_W

Definition at line 363 of file nand.h.

Referenced by crisv32_nand_flash_probe(), nand_write_buf(), and nand_write_buf16().

uint8_t(* nand_chip::read_byte)(struct mtd_info *mtd)

Referenced by nand_block_bad(), nand_check_wp(), nand_command(), nand_command_lp(), nand_get_flash_type(), nand_scan(), nand_scan_ident(), nand_set_defaults(), and nand_wait().

u16(* nand_chip::read_word)(struct mtd_info *mtd)

Referenced by nand_block_bad(), nand_scan(), and nand_set_defaults().

void(* nand_chip::write_buf)(struct mtd_info *mtd, const u_char *buf, int len)

Referenced by nand_scan(), nand_set_defaults(), nand_wait(), nand_write_oob_std(), nand_write_oob_syndrome(), nand_write_page_hwecc(), nand_write_page_raw(), and nand_write_page_syndrome().

void(* nand_chip::read_buf)(struct mtd_info *mtd, u_char *buf, int len)

Referenced by nand_do_read_ecc(), nand_read_oob(), nand_read_oob_std(), nand_read_oob_syndrome(), nand_read_page_hwecc(), nand_read_page_raw(), nand_read_page_syndrome(), nand_read_raw(), nand_scan(), nand_set_defaults(), and nand_wait().

int(* nand_chip::verify_buf)(struct mtd_info *mtd, const u_char *buf, int len)

Referenced by nand_scan(), nand_set_defaults(), nand_wait(), and nand_write_page().

void(* nand_chip::select_chip)(struct mtd_info *mtd, int chip)

Referenced by nand_block_bad(), nand_do_read_ecc(), nand_do_read_oob(), nand_do_read_ops(), nand_do_write_oob(), nand_do_write_ops(), nand_erase_nand(), nand_get_flash_type(), nand_read_oob(), nand_read_raw(), nand_release_device(), nand_scan(), nand_scan_ident(), and nand_set_defaults().

int(* nand_chip::block_bad)(struct mtd_info *mtd, loff_t ofs, int getchip)

Referenced by nand_block_checkbad(), nand_scan(), and nand_set_defaults().

int(* nand_chip::block_markbad)(struct mtd_info *mtd, loff_t ofs)

Referenced by nand_block_markbad(), nand_scan(), and nand_set_defaults().

void(* nand_chip::cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl)

Referenced by crisv32_nand_flash_probe(), nand_command(), nand_command_lp(), and nand_select_chip().

int(* nand_chip::dev_ready)(struct mtd_info *mtd)

Referenced by crisv32_nand_flash_probe(), nand_command(), nand_command_lp(), nand_do_read_oob(), nand_do_read_ops(), nand_read_buf(), nand_read_oob(), nand_read_raw(), nand_wait(), and nand_wait_ready().

void(* nand_chip::cmdfunc)(struct mtd_info *mtd, unsigned command, int column, int page_addr)

Referenced by multi_erase_cmd(), nand_block_bad(), nand_check_wp(), nand_do_read_ecc(), nand_do_read_ops(), nand_do_write_oob(), nand_get_flash_type(), nand_read_oob(), nand_read_oob_std(), nand_read_oob_syndrome(), nand_read_raw(), nand_scan(), nand_scan_ident(), nand_set_defaults(), nand_wait(), nand_write_oob_std(), nand_write_oob_syndrome(), nand_write_page(), and single_erase_cmd().

int(* nand_chip::waitfunc)(struct mtd_info *mtd, struct nand_chip *this, int state)

Referenced by nand_erase_nand(), nand_scan(), nand_set_defaults(), nand_wait(), nand_write_oob_std(), and nand_write_page().

void(* nand_chip::erase_cmd)(struct mtd_info *mtd, int page)

Referenced by nand_erase_nand(), and nand_scan().

int(* nand_chip::scan_bbt)(struct mtd_info *mtd)

Referenced by nand_scan(), and nand_set_defaults().

int(* nand_chip::errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page)

Referenced by nand_erase_nand(), nand_wait(), and nand_write_page().

int(* nand_chip::write_page)(struct mtd_info *mtd, struct nand_chip *chip, const uint8_t *buf, int page, int cached, int raw)

Referenced by nand_do_write_ops(), and nand_scan_tail().

int nand_chip::chip_delay

Definition at line 384 of file nand.h.

Referenced by crisv32_nand_flash_probe(), nand_command(), nand_command_lp(), nand_do_read_oob(), nand_do_read_ops(), nand_read_oob(), nand_read_raw(), nand_scan(), nand_set_defaults(), and nand_wait().

unsigned int nand_chip::options

Definition at line 385 of file nand.h.

Referenced by crisv32_nand_flash_probe(), nand_block_bad(), nand_command(), nand_command_lp(), nand_default_bbt(), nand_default_block_markbad(), nand_do_read_oob(), nand_do_read_ops(), nand_erase_nand(), nand_release(), nand_scan(), nand_scan_ident(), nand_scan_tail(), nand_wait(), and nand_write_page().

unsigned int nand_chip::full_id

Definition at line 386 of file nand.h.

Referenced by nand_get_flash_type().

int nand_chip::page_shift

Definition at line 388 of file nand.h.

Referenced by create_bbt(), nand_block_bad(), nand_do_read_ecc(), nand_do_read_oob(), nand_do_read_ops(), nand_do_write_oob(), nand_do_write_ops(), nand_erase_nand(), nand_read_oob(), nand_read_raw(), nand_scan(), read_bbt(), and search_bbt().

int nand_chip::phys_erase_shift

Definition at line 389 of file nand.h.

Referenced by nand_do_read_ecc(), nand_do_read_oob(), nand_do_read_ops(), nand_do_write_ops(), nand_erase_nand(), nand_read_oob(), nand_read_raw(), and nand_scan().

int nand_chip::bbt_erase_shift

Definition at line 390 of file nand.h.

Referenced by create_bbt(), nand_default_block_markbad(), nand_scan(), read_abs_bbt(), and search_bbt().

int nand_chip::chip_shift

Definition at line 391 of file nand.h.

Referenced by nand_block_bad(), nand_do_read_oob(), nand_do_read_ops(), nand_do_write_oob(), nand_do_write_ops(), nand_erase_nand(), nand_read_oob(), nand_read_raw(), and nand_scan().

int nand_chip::numchips

Definition at line 392 of file nand.h.

Referenced by mark_bbt_region(), nand_erase_nand(), nand_scan(), nand_scan_ident(), read_abs_bbt(), and search_bbt().

unsigned long nand_chip::chipsize

Definition at line 393 of file nand.h.

Referenced by create_bbt(), nand_command(), nand_command_lp(), nand_get_flash_type(), nand_scan(), nand_scan_ident(), read_abs_bbt(), and search_bbt().

int nand_chip::pagemask

Definition at line 394 of file nand.h.

Referenced by nand_block_bad(), nand_do_read_ecc(), nand_do_read_oob(), nand_do_read_ops(), nand_do_write_oob(), nand_do_write_ops(), nand_erase_nand(), nand_read_oob(), and nand_read_raw().

int nand_chip::pagebuf

Definition at line 395 of file nand.h.

Referenced by nand_do_read_ecc(), nand_do_read_ops(), nand_do_write_oob(), nand_do_write_ops(), and nand_erase_nand().

int nand_chip::badblockpos

Definition at line 396 of file nand.h.

Referenced by nand_block_bad(), nand_default_block_markbad(), nand_scan(), and rflflash_dump_oob().

nand_state_t nand_chip::state

Definition at line 398 of file nand.h.

Referenced by nand_get_device(), nand_release_device(), nand_resume(), and nand_wait().

uint8_t* nand_chip::oob_poi

Definition at line 400 of file nand.h.

Referenced by nand_do_read_oob(), nand_do_read_ops(), nand_do_write_oob(), nand_do_write_ops(), nand_fill_oob(), nand_read_oob_std(), nand_read_oob_syndrome(), nand_read_page_hwecc(), nand_read_page_raw(), nand_read_page_swecc(), nand_read_page_syndrome(), nand_transfer_oob(), nand_write_oob_std(), nand_write_oob_syndrome(), nand_write_page_hwecc(), nand_write_page_raw(), nand_write_page_swecc(), and nand_write_page_syndrome().

struct nand_hw_control* nand_chip::controller

Definition at line 401 of file nand.h.

Referenced by nand_get_device(), nand_release_device(), and nand_set_defaults().

struct nand_ecclayout* nand_chip::ecclayout

Definition at line 402 of file nand.h.

struct nand_ecc_ctrl nand_chip::ecc

Definition at line 404 of file nand.h.

Referenced by crisv32_nand_flash_probe(), nand_do_read_ecc(), nand_do_read_oob(), nand_do_read_ops(), nand_do_write_oob(), nand_fill_oob(), nand_read_oob_syndrome(), nand_read_page_hwecc(), nand_read_page_swecc(), nand_read_page_syndrome(), nand_scan_tail(), nand_transfer_oob(), nand_write_oob_syndrome(), nand_write_page(), nand_write_page_hwecc(), nand_write_page_swecc(), and nand_write_page_syndrome().

struct nand_buffers* nand_chip::buffers

Definition at line 405 of file nand.h.

Referenced by nand_do_read_oob(), nand_do_read_ops(), nand_do_write_oob(), nand_do_write_ops(), nand_read_page_hwecc(), nand_read_page_swecc(), nand_release(), nand_scan_tail(), nand_write_page_hwecc(), and nand_write_page_swecc().

struct nand_hw_control nand_chip::hwcontrol

Definition at line 406 of file nand.h.

Referenced by crisv32_nand_flash_probe(), nand_command(), nand_command_lp(), nand_select_chip(), and nand_set_defaults().

struct mtd_oob_ops nand_chip::ops

Definition at line 408 of file nand.h.

Referenced by nand_default_block_markbad(), nand_read(), and nand_write().

uint8_t* nand_chip::bbt

Definition at line 410 of file nand.h.

Referenced by create_bbt(), nand_block_checkbad(), nand_default_block_markbad(), nand_isbad_bbt(), nand_release(), and read_bbt().

struct nand_bbt_descr* nand_chip::bbt_td

Definition at line 411 of file nand.h.

Referenced by nand_default_bbt(), and nand_erase_nand().

struct nand_bbt_descr* nand_chip::bbt_md

Definition at line 412 of file nand.h.

Referenced by nand_default_bbt().

struct nand_bbt_descr* nand_chip::badblock_pattern

Definition at line 414 of file nand.h.

Referenced by nand_default_bbt().

void* nand_chip::priv

Definition at line 416 of file nand.h.

Referenced by get_platform_nandchip().

void __iomem* nand_chip::IO_ADDR_R

Definition at line 335 of file nand.h.

void __iomem* nand_chip::IO_ADDR_W

Definition at line 336 of file nand.h.

u_char(* nand_chip::read_byte)(struct mtd_info *mtd)

void(* nand_chip::write_byte)(struct mtd_info *mtd, u_char byte)

Referenced by nand_command(), nand_command_lp(), and nand_scan().

void(* nand_chip::write_word)(struct mtd_info *mtd, u16 word)

Referenced by nand_scan().

void(* nand_chip::hwcontrol)(struct mtd_info *mtd, int cmd)

int(* nand_chip::calculate_ecc)(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code)

Referenced by nand_do_read_ecc(), nand_scan(), and nand_wait().

int(* nand_chip::correct_data)(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc)

Referenced by nand_do_read_ecc(), and nand_scan().

void(* nand_chip::enable_hwecc)(struct mtd_info *mtd, int mode)

Referenced by nand_do_read_ecc(), and nand_wait().

int nand_chip::eccmode

Definition at line 358 of file nand.h.

Referenced by crisv32_nand_flash_probe(), nand_do_read_ecc(), nand_scan(), and nand_wait().

int nand_chip::eccsize

Definition at line 359 of file nand.h.

Referenced by nand_do_read_ecc(), nand_read_oob_syndrome(), nand_read_page_hwecc(), nand_read_page_swecc(), nand_read_page_syndrome(), nand_scan(), nand_wait(), nand_write_oob_syndrome(), nand_write_page_hwecc(), nand_write_page_swecc(), and nand_write_page_syndrome().

int nand_chip::eccbytes

Definition at line 360 of file nand.h.

Referenced by nand_do_read_ecc(), nand_read_page_hwecc(), nand_read_page_swecc(), nand_read_page_syndrome(), nand_scan(), nand_wait(), nand_write_page_hwecc(), nand_write_page_swecc(), and nand_write_page_syndrome().

int nand_chip::eccsteps

Definition at line 361 of file nand.h.

Referenced by nand_do_read_ecc(), nand_read_page_hwecc(), nand_read_page_swecc(), nand_read_page_syndrome(), nand_wait(), nand_write_page_hwecc(), nand_write_page_swecc(), and nand_write_page_syndrome().

spinlock_t nand_chip::chip_lock

Definition at line 363 of file nand.h.

Referenced by nand_get_device().

wait_queue_head_t nand_chip::wq

Definition at line 364 of file nand.h.

Referenced by nand_get_device().

u_char* nand_chip::data_buf

Definition at line 370 of file nand.h.

Referenced by nand_release(), and nand_scan().

u_char* nand_chip::oob_buf

Definition at line 371 of file nand.h.

Referenced by nand_release(), nand_scan(), and nand_wait().

int nand_chip::oobdirty

Definition at line 372 of file nand.h.

u_char* nand_chip::data_poi

Definition at line 373 of file nand.h.

Referenced by nand_do_read_ecc(), and nand_wait().

struct nand_oobinfo* nand_chip::autooob

Definition at line 380 of file nand.h.

Referenced by nand_do_read_ecc(), and nand_scan().

uint8_t* nand_chip::bbt

Definition at line 381 of file nand.h.

struct nand_bbt_descr* nand_chip::bbt_td

Definition at line 382 of file nand.h.

struct nand_bbt_descr* nand_chip::bbt_md

Definition at line 383 of file nand.h.

struct nand_bbt_descr* nand_chip::badblock_pattern

Definition at line 384 of file nand.h.

struct nand_hw_control* nand_chip::controller

Definition at line 385 of file nand.h.

void* nand_chip::priv

Definition at line 386 of file nand.h.


The documentation for this struct was generated from the following files:
Generated on Fri Nov 28 00:08:49 2008 for elphel by  doxygen 1.5.1