os/nandboot-R2_0_4/mtd/nand_base.c File Reference

#include <linux/errno.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include "mtd.h"
#include "nand.h"
#include "nand_ecc.h"
#include "delay.h"

Include dependency graph for nand_base.c:

Go to the source code of this file.

Defines

#define NOTALIGNED(x)   (x & (mtd->oobblock-1)) != 0
#define BBT_PAGE_MASK   0xffffff3f

Functions

static void nand_write_buf (struct mtd_info *mtd, const u_char *buf, int len)
static void nand_read_buf (struct mtd_info *mtd, u_char *buf, int len)
static int nand_verify_buf (struct mtd_info *mtd, const u_char *buf, int len)
static int nand_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
static int nand_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *eccbuf, struct nand_oobinfo *oobsel)
static int nand_read_oob (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
static void nand_sync (struct mtd_info *mtd)
static int nand_get_device (struct nand_chip *this, struct mtd_info *mtd, int new_state)
static void nand_release_device (struct mtd_info *mtd)
static u_char nand_read_byte (struct mtd_info *mtd)
static void nand_write_byte (struct mtd_info *mtd, u_char byte)
static u_char nand_read_byte16 (struct mtd_info *mtd)
static void nand_write_byte16 (struct mtd_info *mtd, u_char byte)
static u16 nand_read_word (struct mtd_info *mtd)
static void nand_write_word (struct mtd_info *mtd, u16 word)
static void nand_select_chip (struct mtd_info *mtd, int chip)
static void nand_write_buf16 (struct mtd_info *mtd, const u_char *buf, int len)
static void nand_read_buf16 (struct mtd_info *mtd, u_char *buf, int len)
static int nand_verify_buf16 (struct mtd_info *mtd, const u_char *buf, int len)
static int nand_block_bad (struct mtd_info *mtd, loff_t ofs, int getchip)
static int nand_block_checkbad (struct mtd_info *mtd, loff_t ofs, int getchip, int allowbbt)
static void nand_wait_ready (struct mtd_info *mtd)
static void nand_command (struct mtd_info *mtd, unsigned command, int column, int page_addr)
static void nand_command_lp (struct mtd_info *mtd, unsigned command, int column, int page_addr)
static int nand_wait (struct mtd_info *mtd, struct nand_chip *this, int state)
int nand_do_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf, u_char *oob_buf, struct nand_oobinfo *oobsel, int flags)
int nand_read_raw (struct mtd_info *mtd, uint8_t *buf, loff_t from, size_t len, size_t ooblen)
static int nand_block_isbad (struct mtd_info *mtd, loff_t ofs)
static int nand_suspend (struct mtd_info *mtd)
static void nand_resume (struct mtd_info *mtd)
int nand_scan (struct mtd_info *mtd, int maxchips)
void nand_release (struct mtd_info *mtd)
 EXPORT_SYMBOL_GPL (nand_scan)
 EXPORT_SYMBOL_GPL (nand_release)
 MODULE_LICENSE ("GPL")
 MODULE_AUTHOR ("Steven J. Hill <sjhill@realitydiluted.com>, Thomas Gleixner <tglx@linutronix.de>")
 MODULE_DESCRIPTION ("Generic NAND flash driver code")

Variables

static struct nand_oobinfo nand_oob_8
static struct nand_oobinfo nand_oob_16
static struct nand_oobinfo nand_oob_64


Define Documentation

#define BBT_PAGE_MASK   0xffffff3f

nand_erase - [MTD Interface] erase block(s) : MTD device structure : erase instruction

Erase one ore more blocks

Definition at line 2142 of file nand_base.c.

#define NOTALIGNED ( x   )     (x & (mtd->oobblock-1)) != 0

nand_prepare_oobbuf - [GENERIC] Prepare the out of band buffer : MTD device structure : buffer given by fs driver : out of band selection structre : 1 = place given buffer into the oob bytes : number of pages to prepare

Return: 1. Filesystem buffer available and autoplacement is off, return filesystem buffer 2. No filesystem buffer or autoplace is off, return internal buffer 3. Filesystem buffer is given and autoplace selected put data from fs buffer into internal buffer and retrun internal buffer

Note: The internal buffer is filled with 0xff. This must be done only once, when no autoplacement happens Autoplacement sets the buffer dirty flag, which forces the 0xff fill before using the buffer again.

Definition at line 1620 of file nand_base.c.


Function Documentation

