Lines Matching defs:to

17  * along with this program; if not, write to the Free Software
59 * - BCH can correct up to 4 bits (t = 4)
151 * @nbNOPs: the number of NOPs to issue
216 * @buf: the buffer to fill in (might be NULL is dummy reads)
217 * @len: the length to read
262 * @buf: the buffer to get input bytes from
263 * @len: the length to write
294 * doc_set_data_mode - Sets the flash to normal or reliable data mode
301 * In reliable mode, pages 2*n and 2*n+1 are clones. Writing to page 0 of blocks
302 * (4,5) make the hardware write also to page 1 of blocks blocks(4,5). Reading
305 * consistent with the fact that writing to a page is _clearing_ bits of that
359 * @id: the chip to select (amongst 0, 1, 2, 3)
384 * mode must be input to the flash ASIC.
436 * doc_seek - Set both flash planes to the specified block, page for reading
442 * @ofs: offset in page to read
444 * Programs the flash even and odd planes to the specific block and page.
445 * Alternatively, programs the flash to the wear area of the specified page.
486 * doc_write_seek - Set both flash planes to the specified block, page for writing
491 * @ofs: offset in page to write
493 * Programs the flash even and odd planes to the specific block and page.
494 * Alternatively, programs the flash to the wear area of the specified page.
543 * The function does initialize the hardware ECC engine to compute the Hamming
564 * The function does initialize the hardware ECC engine to compute the Hamming
598 * This function programs the ECC hardware to compute the hamming code on the
599 * last provided N bytes to the hardware generator.
620 * tries to fix the bit flips (at most 4) in the buffer buf. As the docg3
621 * understands the (data, ecc, syndroms) in an inverted order in comparison to
626 * algorithm is used to decode this. However the hw operates on page
628 * requiring that the bits be reversed on the result. Thanks to Ivan
668 * Prepares the page to be read in the flash memory :
669 * - tell ASIC to map the flash pages
670 * - tell ASIC to be in read mode
672 * After a call to this method, a call to doc_read_page_finish is mandatory,
673 * to end the read cycle of the flash.
675 * Read data from a flash page. The length to be read must be between 0 and
732 * @len: the number of bytes to be read (must be a multiple of 4)
733 * @buf: the buffer to be filled in (or NULL is forget bytes)
748 * @len: the number of bytes to be written
786 * As a side effect, resets the chip selector to 0. This ensures that after each
967 * @len: the number of bytes to read (must be a multiple of 4)
1017 * @from: the offset to find the correct block
1109 * Wait for the chip to be ready again after erase or write operation, and check
1142 * @block0: the first block to erase (leftmost plane)
1143 * @block1: the second block to erase (rightmost plane)
1233 * doc_write_page - Write a single page to the chip
1235 * @to: the offset from first block and first page, in bytes, aligned on page
1237 * @buf: buffer to get bytes from
1238 * @oob: buffer to get out of band bytes from (can be NULL if no OOB should be
1251 static int doc_write_page(struct docg3 *docg3, loff_t to, const u_char *buf,
1257 doc_dbg("doc_write_page(to=%lld)\n", to);
1258 calc_block_sector(to, &block0, &block1, &page, &ofs, docg3->reliable);
1302 * seems to please the docg3, so leave it.
1350 * @to: the page offset in the chip
1354 * applications do write_oob() to setup the OOB and then write(), store the OOB
1359 * The only reliable way would be for userland to call doc_write_oob() with both
1364 static int doc_backup_oob(struct docg3 *docg3, loff_t to,
1375 docg3->oob_write_ofs = to;
1388 * doc_write_oob - Write out of band bytes to flash
1486 * doc_write - Write a buffer to the chip
1488 * @to: the offset from first block and first page, in bytes, aligned on page
1490 * @len: the number of bytes to write (must be a full page size, ie. 512)
1492 * @buf: the buffer to get bytes from
1494 * Writes data to the chip.
1498 static int doc_write(struct mtd_info *mtd, loff_t to, size_t len,
1505 doc_dbg("doc_write(to=%lld, len=%zu)\n", to, len);
1513 ret = doc_write_oob(mtd, to, &ops);
1815 * @mtd: The structure to fill
1859 * @cascade: the cascade of chips this devices will belong to
1973 * Shuts off most of docg3 circuitery to lower power consumption.