1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter 11. Internal Functions Provided</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="MTD NAND Driver Programming Interface"><link rel="up" href="index.html" title="MTD NAND Driver Programming Interface"><link rel="prev" href="API-nand-correct-data.html" title="nand_correct_data"><link rel="next" href="API-nand-release-device.html" title="nand_release_device"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Internal Functions Provided</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-nand-correct-data.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="API-nand-release-device.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="intfunctions"></a>Chapter 11. Internal Functions Provided</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="refentrytitle"><a href="API-nand-release-device.html"><span class="phrase">nand_release_device</span></a></span><span class="refpurpose"> — 2 [GENERIC] release chip 3 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-byte.html"><span class="phrase">nand_read_byte</span></a></span><span class="refpurpose"> — 4 [DEFAULT] read one byte from the chip 5 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-byte16.html"><span class="phrase">nand_read_byte16</span></a></span><span class="refpurpose"> — 6 [DEFAULT] read one byte endianness aware from the chip 7 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-word.html"><span class="phrase">nand_read_word</span></a></span><span class="refpurpose"> — 8 [DEFAULT] read one word from the chip 9 </span></dt><dt><span class="refentrytitle"><a href="API-nand-select-chip.html"><span class="phrase">nand_select_chip</span></a></span><span class="refpurpose"> — 10 [DEFAULT] control CE line 11 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-byte.html"><span class="phrase">nand_write_byte</span></a></span><span class="refpurpose"> — 12 [DEFAULT] write single byte to chip 13 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-byte16.html"><span class="phrase">nand_write_byte16</span></a></span><span class="refpurpose"> — 14 [DEFAULT] write single byte to a chip with width 16 15 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-buf.html"><span class="phrase">nand_write_buf</span></a></span><span class="refpurpose"> — 16 [DEFAULT] write buffer to chip 17 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-buf.html"><span class="phrase">nand_read_buf</span></a></span><span class="refpurpose"> — 18 [DEFAULT] read chip data into buffer 19 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-buf16.html"><span class="phrase">nand_write_buf16</span></a></span><span class="refpurpose"> — 20 [DEFAULT] write buffer to chip 21 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-buf16.html"><span class="phrase">nand_read_buf16</span></a></span><span class="refpurpose"> — 22 [DEFAULT] read chip data into buffer 23 </span></dt><dt><span class="refentrytitle"><a href="API-nand-block-bad.html"><span class="phrase">nand_block_bad</span></a></span><span class="refpurpose"> — 24 [DEFAULT] Read bad block marker from the chip 25 </span></dt><dt><span class="refentrytitle"><a href="API-nand-default-block-markbad.html"><span class="phrase">nand_default_block_markbad</span></a></span><span class="refpurpose"> — 26 [DEFAULT] mark a block bad via bad block marker 27 </span></dt><dt><span class="refentrytitle"><a href="API-nand-block-markbad-lowlevel.html"><span class="phrase">nand_block_markbad_lowlevel</span></a></span><span class="refpurpose"> — 28 mark a block bad 29 </span></dt><dt><span class="refentrytitle"><a href="API-nand-check-wp.html"><span class="phrase">nand_check_wp</span></a></span><span class="refpurpose"> — 30 [GENERIC] check if the chip is write protected 31 </span></dt><dt><span class="refentrytitle"><a href="API-nand-block-isreserved.html"><span class="phrase">nand_block_isreserved</span></a></span><span class="refpurpose"> — 32 [GENERIC] Check if a block is marked reserved. 33 </span></dt><dt><span class="refentrytitle"><a href="API-nand-block-checkbad.html"><span class="phrase">nand_block_checkbad</span></a></span><span class="refpurpose"> — 34 [GENERIC] Check if a block is marked bad 35 </span></dt><dt><span class="refentrytitle"><a href="API-panic-nand-wait-ready.html"><span class="phrase">panic_nand_wait_ready</span></a></span><span class="refpurpose"> — 36 [GENERIC] Wait for the ready pin after commands. 37 </span></dt><dt><span class="refentrytitle"><a href="API-nand-wait-status-ready.html"><span class="phrase">nand_wait_status_ready</span></a></span><span class="refpurpose"> — 38 [GENERIC] Wait for the ready status after commands. 39 </span></dt><dt><span class="refentrytitle"><a href="API-nand-command.html"><span class="phrase">nand_command</span></a></span><span class="refpurpose"> — 40 [DEFAULT] Send command to NAND device 41 </span></dt><dt><span class="refentrytitle"><a href="API-nand-command-lp.html"><span class="phrase">nand_command_lp</span></a></span><span class="refpurpose"> — 42 [DEFAULT] Send command to NAND large page device 43 </span></dt><dt><span class="refentrytitle"><a href="API-panic-nand-get-device.html"><span class="phrase">panic_nand_get_device</span></a></span><span class="refpurpose"> — 44 [GENERIC] Get chip for selected access 45 </span></dt><dt><span class="refentrytitle"><a href="API-nand-get-device.html"><span class="phrase">nand_get_device</span></a></span><span class="refpurpose"> — 46 [GENERIC] Get chip for selected access 47 </span></dt><dt><span class="refentrytitle"><a href="API-panic-nand-wait.html"><span class="phrase">panic_nand_wait</span></a></span><span class="refpurpose"> — 48 [GENERIC] wait until the command is done 49 </span></dt><dt><span class="refentrytitle"><a href="API-nand-wait.html"><span class="phrase">nand_wait</span></a></span><span class="refpurpose"> — 50 [DEFAULT] wait until the command is done 51 </span></dt><dt><span class="refentrytitle"><a href="API---nand-unlock.html"><span class="phrase">__nand_unlock</span></a></span><span class="refpurpose"> — 52 [REPLACEABLE] unlocks specified locked blocks 53 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-page-raw.html"><span class="phrase">nand_read_page_raw</span></a></span><span class="refpurpose"> — 54 [INTERN] read raw page data without ecc 55 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-page-raw-syndrome.html"><span class="phrase">nand_read_page_raw_syndrome</span></a></span><span class="refpurpose"> — 56 [INTERN] read raw page data without ecc 57 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-page-swecc.html"><span class="phrase">nand_read_page_swecc</span></a></span><span class="refpurpose"> — 58 [REPLACEABLE] software ECC based page read function 59 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-subpage.html"><span class="phrase">nand_read_subpage</span></a></span><span class="refpurpose"> — 60 [REPLACEABLE] ECC based sub-page read function 61 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-page-hwecc.html"><span class="phrase">nand_read_page_hwecc</span></a></span><span class="refpurpose"> — 62 [REPLACEABLE] hardware ECC based page read function 63 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-page-hwecc-oob-first.html"><span class="phrase">nand_read_page_hwecc_oob_first</span></a></span><span class="refpurpose"> — 64 [REPLACEABLE] hw ecc, read oob first 65 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-page-syndrome.html"><span class="phrase">nand_read_page_syndrome</span></a></span><span class="refpurpose"> — 66 [REPLACEABLE] hardware ECC syndrome based page read 67 </span></dt><dt><span class="refentrytitle"><a href="API-nand-transfer-oob.html"><span class="phrase">nand_transfer_oob</span></a></span><span class="refpurpose"> — 68 [INTERN] Transfer oob to client buffer 69 </span></dt><dt><span class="refentrytitle"><a href="API-nand-setup-read-retry.html"><span class="phrase">nand_setup_read_retry</span></a></span><span class="refpurpose"> — 70 [INTERN] Set the READ RETRY mode 71 </span></dt><dt><span class="refentrytitle"><a href="API-nand-do-read-ops.html"><span class="phrase">nand_do_read_ops</span></a></span><span class="refpurpose"> — 72 [INTERN] Read data with ECC 73 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read.html"><span class="phrase">nand_read</span></a></span><span class="refpurpose"> — 74 [MTD Interface] MTD compatibility function for nand_do_read_ecc 75 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-oob-std.html"><span class="phrase">nand_read_oob_std</span></a></span><span class="refpurpose"> — 76 [REPLACEABLE] the most common OOB data read function 77 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-oob-syndrome.html"><span class="phrase">nand_read_oob_syndrome</span></a></span><span class="refpurpose"> — 78 [REPLACEABLE] OOB data read function for HW ECC with syndromes 79 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-oob-std.html"><span class="phrase">nand_write_oob_std</span></a></span><span class="refpurpose"> — 80 [REPLACEABLE] the most common OOB data write function 81 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-oob-syndrome.html"><span class="phrase">nand_write_oob_syndrome</span></a></span><span class="refpurpose"> — 82 [REPLACEABLE] OOB data write function for HW ECC with syndrome - only for large page flash 83 </span></dt><dt><span class="refentrytitle"><a href="API-nand-do-read-oob.html"><span class="phrase">nand_do_read_oob</span></a></span><span class="refpurpose"> — 84 [INTERN] NAND read out-of-band 85 </span></dt><dt><span class="refentrytitle"><a href="API-nand-read-oob.html"><span class="phrase">nand_read_oob</span></a></span><span class="refpurpose"> — 86 [MTD Interface] NAND read data and/or out-of-band 87 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-page-raw.html"><span class="phrase">nand_write_page_raw</span></a></span><span class="refpurpose"> — 88 [INTERN] raw page write function 89 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-page-raw-syndrome.html"><span class="phrase">nand_write_page_raw_syndrome</span></a></span><span class="refpurpose"> — 90 [INTERN] raw page write function 91 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-page-swecc.html"><span class="phrase">nand_write_page_swecc</span></a></span><span class="refpurpose"> — 92 [REPLACEABLE] software ECC based page write function 93 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-page-hwecc.html"><span class="phrase">nand_write_page_hwecc</span></a></span><span class="refpurpose"> — 94 [REPLACEABLE] hardware ECC based page write function 95 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-subpage-hwecc.html"><span class="phrase">nand_write_subpage_hwecc</span></a></span><span class="refpurpose"> — 96 [REPLACEABLE] hardware ECC based subpage write 97 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-page-syndrome.html"><span class="phrase">nand_write_page_syndrome</span></a></span><span class="refpurpose"> — 98 [REPLACEABLE] hardware ECC syndrome based page write 99 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-page.html"><span class="phrase">nand_write_page</span></a></span><span class="refpurpose"> — 100 [REPLACEABLE] write one page 101 </span></dt><dt><span class="refentrytitle"><a href="API-nand-fill-oob.html"><span class="phrase">nand_fill_oob</span></a></span><span class="refpurpose"> — 102 [INTERN] Transfer client buffer to oob 103 </span></dt><dt><span class="refentrytitle"><a href="API-nand-do-write-ops.html"><span class="phrase">nand_do_write_ops</span></a></span><span class="refpurpose"> — 104 [INTERN] NAND write with ECC 105 </span></dt><dt><span class="refentrytitle"><a href="API-panic-nand-write.html"><span class="phrase">panic_nand_write</span></a></span><span class="refpurpose"> — 106 [MTD Interface] NAND write with ECC 107 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write.html"><span class="phrase">nand_write</span></a></span><span class="refpurpose"> — 108 [MTD Interface] NAND write with ECC 109 </span></dt><dt><span class="refentrytitle"><a href="API-nand-do-write-oob.html"><span class="phrase">nand_do_write_oob</span></a></span><span class="refpurpose"> — 110 [MTD Interface] NAND write out-of-band 111 </span></dt><dt><span class="refentrytitle"><a href="API-nand-write-oob.html"><span class="phrase">nand_write_oob</span></a></span><span class="refpurpose"> — 112 [MTD Interface] NAND write data and/or out-of-band 113 </span></dt><dt><span class="refentrytitle"><a href="API-single-erase.html"><span class="phrase">single_erase</span></a></span><span class="refpurpose"> — 114 [GENERIC] NAND standard block erase command function 115 </span></dt><dt><span class="refentrytitle"><a href="API-nand-erase.html"><span class="phrase">nand_erase</span></a></span><span class="refpurpose"> — 116 [MTD Interface] erase block(s) 117 </span></dt><dt><span class="refentrytitle"><a href="API-nand-erase-nand.html"><span class="phrase">nand_erase_nand</span></a></span><span class="refpurpose"> — 118 [INTERN] erase block(s) 119 </span></dt><dt><span class="refentrytitle"><a href="API-nand-sync.html"><span class="phrase">nand_sync</span></a></span><span class="refpurpose"> — 120 [MTD Interface] sync 121 </span></dt><dt><span class="refentrytitle"><a href="API-nand-block-isbad.html"><span class="phrase">nand_block_isbad</span></a></span><span class="refpurpose"> — 122 [MTD Interface] Check if block at offset is bad 123 </span></dt><dt><span class="refentrytitle"><a href="API-nand-block-markbad.html"><span class="phrase">nand_block_markbad</span></a></span><span class="refpurpose"> — 124 [MTD Interface] Mark block at the given offset as bad 125 </span></dt><dt><span class="refentrytitle"><a href="API-nand-onfi-set-features.html"><span class="phrase">nand_onfi_set_features</span></a></span><span class="refpurpose"> — 126 [REPLACEABLE] set features for ONFI nand 127 </span></dt><dt><span class="refentrytitle"><a href="API-nand-onfi-get-features.html"><span class="phrase">nand_onfi_get_features</span></a></span><span class="refpurpose"> — 128 [REPLACEABLE] get features for ONFI nand 129 </span></dt><dt><span class="refentrytitle"><a href="API-nand-suspend.html"><span class="phrase">nand_suspend</span></a></span><span class="refpurpose"> — 130 [MTD Interface] Suspend the NAND flash 131 </span></dt><dt><span class="refentrytitle"><a href="API-nand-resume.html"><span class="phrase">nand_resume</span></a></span><span class="refpurpose"> — 132 [MTD Interface] Resume the NAND flash 133 </span></dt><dt><span class="refentrytitle"><a href="API-nand-shutdown.html"><span class="phrase">nand_shutdown</span></a></span><span class="refpurpose"> — 134 [MTD Interface] Finish the current NAND operation and prevent further operations 135 </span></dt><dt><span class="refentrytitle"><a href="API-check-pattern.html"><span class="phrase">check_pattern</span></a></span><span class="refpurpose"> — 136 [GENERIC] check if a pattern is in the buffer 137 </span></dt><dt><span class="refentrytitle"><a href="API-check-short-pattern.html"><span class="phrase">check_short_pattern</span></a></span><span class="refpurpose"> — 138 [GENERIC] check if a pattern is in the buffer 139 </span></dt><dt><span class="refentrytitle"><a href="API-add-marker-len.html"><span class="phrase">add_marker_len</span></a></span><span class="refpurpose"> — 140 compute the length of the marker in data area 141 </span></dt><dt><span class="refentrytitle"><a href="API-read-bbt.html"><span class="phrase">read_bbt</span></a></span><span class="refpurpose"> — 142 [GENERIC] Read the bad block table starting from page 143 </span></dt><dt><span class="refentrytitle"><a href="API-read-abs-bbt.html"><span class="phrase">read_abs_bbt</span></a></span><span class="refpurpose"> — 144 [GENERIC] Read the bad block table starting at a given page 145 </span></dt><dt><span class="refentrytitle"><a href="API-scan-read-oob.html"><span class="phrase">scan_read_oob</span></a></span><span class="refpurpose"> — 146 [GENERIC] Scan data+OOB region to buffer 147 </span></dt><dt><span class="refentrytitle"><a href="API-read-abs-bbts.html"><span class="phrase">read_abs_bbts</span></a></span><span class="refpurpose"> — 148 [GENERIC] Read the bad block table(s) for all chips starting at a given page 149 </span></dt><dt><span class="refentrytitle"><a href="API-create-bbt.html"><span class="phrase">create_bbt</span></a></span><span class="refpurpose"> — 150 [GENERIC] Create a bad block table by scanning the device 151 </span></dt><dt><span class="refentrytitle"><a href="API-search-bbt.html"><span class="phrase">search_bbt</span></a></span><span class="refpurpose"> — 152 [GENERIC] scan the device for a specific bad block table 153 </span></dt><dt><span class="refentrytitle"><a href="API-search-read-bbts.html"><span class="phrase">search_read_bbts</span></a></span><span class="refpurpose"> — 154 [GENERIC] scan the device for bad block table(s) 155 </span></dt><dt><span class="refentrytitle"><a href="API-write-bbt.html"><span class="phrase">write_bbt</span></a></span><span class="refpurpose"> — 156 [GENERIC] (Re)write the bad block table 157 </span></dt><dt><span class="refentrytitle"><a href="API-nand-memory-bbt.html"><span class="phrase">nand_memory_bbt</span></a></span><span class="refpurpose"> — 158 [GENERIC] create a memory based bad block table 159 </span></dt><dt><span class="refentrytitle"><a href="API-check-create.html"><span class="phrase">check_create</span></a></span><span class="refpurpose"> — 160 [GENERIC] create and write bbt(s) if necessary 161 </span></dt><dt><span class="refentrytitle"><a href="API-mark-bbt-region.html"><span class="phrase">mark_bbt_region</span></a></span><span class="refpurpose"> — 162 [GENERIC] mark the bad block table regions 163 </span></dt><dt><span class="refentrytitle"><a href="API-verify-bbt-descr.html"><span class="phrase">verify_bbt_descr</span></a></span><span class="refpurpose"> — 164 verify the bad block description 165 </span></dt><dt><span class="refentrytitle"><a href="API-nand-update-bbt.html"><span class="phrase">nand_update_bbt</span></a></span><span class="refpurpose"> — 166 update bad block table(s) 167 </span></dt><dt><span class="refentrytitle"><a href="API-nand-create-badblock-pattern.html"><span class="phrase">nand_create_badblock_pattern</span></a></span><span class="refpurpose"> — 168 [INTERN] Creates a BBT descriptor structure 169 </span></dt><dt><span class="refentrytitle"><a href="API-nand-default-bbt.html"><span class="phrase">nand_default_bbt</span></a></span><span class="refpurpose"> — 170 [NAND Interface] Select a default bad block table for the device 171 </span></dt><dt><span class="refentrytitle"><a href="API-nand-isreserved-bbt.html"><span class="phrase">nand_isreserved_bbt</span></a></span><span class="refpurpose"> — 172 [NAND Interface] Check if a block is reserved 173 </span></dt><dt><span class="refentrytitle"><a href="API-nand-isbad-bbt.html"><span class="phrase">nand_isbad_bbt</span></a></span><span class="refpurpose"> — 174 [NAND Interface] Check if a block is bad 175 </span></dt><dt><span class="refentrytitle"><a href="API-nand-markbad-bbt.html"><span class="phrase">nand_markbad_bbt</span></a></span><span class="refpurpose"> — 176 [NAND Interface] Mark a block bad in the BBT 177 </span></dt></dl></div><p> 178 This chapter contains the autogenerated documentation of the NAND driver internal functions. 179 Each function has a short description which is marked with an [XXX] identifier. 180 See the chapter "Documentation hints" for an explanation. 181 The functions marked with [DEFAULT] might be relevant for a board driver developer. 182 </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-nand-correct-data.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="API-nand-release-device.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">nand_correct_data</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">nand_release_device</span></td></tr></table></div></body></html> 183