EXPORT_SYMBOL_GPL ( nand_release   ) 

EXPORT_SYMBOL_GPL ( nand_scan   ) 

MODULE_AUTHOR ( "Steven J. Hill <sjhill@realitydiluted.com>  ,
Thomas Gleixner< tglx @linutronix.de >"   
)

MODULE_DESCRIPTION ( "Generic NAND flash driver code"   ) 

MODULE_LICENSE ( "GPL"   ) 

static int nand_block_bad ( struct mtd_info mtd,
loff_t  ofs,
int  getchip 
) [static]

nand_block_bad - [DEFAULT] Read bad block marker from the chip : MTD device structure : offset from device start : 0, if the chip is already selected

Check, if the block is bad.

Definition at line 441 of file nand_base.c.

References nand_chip::cmdfunc, cpu_to_le16, FL_READING, int, NAND_BUSWIDTH_16, NAND_CMD_READOOB, nand_get_device(), nand_release_device(), mtd_info::priv, and nand_chip::select_chip.

static int nand_block_checkbad ( struct mtd_info mtd,
loff_t  ofs,
int  getchip,
int  allowbbt 
) [static]

nand_block_checkbad - [GENERIC] Check if a block is marked bad : MTD device structure : offset from device start : 0, if the chip is already selected : 1, if its allowed to access the bbt area

Check, if the block is bad. Either by reading the bad block table or calling of the scan function.

Definition at line 538 of file nand_base.c.

References nand_chip::block_bad, nand_isbad_bbt(), and mtd_info::priv.

static int nand_block_isbad ( struct mtd_info mtd,
loff_t  ofs 
) [static]

nand_block_isbad - [MTD Interface] Check whether the block at the given offset is bad : MTD device structure : offset relative to mtd start

Definition at line 2326 of file nand_base.c.

References nand_block_checkbad(), and mtd_info::size.

static void nand_command ( struct mtd_info mtd,
unsigned  command,
int  column,
int  page_addr 
) [static]

nand_command - [DEFAULT] Send command to NAND device : MTD device structure : the command to be sent : the column address for this command, -1 if none : the page address for this command, -1 if none

Send command to NAND device. This function is used for small page devices (256/512 Bytes per page)

Definition at line 576 of file nand_base.c.

References nand_chip::hwcontrol, NAND_BUSWIDTH_16, NAND_CMD_ERASE1, NAND_CMD_ERASE2, NAND_CMD_PAGEPROG, NAND_CMD_READ0, NAND_CMD_READ1, NAND_CMD_READOOB, NAND_CMD_RESET, NAND_CMD_SEQIN, NAND_CMD_STATUS, NAND_CTL_CLRALE, NAND_CTL_CLRCLE, NAND_CTL_SETALE, NAND_CTL_SETCLE, NAND_STATUS_READY, nand_wait_ready(), ndelay, mtd_info::oobblock, mtd_info::priv, udelay, and nand_chip::write_byte.

static void nand_command_lp ( struct mtd_info mtd,
unsigned  command,
int  column,
int  page_addr 
) [static]

nand_command_lp - [DEFAULT] Send command to NAND large page device : MTD device structure : the command to be sent : the column address for this command, -1 if none : the page address for this command, -1 if none

Send command to NAND device. This is the version for the new large page devices We dont have the seperate regions as we have in the small page devices. We must emulate NAND_CMD_READOOB to keep the code compatible.

Definition at line 680 of file nand_base.c.

References nand_chip::hwcontrol, NAND_BUSWIDTH_16, NAND_CMD_CACHEDPROG, NAND_CMD_DEPLETE1, NAND_CMD_ERASE1, NAND_CMD_ERASE2, NAND_CMD_PAGEPROG, NAND_CMD_READ0, NAND_CMD_READOOB, NAND_CMD_READSTART, NAND_CMD_RESET, NAND_CMD_SEQIN, NAND_CMD_STATUS, NAND_CMD_STATUS_ERROR, NAND_CMD_STATUS_ERROR0, NAND_CMD_STATUS_ERROR1, NAND_CMD_STATUS_ERROR2, NAND_CMD_STATUS_ERROR3, NAND_CTL_CLRALE, NAND_CTL_CLRCLE, NAND_CTL_SETALE, NAND_CTL_SETCLE, NAND_STATUS_READY, nand_wait_ready(), ndelay, mtd_info::oobblock, mtd_info::priv, udelay, and nand_chip::write_byte.

