/drivers/mtd/nand/ |
H A D | sm_common.h | 12 /* Full oob structure as written on the flash */ 27 /* oob area is also 16 bytes, but might be from two pages */ 42 static inline int sm_sector_valid(struct sm_oob *oob) argument 44 return hweight16(oob->data_status) >= 5; 47 static inline int sm_block_valid(struct sm_oob *oob) argument 49 return hweight16(oob->block_status) >= 7; 52 static inline int sm_block_erased(struct sm_oob *oob) argument 58 if (!memcmp(oob, erased_pattern, sizeof(*oob)))
|
H A D | sm_common.c | 26 /* because the 256 byte devices have page depenent oob layout */ 44 struct sm_oob oob; local 47 memset(&oob, -1, SM_OOB_SIZE); 48 oob.block_status = 0x0F; 55 ops.oobbuf = (void *)&oob;
|
H A D | nand_base.c | 52 /* Define default oob placement schemes for large and small page devices */ 1094 * Not for syndrome calculating ECC controllers, which use a special oob layout. 1113 * We need a special oob layout and handling even when OOB isn't used. 1121 uint8_t *oob = chip->oob_poi; local 1129 chip->read_buf(mtd, oob, chip->ecc.prepad); 1130 oob += chip->ecc.prepad; 1133 chip->read_buf(mtd, oob, eccbytes); 1134 oob += eccbytes; 1137 chip->read_buf(mtd, oob, chip->ecc.postpad); 1138 oob 1406 uint8_t *oob = chip->oob_poi; local 1454 nand_transfer_oob(struct nand_chip *chip, uint8_t *oob, struct mtd_oob_ops *ops, size_t len) argument 1538 uint8_t *bufpoi, *oob, *buf; local 2042 uint8_t *oob = chip->oob_poi; local 2207 uint8_t *oob = chip->oob_poi; local 2310 nand_fill_oob(struct mtd_info *mtd, uint8_t *oob, size_t len, struct mtd_oob_ops *ops) argument 2380 uint8_t *oob = ops->oobbuf; local [all...] |
H A D | fsl_elbc_nand.c | 76 unsigned int oob; /* Non zero if operating on OOB data */ member in struct:fsl_elbc_fcm_ctrl 145 static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob) argument 164 (oob ? FPAR_LP_MS : 0) | column); 174 (oob ? FPAR_SP_MS : 0) | column); 182 if (oob) 269 static void fsl_elbc_do_read(struct nand_chip *chip, int oob) argument 292 if (oob) 418 elbc_fcm_ctrl->oob = 1; 421 elbc_fcm_ctrl->oob = 0; 448 if (elbc_fcm_ctrl->oob) [all...] |
H A D | fsl_ifc_nand.c | 64 unsigned int oob; /* Non zero if operating on OOB data */ member in struct:fsl_ifc_nand_ctrl 232 static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob) argument 243 iowrite32be((oob ? IFC_NAND_COL_MS : 0) | column, &ifc->ifc_nand.col0); 251 if (oob) 261 u8 __iomem *oob = addr + mtd->writesize; local 272 if (__raw_readb(&oob[pos]) != 0xff) 371 int oob, 399 if (oob) 502 ifc_nand_ctrl->oob = 0; 557 ifc_nand_ctrl->oob 370 fsl_ifc_do_read(struct nand_chip *chip, int oob, struct mtd_info *mtd) argument [all...] |
H A D | r852.c | 438 struct sm_oob *oob = (struct sm_oob *)ecc_code; local 450 oob->ecc1[0] = (ecc1) & 0xFF; 451 oob->ecc1[1] = (ecc1 >> 8) & 0xFF; 452 oob->ecc1[2] = (ecc1 >> 16) & 0xFF; 454 oob->ecc2[0] = (ecc2) & 0xFF; 455 oob->ecc2[1] = (ecc2 >> 8) & 0xFF; 456 oob->ecc2[2] = (ecc2 >> 16) & 0xFF;
|
H A D | cafe_nand.c | 375 * we need a special oob layout and handling. 393 u8 *oob = chip->oob_poi; local 421 oob[0] ^= pat[i] << 4; 424 oob[3*p/2 - 2048] ^= pat[i] >> 4; 425 oob[3*p/2 - 2047] ^= pat[i] << 4; 427 oob[3*p/2 - 2049] ^= pat[i] >> 8; 428 oob[3*p/2 - 2048] ^= pat[i];
|
H A D | fsmc_nand.c | 727 * end up reading 14 bytes (7 words) from oob. The local array is 731 uint8_t *oob = (uint8_t *)&ecc_oob[0]; local 753 chip->read_buf(mtd, oob + j, len); 757 memcpy(&ecc_code[i], oob, chip->ecc.bytes); 804 * would result in an ecc error because the oob data is also 1107 dev_warn(&pdev->dev, "No oob scheme defined for oobsize %d\n", 1123 dev_warn(&pdev->dev, "No oob scheme defined for oobsize %d\n",
|
H A D | omap2.c | 134 #define BCH_ECC_SIZE0 0x0 /* ecc_size0 = 0, no oob protection */ 147 /* oob info generated runtime depending on ecc algorithm and layout selected */ 1296 * @oob: oob buffer 1303 static int erased_sector_bitflips(u_char *data, u_char *oob, argument 1315 flip_bits += hweight8(~oob[i]); 1326 memset(oob, 0xFF, info->nand.ecc.bytes); 1480 pr_debug("bitflip@oob[%d]=%x\n", 1560 uint8_t *oob = &chip->oob_poi[eccpos[0]]; local 1571 /* Read oob byte [all...] |
H A D | atmel_nand.c | 66 /* oob layout for large page size 79 /* oob layout for small page size 446 /* only use DMA for bigger than oob size: better performances */ 462 /* only use DMA for bigger than oob size: better performances */ 934 uint8_t *oob = chip->oob_poi; local 944 chip->read_buf(mtd, oob, mtd->oobsize); 957 bitflips = pmecc_correction(mtd, stat, buf, &oob[eccpos[0]]); 1172 /* set ECC page size and oob layout */ 1283 uint8_t *oob = chip->oob_poi; local 1316 ecc_pos = oob [all...] |
H A D | nand_bbt.c | 356 /* Scan write data with oob to flash */ 358 uint8_t *buf, uint8_t *oob) 366 ops.oobbuf = oob; 430 * Read the full oob until read_oob is fixed to handle single 525 * The bbt ident pattern resides in the oob area of the first page in a block. 733 /* Read oob data */ 772 /* Pattern is located in oob area of first page */ 1110 /* Allocate a temporary buffer for one eraseblock incl. oob */ 1124 /* Search the bad block table using a pattern in oob */ 1158 /* Allocate a temporary buffer for one eraseblock incl. oob */ 357 scan_write_bbt(struct mtd_info *mtd, loff_t offs, size_t len, uint8_t *buf, uint8_t *oob) argument [all...] |
/drivers/mtd/ |
H A D | nftlcore.c | 134 * Read oob data from flash 155 * Write oob data to flash 178 * Write data and oob to flash 181 size_t *retlen, uint8_t *buf, uint8_t *oob) 190 ops.oobbuf = oob; 254 struct nftl_oob oob; local 281 (char *)&oob); 283 foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; 294 status = oob 180 nftl_write(struct mtd_info *mtd, loff_t offs, size_t len, size_t *retlen, uint8_t *buf, uint8_t *oob) argument 544 struct nftl_oob oob; local 694 struct nftl_oob oob; local [all...] |
H A D | sm_ftl.c | 130 /* ----------------------- oob helpers -------------------------------------- */ 151 static int sm_read_lba(struct sm_oob *oob) argument 160 if (!memcmp(oob, erased_pattern, SM_OOB_SIZE)) 164 lba_test = *(uint16_t *)oob->lba_copy1 ^ *(uint16_t*)oob->lba_copy2; 169 lba = sm_get_lba(oob->lba_copy1); 172 lba = sm_get_lba(oob->lba_copy2); 177 static void sm_write_lba(struct sm_oob *oob, uint16_t lba) argument 189 oob->lba_copy1[0] = oob 219 sm_correct_sector(uint8_t *buffer, struct sm_oob *oob) argument 236 sm_read_sector(struct sm_ftl *ftl, int zone, int block, int boffset, uint8_t *buffer, struct sm_oob *oob) argument 318 sm_write_sector(struct sm_ftl *ftl, int zone, int block, int boffset, uint8_t *buffer, struct sm_oob *oob) argument 369 struct sm_oob oob; local 430 struct sm_oob oob; local 513 struct sm_oob oob; local 668 struct sm_oob oob; local 688 struct sm_oob oob; local 761 struct sm_oob oob; local [all...] |
H A D | inftlcore.c | 147 * Read oob data from flash 167 * Write oob data to flash 187 * Write data and oob to flash 190 size_t *retlen, uint8_t *buf, uint8_t *oob) 198 ops.oobbuf = oob; 257 struct inftl_oob oob; local 287 (char *)&oob) < 0) 290 status = oob.b.Status | oob.b.Status1; 360 memset(&oob, 189 inftl_write(struct mtd_info *mtd, loff_t offs, size_t len, size_t *retlen, uint8_t *buf, uint8_t *oob) argument 479 struct inftl_oob oob; local 824 struct inftl_oob oob; local [all...] |
/drivers/mtd/tests/ |
H A D | readtest.c | 75 pr_err("error: read oob failed at " 95 int pg, oob; local 110 pr_info("dumping oob from eraseblock %d\n", ebnum); 113 for (oob = 0; oob < n;) { 117 for (j = 0; j < 32 && oob < n; j++, oob++, i++)
|
/drivers/mtd/devices/ |
H A D | docg3.c | 850 * @ops: the mtd oob structure 879 doc_dbg("doc_read_oob(from=%lld, mode=%d, data=(%p:%zu), oob=(%p:%zu))\n", 1246 * @oob: buffer to get out of band bytes from (can be NULL if no OOB should be 1251 * computations. Its value is not meaningfull is oob == NULL. 1260 const u_char *oob, int autoecc) 1282 if (oob && autoecc) { 1283 doc_write_page_putbytes(docg3, DOC_LAYOUT_OOB_PAGEINFO_SZ, oob); 1285 oob += DOC_LAYOUT_OOB_UNUSED_OFS; 1297 doc_write_page_putbytes(docg3, DOC_LAYOUT_OOB_UNUSED_SZ, oob); 1299 if (oob 1259 doc_write_page(struct docg3 *docg3, loff_t to, const u_char *buf, const u_char *oob, int autoecc) argument 1418 u8 oob[DOC_LAYOUT_OOB_SIZE]; local [all...] |
/drivers/staging/lustre/lustre/osc/ |
H A D | osc_lock.c | 954 struct osc_object *oob = cl2osc(obj); local 962 ocd = &class_exp2cliimp(osc_export(oob))->imp_connect_data; 968 (ols->ols_locklessable && osc_object_is_contended(oob)) ||
|
/drivers/mtd/onenand/ |
H A D | onenand_base.c | 68 * flexonenand_oob_128 - oob info for Flex-Onenand with 4KB page 89 * onenand_oob_128 - oob info for OneNAND with 4KB page 118 * onenand_oob_64 - oob info for large (2KB) page 135 * onenand_oob_32 - oob info for middle (1KB) page 1017 * onenand_transfer_auto_oob - [INTERN] oob auto-placement transfer 1020 * @param column oob offset to read from 1021 * @param thislen oob length to read 1105 * @param ops: oob operation description structure 1211 * @param ops: oob operation description structure 1289 /* Read oob are 1873 const u_char *oob = ops->oobbuf; local [all...] |