• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/mtd/onenand/

Lines Matching refs:to

71  * @param addr		address to read
82 * @param value value to write
83 * @param addr address to write
173 * onenand_command - [DEFAULT] Send command to OneNAND device
175 * @param cmd the command to be sent
176 * @param addr offset to read from or write to
177 * @param len number of bytes to read or write
179 * Send command to OneNAND device. This function is used for middle/large page
219 /* Switch to the next data buffer */
281 * @param state state to select the max. timeout value
283 * Wait for command done. This applies to all OneNAND command
284 * Read can take up to 30us, erase up to 2ms and program up to 350us
285 * according to general OneNAND specs
357 * @param state state to select the max. timeout value
373 * @param state state to select the max. timeout value
404 * There's two method to wait onenand work
461 * @param buffer the databuffer to put/get data
462 * @param offset offset to read from or write to
463 * @param count number of bytes to read/write
497 * @param buffer the databuffer to put/get data
498 * @param offset offset to read from or write to
499 * @param count number of bytes to read/write
537 * @param buffer the databuffer to put/get data
538 * @param offset offset to read from or write to
539 * @param count number of bytes to read/write
577 * @param addr address to check
616 * @param addr address to update
646 * @param addr start address to invalidate
647 * @param len length to invalidate
722 * @param from offset to read from
723 * @param len number of bytes to read
724 * @param retlen pointer to variable to store the number of read bytes
725 * @param buf the databuffer to put data
754 /* Do first load to bufferRAM */
769 /* If there is more to load then start next load */
776 * bufferam so we have to point chip 0 bufferam.
828 * @param column oob offset to read from
829 * @param thislen oob length to read
869 * @param from offset to read from
870 * @param len number of bytes to read
871 * @param retlen pointer to variable to store the number of read bytes
872 * @param buf the databuffer to put data
897 printk(KERN_ERR "onenand_read_oob: Attempted to start read outside oob\n");
905 printk(KERN_ERR "onenand_read_oob: Attempted to read beyond end of device\n");
960 * @param from: offset to read from
982 * @param state state to select the max. timeout value
1028 * @param from offset to read from
1098 * @param buf the databuffer to verify
1099 * @param to offset to read from
1102 static int onenand_verify_oob(struct mtd_info *mtd, const u_char *buf, loff_t to)
1108 this->command(mtd, ONENAND_CMD_READOOB, to, mtd->oobsize);
1109 onenand_update_bufferram(mtd, to, 0);
1125 * @param buf the databuffer to verify
1126 * @param addr offset to read from
1127 * @param len number of bytes to read and compare
1174 * onenand_write - [MTD Interface] write buffer to FLASH
1176 * @param to offset to write to
1177 * @param len number of bytes to write
1178 * @param retlen pointer to variable to store the number of written bytes
1179 * @param buf the data to write
1183 static int onenand_write(struct mtd_info *mtd, loff_t to, size_t len,
1191 DEBUG(MTD_DEBUG_LEVEL3, "onenand_write: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
1197 if (unlikely((to + len) > mtd->size)) {
1198 printk(KERN_ERR "onenand_write: Attempt write to past end of device\n");
1203 if (unlikely(NOTALIGNED(to)) || unlikely(NOTALIGNED(len))) {
1204 printk(KERN_ERR "onenand_write: Attempt to write not page aligned data\n");
1208 column = to & (mtd->writesize - 1);
1220 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, thislen);
1233 this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
1238 onenand_update_bufferram(mtd, to, !ret && !subpage);
1246 ret = onenand_verify(mtd, (u_char *) wbuf, to, thislen);
1258 to += thislen;
1275 * @param column oob offset to write to
1276 * @param thislen oob length to write
1314 * @param to offset to write to
1315 * @param len number of bytes to write
1316 * @param retlen pointer to variable to store the number of written bytes
1317 * @param buf the data to write
1322 static int onenand_do_write_oob(struct mtd_info *mtd, loff_t to, size_t len,
1330 DEBUG(MTD_DEBUG_LEVEL3, "onenand_write_oob: to = 0x%08x, len = %i\n", (unsigned int) to, (int) len);
1340 column = to & (mtd->oobsize - 1);
1343 printk(KERN_ERR "onenand_write_oob: Attempted to start write outside oob\n");
1350 "Attempt to write past end of page\n");
1355 if (unlikely(to >= mtd->size ||
1357 (to >> this->page_shift)) * oobsize)) {
1358 printk(KERN_ERR "onenand_write_oob: Attempted to write past end of device\n");
1373 this->command(mtd, ONENAND_CMD_BUFFERRAM, to, mtd->oobsize);
1375 /* We send data to spare ram with oobsize
1376 * to prevent byte access */
1384 this->command(mtd, ONENAND_CMD_PROGOOB, to, mtd->oobsize);
1386 onenand_update_bufferram(mtd, to, 0);
1394 ret = onenand_verify_oob(mtd, oobbuf, to);
1404 to += mtd->writesize;
1420 * @param to: offset to write
1423 static int onenand_write_oob(struct mtd_info *mtd, loff_t to,
1435 return onenand_do_write_oob(mtd, to + ops->ooboffs, ops->ooblen,
1444 * @param allowbbt 1, if its allowed to access the bbt area
1511 printk (KERN_WARNING "onenand_erase: attempt to erase a bad block at addr 0x%08x\n", (unsigned int) addr);
1568 * @param ofs offset relative to mtd start
1602 /* We write two bytes, so we dont have to mess with 16 bit access */
1610 * @param ofs offset relative to mtd start
1633 * @param ofs offset relative to mtd start
1634 * @param len number of bytes to lock or unlock
1711 * @param ofs offset relative to mtd start
1712 * @param len number of bytes to unlock
1724 * @param ofs offset relative to mtd start
1725 * @param len number of bytes to unlock
1814 * @param from The offset to read
1815 * @param len number of bytes to read
1816 * @param retlen pointer to variable to store the number of readbytes
1817 * @param buf the databuffer to put/get data
1843 * @param from The offset to write
1844 * @param len number of bytes to write
1845 * @param retlen pointer to variable to store the number of write bytes
1846 * @param buf the databuffer to put/get data
1881 * @param from The offset to lock
1882 * @param len number of bytes to lock
1883 * @param retlen pointer to variable to store the number of lock bytes
1884 * @param buf the databuffer to put/get data
1910 * @param from The offset to read/write
1911 * @param len number of bytes to read/write
1912 * @param retlen pointer to variable to store the number of read bytes
1913 * @param buf the databuffer to put/get data
1983 * @param buf the databuffer to put/get data
1984 * @param len number of bytes to read
2002 * @param from The offset to read
2003 * @param len number of bytes to read
2004 * @param retlen pointer to variable to store the number of read bytes
2005 * @param buf the databuffer to put/get data
2018 * @param buf the databuffer to put/get data
2019 * @param len number of bytes to read
2037 * @param from The offset to read
2038 * @param len number of bytes to read
2039 * @param retlen pointer to variable to store the number of read bytes
2040 * @param buf the databuffer to put/get data
2053 * @param from The offset to write
2054 * @param len number of bytes to write
2055 * @param retlen pointer to variable to store the number of write bytes
2056 * @param buf the databuffer to put/get data
2069 * @param from The offset to lock
2070 * @param len number of bytes to unlock
2091 * Write lock mark to 8th word of sector0 of page0 of the spare0.
2205 /* Clear Sync. Burst Read mode to read BootRAM */
2215 /* Reset OneNAND to read default register values */
2250 /* The data buffer size is equal to page size */
2297 * @param maxchips Number of chips to scan for
2365 * Allow subpage writes up to oobsize.
2390 * The number of bytes available for a client to place data into