int nand_do_read_ecc ( struct mtd_info mtd,
loff_t  from,
size_t  len,
size_t *  retlen,
u_char *  buf,
u_char *  oob_buf,
struct nand_oobinfo oobsel,
int  flags 
)

nand_do_read_ecc - [MTD Interface] Read data with ECC : MTD device structure : offset to read from : number of bytes to read : pointer to variable to store the number of read bytes : the databuffer to put data : filesystem supplied oob data buffer (can be NULL) : oob selection structure : flag to indicate if nand_get_device/nand_release_device should be preformed and how many corrected error bits are acceptable: bits 0..7 - number of tolerable errors bit 8 - 0 == do not get/release chip, 1 == get/release chip

NAND read with ECC

Definition at line 1148 of file nand_base.c.

References nand_chip::autooob, nand_chip::calculate_ecc, nand_chip::cmdfunc, nand_chip::correct_data, data_buf, nand_chip::data_poi, DEBUG, nand_chip::ecc, nand_oobinfo::eccbytes, nand_oobinfo::eccpos, nand_chip::eccsize, nand_chip::enable_hwecc, FL_READING, HZ, jiffies, KERN_WARNING, memcpy(), MTD_DEBUG_LEVEL0, MTD_DEBUG_LEVEL3, MTD_NANDECC_AUTOPL_USR, MTD_NANDECC_AUTOPLACE, MTD_NANDECC_PLACE, NAND_CANAUTOINCR, NAND_CMD_READ0, NAND_ECC_NONE, NAND_ECC_READ, NAND_ECC_READSYN, NAND_ECC_SOFT, nand_get_device(), NAND_GET_DEVICE, NAND_HWECC_SYNDROME, nand_release_device(), nand_wait_ready(), num, mtd_info::oobblock, nand_oobinfo::oobfree, mtd_info::oobsize, nand_chip::page_shift, nand_chip::pagebuf, nand_chip::pagemask, nand_chip::phys_erase_shift, printk, mtd_info::priv, read, nand_chip::read_buf, nand_chip::select_chip, mtd_info::size, udelay, and nand_oobinfo::useecc.

static int nand_get_device ( struct nand_chip this,
struct mtd_info mtd,
int  new_state 
) [static]

nand_get_device - [GENERIC] Get chip for selected access : the nand chip descriptor : MTD device structure : the state which is requested

Get the device and lock it for exclusive access

Definition at line 792 of file nand_base.c.

References nand_hw_control::active, add_wait_queue, nand_chip::chip_lock, nand_chip::controller, DECLARE_WAITQUEUE, FL_PM_SUSPENDED, FL_READY, nand_hw_control::lock, remove_wait_queue, schedule, set_current_state, spin_lock, spin_unlock, spinlock_t, state, nand_chip::state, TASK_UNINTERRUPTIBLE, wait_queue_head_t, nand_hw_control::wq, and nand_chip::wq.

static int nand_read ( struct mtd_info mtd,
loff_t  from,
size_t  len,
size_t *  retlen,
u_char *  buf 
) [static]

nand_read - [MTD Interface] MTD compability function for nand_do_read_ecc : MTD device structure : offset to read from : number of bytes to read : pointer to variable to store the number of read bytes : the databuffer to put data

This function simply calls nand_do_read_ecc with oob buffer and oobsel = NULL and flags = 0xff

Definition at line 1104 of file nand_base.c.

References nand_do_read_ecc(), and mtd_info::oobinfo.

static void nand_read_buf ( struct mtd_info mtd,
u_char *  buf,
int  len 
) [static]

nand_read_buf - [DEFAULT] read chip data into buffer : MTD device structure : buffer to store date : number of bytes to read

Default read function for 8bit buswith

Definition at line 343 of file nand_base.c.

References mtd_info::priv, and readb().

static void nand_read_buf16 ( struct mtd_info mtd,
u_char *  buf,
int  len 
) [static]

nand_read_buf16 - [DEFAULT] read chip data into buffer : MTD device structure : buffer to store date : number of bytes to read

Default read function for 16bit buswith

Definition at line 400 of file nand_base.c.

References mtd_info::priv, and readw().

static u_char nand_read_byte ( struct mtd_info mtd  )  [static]

nand_read_byte - [DEFAULT] read one byte from the chip : MTD device structure

Default read function for 8bit buswith

Definition at line 222 of file nand_base.c.

References mtd_info::priv, and readb().

static u_char nand_read_byte16 ( struct mtd_info mtd  )  [static]

