<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>struct nand_chip</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="MTD NAND Driver Programming Interface" /><link rel="up" href="ch09.html" title="Chapter 9. Structures" /><link rel="prev" href="re03.html" title="struct nand_buffers" /><link rel="next" href="re05.html" title="struct nand_flash_dev" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>struct nand_chip</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re03.html">Prev</a> </td><th width="60%" align="center">Chapter 9. Structures</th><td width="20%" align="right"> <a accesskey="n" href="re05.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="struct nand_chip"><a id="API-struct-nand-chip"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct nand_chip — NAND Private Flash Chip Data </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting"> struct nand_chip { 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; int page_shift; int phys_erase_shift; int bbt_erase_shift; int chip_shift; int numchips; uint64_t chipsize; int pagemask; int pagebuf; int subpagesize; uint8_t cellinfo; int badblockpos; nand_state_t state; uint8_t * oob_poi; struct nand_hw_control * controller; struct nand_ecclayout * ecclayout; struct nand_ecc_ctrl ecc; struct nand_buffers * buffers; struct nand_hw_control hwcontrol; struct mtd_oob_ops ops; uint8_t * bbt; struct nand_bbt_descr * bbt_td; struct nand_bbt_descr * bbt_md; struct nand_bbt_descr * badblock_pattern; void * priv; }; </pre></div><div class="refsect1" title="Members"><a id="id3006346"></a><h2>Members</h2><div class="variablelist"><dl><dt><span class="term">IO_ADDR_R</span></dt><dd><p> [BOARDSPECIFIC] address to read the 8 I/O lines of the flash device </p></dd><dt><span class="term">IO_ADDR_W</span></dt><dd><p> [BOARDSPECIFIC] address to write the 8 I/O lines of the flash device </p></dd><dt><span class="term">read_byte</span></dt><dd><p> [REPLACEABLE] read one byte from the chip </p></dd><dt><span class="term">read_word</span></dt><dd><p> [REPLACEABLE] read one word from the chip </p></dd><dt><span class="term">write_buf</span></dt><dd><p> [REPLACEABLE] write data from the buffer to the chip </p></dd><dt><span class="term">read_buf</span></dt><dd><p> [REPLACEABLE] read data from the chip into the buffer </p></dd><dt><span class="term">verify_buf</span></dt><dd><p> [REPLACEABLE] verify buffer contents against the chip data </p></dd><dt><span class="term">select_chip</span></dt><dd><p> [REPLACEABLE] select chip nr </p></dd><dt><span class="term">block_bad</span></dt><dd><p> [REPLACEABLE] check, if the block is bad </p></dd><dt><span class="term">block_markbad</span></dt><dd><p> [REPLACEABLE] mark the block bad </p></dd><dt><span class="term">cmd_ctrl</span></dt><dd><p> [BOARDSPECIFIC] hardwarespecific funtion for controlling ALE/CLE/nCE. Also used to write command and address </p></dd><dt><span class="term">dev_ready</span></dt><dd><p> [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 </p></dd><dt><span class="term">cmdfunc</span></dt><dd><p> [REPLACEABLE] hardwarespecific function for writing commands to the chip </p></dd><dt><span class="term">waitfunc</span></dt><dd><p> [REPLACEABLE] hardwarespecific function for wait on ready </p></dd><dt><span class="term">erase_cmd</span></dt><dd><p> [INTERN] erase command write function, selectable due to AND support </p></dd><dt><span class="term">scan_bbt</span></dt><dd><p> [REPLACEABLE] function to scan bad block table </p></dd><dt><span class="term">errstat</span></dt><dd><p> [OPTIONAL] hardware specific function to perform additional error status checks (determine if errors are correctable) </p></dd><dt><span class="term">write_page</span></dt><dd><p> [REPLACEABLE] High-level page write function </p></dd><dt><span class="term">chip_delay</span></dt><dd><p> [BOARDSPECIFIC] chip dependent delay for transfering data from array to read regs (tR) </p></dd><dt><span class="term">options</span></dt><dd><p> [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about special functionality. See the defines for further explanation </p></dd><dt><span class="term">page_shift</span></dt><dd><p> [INTERN] number of address bits in a page (column address bits) </p></dd><dt><span class="term">phys_erase_shift</span></dt><dd><p> [INTERN] number of address bits in a physical eraseblock </p></dd><dt><span class="term">bbt_erase_shift</span></dt><dd><p> [INTERN] number of address bits in a bbt entry </p></dd><dt><span class="term">chip_shift</span></dt><dd><p> [INTERN] number of address bits in one chip </p></dd><dt><span class="term">numchips</span></dt><dd><p> [INTERN] number of physical chips </p></dd><dt><span class="term">chipsize</span></dt><dd><p> [INTERN] the size of one chip for multichip arrays </p></dd><dt><span class="term">pagemask</span></dt><dd><p> [INTERN] page number mask = number of (pages / chip) - 1 </p></dd><dt><span class="term">pagebuf</span></dt><dd><p> [INTERN] holds the pagenumber which is currently in data_buf </p></dd><dt><span class="term">subpagesize</span></dt><dd><p> [INTERN] holds the subpagesize </p></dd><dt><span class="term">cellinfo</span></dt><dd><p> [INTERN] MLC/multichip data from chip ident </p></dd><dt><span class="term">badblockpos</span></dt><dd><p> [INTERN] position of the bad block marker in the oob area </p></dd><dt><span class="term">state</span></dt><dd><p> [INTERN] the current state of the NAND device </p></dd><dt><span class="term">oob_poi</span></dt><dd><p> poison value buffer </p></dd><dt><span class="term">controller</span></dt><dd><p> [REPLACEABLE] a pointer to a hardware controller structure which is shared among multiple independend devices </p></dd><dt><span class="term">ecclayout</span></dt><dd><p> [REPLACEABLE] the default ecc placement scheme </p></dd><dt><span class="term">ecc</span></dt><dd><p> [BOARDSPECIFIC] ecc control ctructure </p></dd><dt><span class="term">buffers</span></dt><dd><p> buffer structure for read/write </p></dd><dt><span class="term">hwcontrol</span></dt><dd><p> platform-specific hardware control structure </p></dd><dt><span class="term">ops</span></dt><dd><p> oob operation operands </p></dd><dt><span class="term">bbt</span></dt><dd><p> [INTERN] bad block table pointer </p></dd><dt><span class="term">bbt_td</span></dt><dd><p> [REPLACEABLE] bad block table descriptor for flash lookup </p></dd><dt><span class="term">bbt_md</span></dt><dd><p> [REPLACEABLE] bad block table mirror descriptor </p></dd><dt><span class="term">badblock_pattern</span></dt><dd><p> [REPLACEABLE] bad block scan pattern used for initial bad block scan </p></dd><dt><span class="term">priv</span></dt><dd><p> [OPTIONAL] pointer to private chip date </p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch09.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re05.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>struct nand_buffers</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>struct nand_flash_dev</span></td></tr></table></div></body></html>