/drivers/mtd/ |
D | sm_ftl.c | 151 static int sm_read_lba(struct sm_oob *oob) in sm_read_lba() argument 160 if (!memcmp(oob, erased_pattern, SM_OOB_SIZE)) in sm_read_lba() 164 lba_test = *(uint16_t *)oob->lba_copy1 ^ *(uint16_t*)oob->lba_copy2; in sm_read_lba() 169 lba = sm_get_lba(oob->lba_copy1); in sm_read_lba() 172 lba = sm_get_lba(oob->lba_copy2); in sm_read_lba() 177 static void sm_write_lba(struct sm_oob *oob, uint16_t lba) in sm_write_lba() argument 189 oob->lba_copy1[0] = oob->lba_copy2[0] = tmp[0]; in sm_write_lba() 190 oob->lba_copy1[1] = oob->lba_copy2[1] = tmp[1]; in sm_write_lba() 220 static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob) in sm_correct_sector() argument 225 if (__nand_correct_data(buffer, ecc, oob->ecc1, SM_SMALL_PAGE) < 0) in sm_correct_sector() [all …]
|
D | nftlcore.c | 181 size_t *retlen, uint8_t *buf, uint8_t *oob) in nftl_write() argument 190 ops.oobbuf = oob; in nftl_write() 254 struct nftl_oob oob; in NFTL_foldchain() local 281 (char *)&oob); in NFTL_foldchain() 283 foldmark = oob.u.c.FoldMark | oob.u.c.FoldMark1; in NFTL_foldchain() 294 status = oob.b.Status | oob.b.Status1; in NFTL_foldchain() 393 oob.u.c.FoldMark = oob.u.c.FoldMark1 = cpu_to_le16(FOLD_MARK_IN_PROGRESS); in NFTL_foldchain() 394 oob.u.c.unused = 0xffffffff; in NFTL_foldchain() 396 8, &retlen, (char *)&oob.u); in NFTL_foldchain() 433 memset(&oob, 0xff, sizeof(struct nftl_oob)); in NFTL_foldchain() [all …]
|
D | inftlcore.c | 190 size_t *retlen, uint8_t *buf, uint8_t *oob) in inftl_write() argument 198 ops.oobbuf = oob; in inftl_write() 257 struct inftl_oob oob; in INFTL_foldchain() local 287 (char *)&oob) < 0) in INFTL_foldchain() 290 status = oob.b.Status | oob.b.Status1; in INFTL_foldchain() 360 memset(&oob, 0xff, sizeof(struct inftl_oob)); in INFTL_foldchain() 361 oob.b.Status = oob.b.Status1 = SECTOR_USED; in INFTL_foldchain() 365 movebuf, (char *)&oob); in INFTL_foldchain() 479 struct inftl_oob oob; in INFTL_findwriteunit() local 587 + 8, 8, &retlen, (char *)&oob.u); in INFTL_findwriteunit() [all …]
|
/drivers/mtd/nand/ |
D | sm_common.h | 42 static inline int sm_sector_valid(struct sm_oob *oob) in sm_sector_valid() argument 44 return hweight16(oob->data_status) >= 5; in sm_sector_valid() 47 static inline int sm_block_valid(struct sm_oob *oob) in sm_block_valid() argument 49 return hweight16(oob->block_status) >= 7; in sm_block_valid() 52 static inline int sm_block_erased(struct sm_oob *oob) in sm_block_erased() argument 58 if (!memcmp(oob, erased_pattern, sizeof(*oob))) in sm_block_erased()
|
D | sunxi_nand.c | 865 static void sunxi_nfc_hw_ecc_get_prot_oob_bytes(struct mtd_info *mtd, u8 *oob, in sunxi_nfc_hw_ecc_get_prot_oob_bytes() argument 872 oob); in sunxi_nfc_hw_ecc_get_prot_oob_bytes() 876 sunxi_nfc_randomize_bbm(mtd, page, oob); in sunxi_nfc_hw_ecc_get_prot_oob_bytes() 880 const u8 *oob, int step, in sunxi_nfc_hw_ecc_set_prot_oob_bytes() argument 889 memcpy(user_data, oob, sizeof(user_data)); in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 891 oob = user_data; in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 894 writel(sunxi_nfc_buf_to_user_data(oob), in sunxi_nfc_hw_ecc_set_prot_oob_bytes() 909 static int sunxi_nfc_hw_ecc_correct(struct mtd_info *mtd, u8 *data, u8 *oob, in sunxi_nfc_hw_ecc_correct() argument 935 if (oob) in sunxi_nfc_hw_ecc_correct() 936 memset(oob, pattern, ecc->bytes + 4); in sunxi_nfc_hw_ecc_correct() [all …]
|
D | nand_base.c | 1423 uint8_t *oob = chip->oob_poi; in nand_read_page_raw_syndrome() local 1431 chip->read_buf(mtd, oob, chip->ecc.prepad); in nand_read_page_raw_syndrome() 1432 oob += chip->ecc.prepad; in nand_read_page_raw_syndrome() 1435 chip->read_buf(mtd, oob, eccbytes); in nand_read_page_raw_syndrome() 1436 oob += eccbytes; in nand_read_page_raw_syndrome() 1439 chip->read_buf(mtd, oob, chip->ecc.postpad); in nand_read_page_raw_syndrome() 1440 oob += chip->ecc.postpad; in nand_read_page_raw_syndrome() 1444 size = mtd->oobsize - (oob - chip->oob_poi); in nand_read_page_raw_syndrome() 1446 chip->read_buf(mtd, oob, size); in nand_read_page_raw_syndrome() 1744 uint8_t *oob = chip->oob_poi; in nand_read_page_syndrome() local [all …]
|
D | tango_nand.c | 373 static void raw_read(struct nand_chip *chip, u8 *buf, u8 *oob) in raw_read() argument 376 u8 *oob_orig = oob; in raw_read() 383 if (oob) in raw_read() 384 oob += BBM_SIZE; in raw_read() 386 aux_read(chip, &oob, METADATA_SIZE, &pos); in raw_read() 390 aux_read(chip, &oob, ecc_size, &pos); in raw_read() 397 aux_read(chip, &oob, ecc_size, &pos); in raw_read() 400 static void raw_write(struct nand_chip *chip, const u8 *buf, const u8 *oob) in raw_write() argument 403 const u8 *oob_orig = oob; in raw_write() 410 if (oob) in raw_write() [all …]
|
D | sm_common.c | 105 struct sm_oob oob; in sm_block_markbad() local 108 memset(&oob, -1, SM_OOB_SIZE); in sm_block_markbad() 109 oob.block_status = 0x0F; in sm_block_markbad() 116 ops.oobbuf = (void *)&oob; in sm_block_markbad()
|
D | denali.c | 771 uint8_t *oob = chip->oob_poi; in denali_read_page_raw() local 774 memcpy(oob, dma_buf + writesize, oob_skip); in denali_read_page_raw() 775 oob += oob_skip; in denali_read_page_raw() 787 memcpy(oob, dma_buf + pos, len); in denali_read_page_raw() 788 oob += len; in denali_read_page_raw() 791 memcpy(oob, dma_buf + writesize + oob_skip, in denali_read_page_raw() 793 oob += len; in denali_read_page_raw() 798 len = oobsize - (oob - chip->oob_poi); in denali_read_page_raw() 799 memcpy(oob, dma_buf + size - len, len); in denali_read_page_raw() 905 const uint8_t *oob = chip->oob_poi; in denali_write_page_raw() local [all …]
|
D | fsl_elbc_nand.c | 75 unsigned int oob; /* Non zero if operating on OOB data */ member 165 static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob) in set_addr() argument 184 (oob ? FPAR_LP_MS : 0) | column); in set_addr() 194 (oob ? FPAR_SP_MS : 0) | column); in set_addr() 202 if (oob) in set_addr() 289 static void fsl_elbc_do_read(struct nand_chip *chip, int oob) in fsl_elbc_do_read() argument 312 if (oob) in fsl_elbc_do_read() 438 elbc_fcm_ctrl->oob = 1; in fsl_elbc_cmdfunc() 441 elbc_fcm_ctrl->oob = 0; in fsl_elbc_cmdfunc() 468 if (elbc_fcm_ctrl->oob) in fsl_elbc_cmdfunc() [all …]
|
D | fsl_ifc_nand.c | 62 unsigned int oob; /* Non zero if operating on OOB data */ member 151 static void set_addr(struct mtd_info *mtd, int column, int page_addr, int oob) in set_addr() argument 162 ifc_out32((oob ? IFC_NAND_COL_MS : 0) | column, &ifc->ifc_nand.col0); in set_addr() 170 if (oob) in set_addr() 263 int oob, in fsl_ifc_do_read() argument 291 if (oob) in fsl_ifc_do_read() 397 ifc_nand_ctrl->oob = 0; in fsl_ifc_cmdfunc() 450 ifc_nand_ctrl->oob = 1; in fsl_ifc_cmdfunc() 453 set_addr(mtd, column, page_addr, ifc_nand_ctrl->oob); in fsl_ifc_cmdfunc() 459 if (ifc_nand_ctrl->oob) { in fsl_ifc_cmdfunc()
|
D | r852.c | 438 struct sm_oob *oob = (struct sm_oob *)ecc_code; in r852_ecc_calculate() local 450 oob->ecc1[0] = (ecc1) & 0xFF; in r852_ecc_calculate() 451 oob->ecc1[1] = (ecc1 >> 8) & 0xFF; in r852_ecc_calculate() 452 oob->ecc1[2] = (ecc1 >> 16) & 0xFF; in r852_ecc_calculate() 454 oob->ecc2[0] = (ecc2) & 0xFF; in r852_ecc_calculate() 455 oob->ecc2[1] = (ecc2 >> 8) & 0xFF; in r852_ecc_calculate() 456 oob->ecc2[2] = (ecc2 >> 16) & 0xFF; in r852_ecc_calculate()
|
D | cafe_nand.c | 400 u8 *oob = chip->oob_poi; in cafe_nand_read_page() local 428 oob[0] ^= pat[i] << 4; in cafe_nand_read_page() 431 oob[3*p/2 - 2048] ^= pat[i] >> 4; in cafe_nand_read_page() 432 oob[3*p/2 - 2047] ^= pat[i] << 4; in cafe_nand_read_page() 434 oob[3*p/2 - 2049] ^= pat[i] >> 8; in cafe_nand_read_page() 435 oob[3*p/2 - 2048] ^= pat[i]; in cafe_nand_read_page()
|
D | vf610_nfc.c | 530 uint8_t *oob, int page) in vf610_nfc_correct_data() argument 546 vf610_nfc_read_buf(mtd, oob, mtd->oobsize); in vf610_nfc_correct_data() 552 return nand_check_erased_ecc_chunk(dat, nfc->chip.ecc.size, oob, in vf610_nfc_correct_data()
|
D | fsmc_nand.c | 696 uint8_t *oob = (uint8_t *)&ecc_oob[0]; in fsmc_read_page_hwecc() local 724 chip->read_buf(mtd, oob + j, len); in fsmc_read_page_hwecc() 728 memcpy(&ecc_code[i], oob, chip->ecc.bytes); in fsmc_read_page_hwecc()
|
D | nand_bbt.c | 355 uint8_t *buf, uint8_t *oob) in scan_write_bbt() argument 363 ops.oobbuf = oob; in scan_write_bbt()
|
D | omap2.c | 1317 static int erased_sector_bitflips(u_char *data, u_char *oob, in erased_sector_bitflips() argument 1329 flip_bits += hweight8(~oob[i]); in erased_sector_bitflips() 1340 memset(oob, 0xFF, info->nand.ecc.bytes); in erased_sector_bitflips()
|
D | qcom_nandc.c | 1899 u8 *oob = chip->oob_poi; in qcom_nandc_write_oob() local 1918 mtd_ooblayout_get_databytes(mtd, nandc->data_buffer + data_size, oob, in qcom_nandc_write_oob()
|
/drivers/mtd/tests/ |
D | readtest.c | 95 int pg, oob; in dump_eraseblock() local 113 for (oob = 0; oob < n;) { in dump_eraseblock() 117 for (j = 0; j < 32 && oob < n; j++, oob++, i++) in dump_eraseblock()
|
/drivers/mtd/nand/brcmnand/ |
D | brcmnand.c | 1137 static int read_oob_from_regs(struct brcmnand_controller *ctrl, int i, u8 *oob, in read_oob_from_regs() argument 1149 oob[j] = oob_reg_read(ctrl, j); in read_oob_from_regs() 1161 const u8 *oob, int sas, int sector_1k) in write_oob_to_regs() argument 1173 (oob[j + 0] << 24) | in write_oob_to_regs() 1174 (oob[j + 1] << 16) | in write_oob_to_regs() 1175 (oob[j + 2] << 8) | in write_oob_to_regs() 1176 (oob[j + 3] << 0)); in write_oob_to_regs() 1598 u8 *oob, u64 *err_addr) in brcmnand_read_by_pio() argument 1631 if (oob) in brcmnand_read_by_pio() 1632 oob += read_oob_from_regs(ctrl, i, oob, in brcmnand_read_by_pio() [all …]
|
/drivers/mtd/devices/ |
D | docg3.c | 1283 const u_char *oob, int autoecc) in doc_write_page() argument 1305 if (oob && autoecc) { in doc_write_page() 1306 doc_write_page_putbytes(docg3, DOC_LAYOUT_OOB_PAGEINFO_SZ, oob); in doc_write_page() 1308 oob += DOC_LAYOUT_OOB_UNUSED_OFS; in doc_write_page() 1320 doc_write_page_putbytes(docg3, DOC_LAYOUT_OOB_UNUSED_SZ, oob); in doc_write_page() 1322 if (oob && !autoecc) in doc_write_page() 1323 doc_write_page_putbytes(docg3, DOC_LAYOUT_OOB_SIZE, oob); in doc_write_page() 1441 u8 oob[DOC_LAYOUT_OOB_SIZE]; in doc_write_oob() local 1491 memset(oob, 0, sizeof(oob)); in doc_write_oob() 1493 memcpy(oob, docg3->oob_write_buf, DOC_LAYOUT_OOB_SIZE); in doc_write_oob() [all …]
|
/drivers/mtd/nand/gpmi-nand/ |
D | gpmi-nand.c | 1477 uint8_t *oob = chip->oob_poi; in gpmi_ecc_read_page_raw() local 1502 memcpy(oob, tmp_buf, nfc_geo->metadata_size); in gpmi_ecc_read_page_raw() 1521 gpmi_copy_bits(oob, oob_bit_off, in gpmi_ecc_read_page_raw() 1533 memcpy(oob + oob_byte_off, in gpmi_ecc_read_page_raw() 1563 uint8_t *oob = chip->oob_poi; in gpmi_ecc_write_page_raw() local 1581 memcpy(tmp_buf, oob, nfc_geo->metadata_size); in gpmi_ecc_write_page_raw() 1599 oob, oob_bit_off, eccbits); in gpmi_ecc_write_page_raw() 1609 oob + oob_byte_off, mtd->oobsize - oob_byte_off); in gpmi_ecc_write_page_raw()
|
/drivers/staging/lustre/lustre/osc/ |
D | osc_lock.c | 773 struct osc_object *oob = cl2osc(obj); in osc_lock_to_lockless() local 781 ocd = &class_exp2cliimp(osc_export(oob))->imp_connect_data; in osc_lock_to_lockless() 787 (ols->ols_locklessable && osc_object_is_contended(oob)) || in osc_lock_to_lockless()
|
/drivers/mtd/onenand/ |
D | onenand_base.c | 1846 const u_char *oob = ops->oobbuf; in onenand_write_ops_nolock() local 1894 if (oob) { in onenand_write_ops_nolock() 1901 onenand_fill_auto_oob(mtd, oobbuf, oob, oobcolumn, thisooblen); in onenand_write_ops_nolock() 1903 memcpy(oobbuf + oobcolumn, oob, thisooblen); in onenand_write_ops_nolock() 1906 oob += thisooblen; in onenand_write_ops_nolock()
|