nand_read_byte16 - [DEFAULT] read one byte endianess aware from the chip : MTD device structure

Default read function for 16bit buswith with endianess conversion

Definition at line 248 of file nand_base.c.

References cpu_to_le16, mtd_info::priv, and readw().

static int nand_read_ecc ( struct mtd_info mtd,
loff_t  from,
size_t  len,
size_t *  retlen,
u_char *  buf,
u_char *  oob_buf,
struct nand_oobinfo oobsel 
) [static]

nand_read_ecc - [MTD Interface] MTD compability function for nand_do_read_ecc : MTD device structure : offset to read from : number of bytes to read : pointer to variable to store the number of read bytes : the databuffer to put data : filesystem supplied oob data buffer : oob selection structure

This function simply calls nand_do_read_ecc with flags = 0xff

Definition at line 1122 of file nand_base.c.

References nand_do_read_ecc(), and mtd_info::oobinfo.

static int nand_read_oob ( struct mtd_info mtd,
loff_t  from,
size_t  len,
size_t *  retlen,
u_char *  buf 
) [static]

nand_read_oob - [MTD Interface] NAND read out-of-band : MTD device structure : offset to read from : number of bytes to read : pointer to variable to store the number of read bytes : the databuffer to put data

NAND read out-of-band data from the spare area

Definition at line 1413 of file nand_base.c.

References nand_chip::chip_delay, nand_chip::chip_shift, nand_chip::cmdfunc, DEBUG, nand_chip::dev_ready, FL_READING, min_t, MTD_DEBUG_LEVEL0, MTD_DEBUG_LEVEL3, NAND_CANAUTOINCR, NAND_CMD_READOOB, nand_get_device(), nand_release_device(), nand_wait_ready(), mtd_info::oobsize, nand_chip::page_shift, nand_chip::pagemask, nand_chip::phys_erase_shift, mtd_info::priv, nand_chip::read_buf, nand_chip::select_chip, mtd_info::size, and udelay.

int nand_read_raw ( struct mtd_info mtd,
uint8_t *  buf,
loff_t  from,
size_t  len,
size_t  ooblen 
)

nand_read_raw - [GENERIC] Read raw data including oob into buffer : MTD device structure : temporary buffer : offset to read from : number of bytes to read : number of oob data bytes to read

Read raw data including oob into buffer

Definition at line 1507 of file nand_base.c.

References nand_chip::chip_delay, nand_chip::chip_shift, nand_chip::cmdfunc, DEBUG, nand_chip::dev_ready, FL_READING, int, MTD_DEBUG_LEVEL0, NAND_CANAUTOINCR, NAND_CMD_READ0, nand_get_device(), nand_release_device(), nand_wait_ready(), mtd_info::oobblock, mtd_info::oobsize, nand_chip::page_shift, nand_chip::pagemask, nand_chip::phys_erase_shift, mtd_info::priv, nand_chip::read_buf, nand_chip::select_chip, mtd_info::size, and udelay.

static u16 nand_read_word ( struct mtd_info mtd  )  [static]

nand_read_word - [DEFAULT] read one word from the chip : MTD device structure

Default read function for 16bit buswith without endianess conversion

Definition at line 275 of file nand_base.c.

References mtd_info::priv, and readw().

void nand_release ( struct mtd_info mtd  ) 

nand_release - [NAND Interface] Free resources held by the NAND device : MTD device structure

Definition at line 2783 of file nand_base.c.

References nand_chip::bbt, nand_chip::buffers, nand_chip::data_buf, del_mtd_device(), kfree, NAND_DATABUF_ALLOC, NAND_OOBBUF_ALLOC, NAND_OWN_BUFFERS, nand_chip::oob_buf, nand_chip::options, and mtd_info::priv.

static void nand_release_device ( struct mtd_info mtd  )  [static]

nand_release_device - [GENERIC] release chip : MTD device structure

Deselect, release chip lock and wake up anyone waiting on the device

Definition at line 193 of file nand_base.c.

References nand_hw_control::active, nand_chip::controller, FL_READY, mtd_info::priv, nand_chip::select_chip, spin_lock, spin_unlock, state, and wake_up.

static void nand_resume ( struct mtd_info mtd  )  [static]

nand_resume - [MTD Interface] Resume the NAND flash : MTD device structure

Definition at line 2372 of file nand_base.c.

References FL_PM_SUSPENDED, KERN_ERR, nand_release_device(), printk, mtd_info::priv, and nand_chip::state.

