Home
last modified time | relevance | path

Searched full:oob (Results 1 – 25 of 496) sorted by relevance

12345678910>>...20

/OK3568_Linux_fs/u-boot/fs/yaffs2/
H A Dyaffs_mtdif.c28 static inline void translate_spare2oob(const struct yaffs_spare *spare, u8 *oob) in translate_spare2oob() argument
30 oob[0] = spare->tb0; in translate_spare2oob()
31 oob[1] = spare->tb1; in translate_spare2oob()
32 oob[2] = spare->tb2; in translate_spare2oob()
33 oob[3] = spare->tb3; in translate_spare2oob()
34 oob[4] = spare->tb4; in translate_spare2oob()
35 oob[5] = spare->tb5 & 0x3f; in translate_spare2oob()
36 oob[5] |= spare->block_status == 'Y' ? 0 : 0x80; in translate_spare2oob()
37 oob[5] |= spare->page_status == 0 ? 0 : 0x40; in translate_spare2oob()
38 oob[6] = spare->tb6; in translate_spare2oob()
[all …]
/OK3568_Linux_fs/kernel/drivers/mtd/parsers/
H A Dsharpslpart.c35 /* oob structure */
69 /* verify that the OOB bytes 8 to 15 are free and available for the FTL */
115 * The logical block number assigned to a physical block is stored in the OOB
128 * ECC BB xyxy oob[8]==oob[10] && oob[9]==oob[11] -> byte0=8 byte1=9
129 * ECC BB xyxy oob[10]==oob[12] && oob[11]==oob[13] -> byte0=10 byte1=11
130 * ECC BB xy xy oob[12]==oob[8] && oob[13]==oob[9] -> byte0=12 byte1=13
132 static int sharpsl_nand_get_logical_num(u8 *oob) in sharpsl_nand_get_logical_num() argument
137 if (oob[NAND_NOOB_LOGADDR_00] == oob[NAND_NOOB_LOGADDR_10] && in sharpsl_nand_get_logical_num()
138 oob[NAND_NOOB_LOGADDR_01] == oob[NAND_NOOB_LOGADDR_11]) { in sharpsl_nand_get_logical_num()
141 } else if (oob[NAND_NOOB_LOGADDR_10] == oob[NAND_NOOB_LOGADDR_20] && in sharpsl_nand_get_logical_num()
[all …]
/OK3568_Linux_fs/u-boot/drivers/mtd/nand/raw/
H A Dlpc32xx_nand_mlc.c93 * OOB data in each small page are 6 'free' then 10 ECC bytes.
95 * 'free' OOB bytes are grouped in the first 24 bytes of the OOB buffer,
98 * The struct below represents how free vs ecc oob bytes are stored
101 * Note: the OOB bytes contain the bad block marker at offsets 0 and 1.
197 * To make U-Boot's life easier, we pack 'useable' OOB at the
222 * @oob_required: caller requires OOB data read to chip->oob_poi
239 struct lpc32xx_oob *oob = (struct lpc32xx_oob *)chip->oob_poi; in lpc32xx_read_page_hwecc() local
263 /* copy next 6 bytes at front of OOB buffer */ in lpc32xx_read_page_hwecc()
264 memcpy(&oob->free[i], lpc32xx_nand_mlc_registers->buff, 6); in lpc32xx_read_page_hwecc()
265 /* copy last 10 bytes (R/S ECC) at back of OOB buffer */ in lpc32xx_read_page_hwecc()
[all …]
H A Dmxc_nand.c49 /* OOB placement block for use with hardware ecc generation */
395 pr_debug("%s: Reading OOB area of page %u to oob %p\n",
446 uint8_t *oob = chip->oob_poi; local
460 chip->read_buf(mtd, oob, chip->ecc.prepad);
461 oob += chip->ecc.prepad;
464 chip->read_buf(mtd, oob, eccbytes);
465 oob += eccbytes;
468 chip->read_buf(mtd, oob, chip->ecc.postpad);
469 oob += chip->ecc.postpad;
473 size = mtd->oobsize - (oob - chip->oob_poi);
[all …]
H A Dnand_base.c49 /* Define default oob placement schemes for large and small page devices */
435 * specify how to write bad block markers to OOB (chip->block_markbad).
438 * (1) erase the affected block, to allow OOB marker to be written cleanly
439 * (2) write bad block marker to OOB area of affected block (unless flag
453 /* Attempt erase before marking OOB */ in nand_block_markbad_lowlevel()
460 /* Write bad block marker to OOB */ in nand_block_markbad_lowlevel()
621 /* OOB area */ in nand_command()
1176 * nand_read_oob_op - Do a READ OOB operation
1179 * @offset_in_oob: offset within the OOB area
1183 * This function issues a READ OOB operation.
[all …]
H A Drockchip_nand.c283 static void rockchip_nand_read_extra_oob(struct mtd_info *mtd, u8 *oob) in rockchip_nand_read_extra_oob() argument
295 rockchip_nand_read_buf(mtd, oob + offset, len); in rockchip_nand_read_extra_oob()
298 static void rockchip_nand_write_extra_oob(struct mtd_info *mtd, u8 *oob) in rockchip_nand_write_extra_oob() argument
310 rockchip_nand_write_buf(mtd, oob + offset, len); in rockchip_nand_write_extra_oob()
335 u8 *oob = chip->oob_poi + oob_off; in rockchip_nand_hw_syndrome_pio_read_page() local
360 memcpy_fromio(oob, rknand->regs + NANDC_REG_V6_SPARE1, 4); in rockchip_nand_hw_syndrome_pio_read_page()
362 memcpy_fromio(oob, rknand->regs + NANDC_REG_V6_SPARE0, 4); in rockchip_nand_hw_syndrome_pio_read_page()
375 const u8 *oob, in rockchip_nand_make_bootrom_compat() argument
383 return oob[3] | (oob[2] << 8) | (oob[1] << 16) | (oob[0] << 24); in rockchip_nand_make_bootrom_compat()
402 const u8 *oob = chip->oob_poi + oob_off; in rockchip_nand_hw_syndrome_pio_write_page() local
[all …]
H A Drockchip_nand_v9.c284 static void rockchip_nand_read_extra_oob(struct mtd_info *mtd, u8 *oob) in rockchip_nand_read_extra_oob() argument
296 rockchip_nand_read_buf(mtd, oob + offset, len); in rockchip_nand_read_extra_oob()
299 static void rockchip_nand_write_extra_oob(struct mtd_info *mtd, u8 *oob) in rockchip_nand_write_extra_oob() argument
311 rockchip_nand_write_buf(mtd, oob + offset, len); in rockchip_nand_write_extra_oob()
336 u8 *oob = chip->oob_poi + oob_off; in rockchip_nand_hw_syndrome_pio_read_page() local
361 memcpy_fromio(oob, rknand->regs + NANDC_REG_V9_SPARE1, 4); in rockchip_nand_hw_syndrome_pio_read_page()
363 memcpy_fromio(oob, rknand->regs + NANDC_REG_V9_SPARE0, 4); in rockchip_nand_hw_syndrome_pio_read_page()
376 const u8 *oob, in rockchip_nand_make_bootrom_compat() argument
384 return oob[3] | (oob[2] << 8) | (oob[1] << 16) | (oob[0] << 24); in rockchip_nand_make_bootrom_compat()
403 const u8 *oob = chip->oob_poi + oob_off; in rockchip_nand_hw_syndrome_pio_write_page() local
[all …]
H A Ddenali.c420 * happened in OOB, so we ignore it. It's no need for in denali_sw_ecc_fixup()
646 /* BBM at the beginning of the OOB area */ in denali_oob_xfer()
654 /* OOB ECC */ in denali_oob_xfer()
681 /* OOB free */ in denali_oob_xfer()
731 uint8_t *oob = chip->oob_poi; in denali_read_page_raw() local
733 /* BBM at the beginning of the OOB area */ in denali_read_page_raw()
734 memcpy(oob, tmp_buf + writesize, oob_skip); in denali_read_page_raw()
735 oob += oob_skip; in denali_read_page_raw()
737 /* OOB ECC */ in denali_read_page_raw()
747 memcpy(oob, tmp_buf + pos, len); in denali_read_page_raw()
[all …]
/OK3568_Linux_fs/kernel/drivers/mtd/
H A Dsm_ftl.c127 /* ----------------------- oob helpers -------------------------------------- */
148 static int sm_read_lba(struct sm_oob *oob) in sm_read_lba() argument
157 if (!memcmp(oob, erased_pattern, SM_OOB_SIZE)) in sm_read_lba()
161 lba_test = *(uint16_t *)oob->lba_copy1 ^ *(uint16_t*)oob->lba_copy2; in sm_read_lba()
166 lba = sm_get_lba(oob->lba_copy1); in sm_read_lba()
169 lba = sm_get_lba(oob->lba_copy2); in sm_read_lba()
174 static void sm_write_lba(struct sm_oob *oob, uint16_t lba) in sm_write_lba() argument
186 oob->lba_copy1[0] = oob->lba_copy2[0] = tmp[0]; in sm_write_lba()
187 oob->lba_copy1[1] = oob->lba_copy2[1] = tmp[1]; in sm_write_lba()
217 static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob) in sm_correct_sector() argument
[all …]
H A Dnftlcore.c121 * Read oob data from flash
142 * Write oob data to flash
165 * Write data and oob to flash
168 size_t *retlen, uint8_t *buf, uint8_t *oob) in nftl_write() argument
177 ops.oobbuf = oob; in nftl_write()
241 struct nftl_oob oob; in NFTL_foldchain() local
268 (char *)&oob); in NFTL_foldchain()
270 foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; in NFTL_foldchain()
281 status = oob.b.Status | oob.b.Status1; in NFTL_foldchain()
380 oob.u.c.FoldMark = oob.u.c.FoldMark1 = cpu_to_le16(FOLD_MARK_IN_PROGRESS); in NFTL_foldchain()
[all …]
H A Dinftlcore.c134 * Read oob data from flash
154 * Write oob data to flash
174 * Write data and oob to flash
177 size_t *retlen, uint8_t *buf, uint8_t *oob) in inftl_write() argument
185 ops.oobbuf = oob; in inftl_write()
244 struct inftl_oob oob; in INFTL_foldchain() local
274 (char *)&oob) < 0) in INFTL_foldchain()
277 status = oob.b.Status | oob.b.Status1; in INFTL_foldchain()
347 memset(&oob, 0xff, sizeof(struct inftl_oob)); in INFTL_foldchain()
348 oob.b.Status = oob.b.Status1 = SECTOR_USED; in INFTL_foldchain()
[all …]
/OK3568_Linux_fs/buildroot/dl/sox/git/src/
H A Dsmp.c83 ft->oob.loops[i].start = trailer->loops[i].start; in readtrailer()
85 ft->oob.loops[i].length = in readtrailer()
88 ft->oob.loops[i].type = trailer->loops[i].type; in readtrailer()
90 ft->oob.loops[i].count = trailer->loops[i].count; in readtrailer()
116 if (ft->oob.loops[i].type != 0) { in settrailer()
117 trailer->loops[i].start = ft->oob.loops[i].start > UINT_MAX in settrailer()
119 : ft->oob.loops[i].start; in settrailer()
121 trailer->loops[i].end = ft->oob.loops[i].start + ft->oob.loops[i].length > UINT_MAX in settrailer()
123 : ft->oob.loops[i].start + ft->oob.loops[i].length; in settrailer()
124 trailer->loops[i].type = ft->oob.loops[i].type; in settrailer()
[all …]
H A Daiff.c225 lsx_readsb(ft, &(ft->oob.instr.MIDInote)); in lsx_aiffstartread()
227 lsx_readsb(ft, &(ft->oob.instr.MIDIlow)); in lsx_aiffstartread()
228 lsx_readsb(ft, &(ft->oob.instr.MIDIhi)); in lsx_aiffstartread()
235 ft->oob.loops[0].type = looptype; in lsx_aiffstartread()
239 ft->oob.loops[1].type = looptype; in lsx_aiffstartread()
269 sox_append_comments(&ft->oob.comments, annotation); in lsx_aiffstartread()
280 sox_append_comments(&ft->oob.comments, comment); in lsx_aiffstartread()
415 ft->oob.instr.nloops = 0; in lsx_aiffstartread()
416 if (ft->oob.loops[0].type != 0) { in lsx_aiffstartread()
417 ft->oob.loops[0].start = marks[slbIndex].position; in lsx_aiffstartread()
[all …]
/OK3568_Linux_fs/kernel/drivers/mtd/nand/raw/
H A Dsm_common.h9 /* Full oob structure as written on the flash */
24 /* oob area is also 16 bytes, but might be from two pages */
39 static inline int sm_sector_valid(struct sm_oob *oob) in sm_sector_valid() argument
41 return hweight16(oob->data_status) >= 5; in sm_sector_valid()
44 static inline int sm_block_valid(struct sm_oob *oob) in sm_block_valid() argument
46 return hweight16(oob->block_status) >= 7; in sm_block_valid()
49 static inline int sm_block_erased(struct sm_oob *oob) in sm_block_erased() argument
55 if (!memcmp(oob, erased_pattern, sizeof(*oob))) in sm_block_erased()
H A Dnand_base.c340 * nand_fill_oob - [INTERN] Transfer client buffer to oob
342 * @oob: oob data buffer
343 * @len: oob data write length
344 * @ops: oob ops structure
346 static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, size_t len, in nand_fill_oob() argument
353 * Initialise to all 0xFF, to avoid the possibility of left over OOB in nand_fill_oob()
354 * data from a previous OOB read. in nand_fill_oob()
362 memcpy(chip->oob_poi + ops->ooboffs, oob, len); in nand_fill_oob()
363 return oob + len; in nand_fill_oob()
366 ret = mtd_ooblayout_set_databytes(mtd, oob, chip->oob_poi, in nand_fill_oob()
[all …]
H A Dsunxi_nand.c534 * the randomizer engine does internally before de/scrambling OOB data.
716 static void sunxi_nfc_hw_ecc_get_prot_oob_bytes(struct nand_chip *nand, u8 *oob, in sunxi_nfc_hw_ecc_get_prot_oob_bytes() argument
722 oob); in sunxi_nfc_hw_ecc_get_prot_oob_bytes()
726 sunxi_nfc_randomize_bbm(nand, page, oob); in sunxi_nfc_hw_ecc_get_prot_oob_bytes()
730 const u8 *oob, int step, in sunxi_nfc_hw_ecc_set_prot_oob_bytes() argument
738 memcpy(user_data, oob, sizeof(user_data)); in sunxi_nfc_hw_ecc_set_prot_oob_bytes()
740 oob = user_data; in sunxi_nfc_hw_ecc_set_prot_oob_bytes()
743 writel(sunxi_nfc_buf_to_user_data(oob), in sunxi_nfc_hw_ecc_set_prot_oob_bytes()
760 static int sunxi_nfc_hw_ecc_correct(struct nand_chip *nand, u8 *data, u8 *oob, in sunxi_nfc_hw_ecc_correct() argument
785 if (oob) in sunxi_nfc_hw_ecc_correct()
[all …]
/OK3568_Linux_fs/u-boot/include/linux/mtd/
H A Dbbm.h30 * @offs: offset of the pattern in the oob area of the page
31 * @veroffs: offset of the bbt version counter in the oob are of the page
44 * that the pattern and the version count are always located in the oob area
79 * unavailable, for example, if the NAND controller has a different data and OOB
93 * Use a flash based bad block table. By default, OOB identifier is saved in
94 * OOB area. This option is passed to the default bad block table function.
98 * Do not store flash based bad block table marker in the OOB area; store it
103 * Do not write new bad block markers to OOB; useful, e.g., when ECC covers
119 * Constants for oob configuration
135 * @badblockpos: [INTERN] position of the bad block marker in the oob area
H A Dmtd.h70 * struct mtd_oob_ops - oob operation operands
77 * @ooblen: number of oob bytes to write/read
78 * @oobretlen: number of oob bytes written/read
79 * @ooboffs: offset of oob data in the oob area (only relevant when
81 * @datbuf: data buffer - if NULL only oob data are read/written
82 * @oobbuf: oob data buffer
84 * Note, it is allowed to read more than one OOB area at one go, but not write.
85 * The interface assumes that the OOB write requests program only one page's
86 * OOB area.
111 * struct mtd_oob_region - oob region definition
[all …]
/OK3568_Linux_fs/kernel/include/uapi/mtd/
H A Dmtd-abi.h52 * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default)
53 * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas
73 * @ooblen: length of OOB buffer
75 * @usr_oob: user-provided OOB buffer
79 * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB
80 * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
134 __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */
174 /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
196 /* Write data to OOB (64-bit version) */
198 /* Read data from OOB (64-bit version) */
[all …]
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/arm/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/include/mtd/
H A Dmtd-abi.h52 * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default)
53 * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas
73 * @ooblen: length of OOB buffer
75 * @usr_oob: user-provided OOB buffer
79 * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB
80 * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
133 __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */
173 /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
195 /* Write data to OOB (64-bit version) */
197 /* Read data from OOB (64-bit version) */
[all …]
/OK3568_Linux_fs/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc/usr/include/mtd/
H A Dmtd-abi.h52 * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default)
53 * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas
73 * @ooblen: length of OOB buffer
75 * @usr_oob: user-provided OOB buffer
79 * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB
80 * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
133 __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */
173 /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
195 /* Write data to OOB (64-bit version) */
197 /* Read data from OOB (64-bit version) */
[all …]
/OK3568_Linux_fs/kernel/include/linux/mtd/
H A Dbbm.h24 * @offs: offset of the pattern in the oob area of the page
25 * @veroffs: offset of the bbt version counter in the oob are of the page
38 * that the pattern and the version count are always located in the oob area
73 * unavailable, for example, if the NAND controller has a different data and OOB
84 * Use a flash based bad block table. By default, OOB identifier is saved in
85 * OOB area. This option is passed to the default bad block table function.
89 * Do not store flash based bad block table marker in the OOB area; store it
94 * Do not write new bad block markers to OOB; useful, e.g., when ECC covers
/OK3568_Linux_fs/u-boot/include/mtd/
H A Dmtd-abi.h43 * @MTD_OPS_PLACE_OOB: OOB data are placed at the given offset (default)
44 * @MTD_OPS_AUTO_OOB: OOB data are automatically placed at the free areas
64 * @ooblen: length of OOB buffer
66 * @usr_oob: user-provided OOB buffer
70 * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB
71 * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
123 __u32 oobsize; /* Amount of OOB data per block (e.g. 16) */
163 /* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
185 /* Write data to OOB (64-bit version) */
187 /* Read data from OOB (64-bit version) */
[all …]
/OK3568_Linux_fs/kernel/drivers/mtd/devices/
H A Ddocg3.c40 * - a 1 byte Hamming code stored in the OOB for each page
41 * - a 7 bytes BCH code stored in the OOB for each page
594 * reading OOB only or write status byte).
625 * It's in fact recv_ecc ^ calc_ecc, where recv_ecc was read from OOB
859 * @ops: the mtd oob structure
861 * Reads flash memory OOB area of pages.
888 doc_dbg("doc_read_oob(from=%lld, mode=%d, data=(%p:%zu), oob=(%p:%zu))\n", in doc_read_oob()
928 doc_dbg("OOB - INFO: %*phC\n", 7, oobbuf); in doc_read_oob()
929 doc_dbg("OOB - HAMMING: %02x\n", oobbuf[7]); in doc_read_oob()
930 doc_dbg("OOB - BCH_ECC: %*phC\n", 7, oobbuf + 8); in doc_read_oob()
[all …]
/OK3568_Linux_fs/kernel/drivers/mtd/tests/
H A Dreadtest.c68 pr_err("error: read oob failed at " in read_eraseblock_by_page()
88 int pg, oob; in dump_eraseblock() local
103 pr_info("dumping oob from eraseblock %d\n", ebnum); in dump_eraseblock()
106 for (oob = 0; oob < n;) { in dump_eraseblock()
110 for (j = 0; j < 32 && oob < n; j++, oob++, i++) in dump_eraseblock()
154 "eraseblock %u, OOB size %u\n", in mtd_readtest_init()

12345678910>>...20