int nand_scan ( struct mtd_info mtd,
int  maxchips 
)

nand_scan - [NAND Interface] Scan for the NAND device : MTD device structure : Number of chips to scan for

This fills out all the not initialized function pointers with the defaults. The flash ID is read and the mtd/chip structures are filled with the appropriate values. Buffers are allocated if they are not provided by the board driver

Definition at line 2397 of file nand_base.c.

References nand_chip::autooob, nand_chip::badblockpos, nand_chip::bbt_erase_shift, nand_chip::block_bad, nand_chip::block_markbad, BUG, nand_chip::calculate_ecc, nand_chip::chip_delay, nand_chip::chip_shift, nand_flash_dev::chipsize, nand_chip::chipsize, nand_chip::cmdfunc, nand_chip::correct_data, data_buf, nand_chip::data_buf, nand_chip::eccbytes, nand_chip::eccmode, nand_chip::eccsize, nand_chip::erase_cmd, nand_flash_dev::erasesize, mtd_info::erasesize, GFP_KERNEL, nand_manufacturers::id, KERN_ERR, KERN_INFO, KERN_WARNING, kfree, kmalloc, memset(), multi_erase_cmd(), name, mtd_info::name, nand_flash_dev::name, NAND_4PAGE_ARRAY, nand_block_bad(), NAND_BUSWIDTH_16, nand_calculate_ecc(), NAND_CHIPOPTIONS_MSK, NAND_CMD_READID, nand_command(), nand_command_lp(), nand_correct_data(), NAND_DATABUF_ALLOC, nand_default_bbt(), nand_default_block_markbad, NAND_ECC_HW12_2048, NAND_ECC_SOFT, nand_flash_ids, NAND_HWECC_SUPPORT, NAND_LARGE_BADBLOCK_POS, nand_manuf_ids, NAND_MFR_SAMSUNG, NAND_NO_AUTOINCR, nand_oob_16, nand_oob_64, nand_oob_8, NAND_OOBBUF_ALLOC, nand_read_buf(), nand_read_buf16(), nand_read_byte(), nand_read_byte16(), nand_read_word(), NAND_SAMSUNG_LP_OPTIONS, nand_select_chip(), NAND_SMALL_BADBLOCK_POS, nand_verify_buf(), nand_verify_buf16(), nand_wait(), nand_write_buf(), nand_write_buf16(), nand_write_byte(), nand_write_byte16(), nand_write_word(), nand_chip::numchips, nand_chip::oob_buf, mtd_info::oobavail, mtd_info::oobblock, nand_oobinfo::oobfree, mtd_info::oobsize, nand_flash_dev::options, nand_chip::options, nand_chip::page_shift, nand_flash_dev::pagesize, nand_chip::phys_erase_shift, printk, mtd_info::priv, putnl(), puts(), putx(), nand_chip::read_buf, nand_chip::read_byte, nand_chip::read_word, nand_chip::scan_bbt, nand_chip::select_chip, single_erase_cmd(), mtd_info::size, nand_chip::verify_buf, nand_chip::waitfunc, nand_chip::write_buf, nand_chip::write_byte, and nand_chip::write_word.

static void nand_select_chip ( struct mtd_info mtd,
int  chip 
) [static]

nand_select_chip - [DEFAULT] control CE line : MTD device structure : chipnumber to select, -1 for deselect

Default select function for 1 chip devices.

Definition at line 302 of file nand_base.c.

References BUG, nand_chip::hwcontrol, NAND_CTL_CLRNCE, NAND_CTL_SETNCE, and mtd_info::priv.

static int nand_suspend ( struct mtd_info mtd  )  [static]

nand_suspend - [MTD Interface] Suspend the NAND flash : MTD device structure

Definition at line 2361 of file nand_base.c.

References FL_PM_SUSPENDED, nand_get_device(), and mtd_info::priv.

static void nand_sync ( struct mtd_info mtd  )  [static]

nand_sync - [MTD Interface] sync : MTD device structure

Sync is actually a wait for chip ready function

Definition at line 2308 of file nand_base.c.

References DEBUG, FL_SYNCING, MTD_DEBUG_LEVEL3, nand_get_device(), nand_release_device(), and mtd_info::priv.

static int nand_verify_buf ( struct mtd_info mtd,
const u_char *  buf,
int  len 
) [static]

nand_verify_buf - [DEFAULT] Verify chip data against buffer : MTD device structure : buffer containing the data to compare : number of bytes to compare

Default verify function for 8bit buswith

Definition at line 360 of file nand_base.c.

References mtd_info::priv, and readb().

static int nand_verify_buf16 ( struct mtd_info mtd,
const u_char *  buf,
int  len 
) [static]

nand_verify_buf16 - [DEFAULT] Verify chip data against buffer : MTD device structure : buffer containing the data to compare : number of bytes to compare

Default verify function for 16bit buswith

Definition at line 419 of file nand_base.c.

References mtd_info::priv, and readw().

static int nand_wait ( struct mtd_info mtd,
struct nand_chip this,
int  state 
) [static]

nand_wait - [DEFAULT] wait until the command is done : MTD device structure : NAND chip structure : state to select the max. timeout value

Wait for command done. This applies to erase and program only Erase can take up to 400ms and program up to 20ms according to general NAND and SmartMedia specs

Definition at line 840 of file nand_base.c.

References nand_chip::cmdfunc, cond_resched, nand_chip::dev_ready, FL_ERASING, HZ, int, jiffies, NAND_CMD_STATUS, NAND_CMD_STATUS_MULTI, NAND_IS_AND, NAND_STATUS_READY, ndelay, nand_chip::options, nand_chip::read_byte, nand_chip::state, and time_before.

static void nand_wait_ready ( struct mtd_info mtd  )  [static]

Definition at line 553 of file nand_base.c.

References jiffies, mtd_info::priv, time_before, and touch_softlockup_watchdog.

static void nand_write_buf ( struct mtd_info mtd,
const u_char *  buf,
int  len 
) [static]

nand_write_buf - [DEFAULT] write buffer to chip : MTD device structure : data buffer : number of bytes to write

Default write function for 8bit buswith

Definition at line 326 of file nand_base.c.

References mtd_info::priv, and writeb().

static void nand_write_buf16 ( struct mtd_info mtd,
const u_char *  buf,
int  len 
) [static]

nand_write_buf16 - [DEFAULT] write buffer to chip : MTD device structure : data buffer : number of bytes to write

Default write function for 16bit buswith

Definition at line 380 of file nand_base.c.

References mtd_info::priv, and writew().

static void nand_write_byte ( struct mtd_info mtd,
u_char  byte 
) [static]

nand_write_byte - [DEFAULT] write one byte to the chip : MTD device structure : pointer to data byte to write

Default write function for 8it buswith

Definition at line 235 of file nand_base.c.

References mtd_info::priv, and writeb().

Referenced by nand_scan().

static void nand_write_byte16 ( struct mtd_info mtd,
u_char  byte 
) [static]

nand_write_byte16 - [DEFAULT] write one byte endianess aware to the chip : MTD device structure : pointer to data byte to write

Default write function for 16bit buswith with endianess conversion

Definition at line 262 of file nand_base.c.

References le16_to_cpu, mtd_info::priv, and writew().

Referenced by nand_scan().

static void nand_write_word ( struct mtd_info mtd,
u16  word 
) [static]

nand_write_word - [DEFAULT] write one word to the chip : MTD device structure : data word to write

Default write function for 16bit buswith without endianess conversion

Definition at line 289 of file nand_base.c.

References mtd_info::priv, and writew().

Referenced by nand_scan().


Variable Documentation

struct nand_oobinfo nand_oob_16 [static]

Initial value:

 {
        .useecc = MTD_NANDECC_AUTOPLACE,
        .eccbytes = 6,
        .eccpos = {0, 1, 2, 3, 6, 7},
        .oobfree = { {8, 8} }
}

Definition at line 114 of file nand_base.c.

struct nand_oobinfo nand_oob_64 [static]

Initial value:

 {
        .useecc = MTD_NANDECC_AUTOPLACE,
        .eccbytes = 24,
        .eccpos = {
                40, 41, 42, 43, 44, 45, 46, 47,
                48, 49, 50, 51, 52, 53, 54, 55,
                56, 57, 58, 59, 60, 61, 62, 63},
        .oobfree = { {2, 38} }
}

Definition at line 121 of file nand_base.c.

struct nand_oobinfo nand_oob_8 [static]

Initial value:

 {
        .useecc = MTD_NANDECC_AUTOPLACE,
        .eccbytes = 3,
        .eccpos = {0, 1, 2},
        .oobfree = { {3, 2}, {6, 2} }
}

Definition at line 107 of file nand_base.c.


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