Lines Matching refs:section
872 static int brcmnand_hamming_ooblayout_ecc(struct mtd_info *mtd, int section, in brcmnand_hamming_ooblayout_ecc() argument
881 if (section >= sectors) in brcmnand_hamming_ooblayout_ecc()
884 oobregion->offset = (section * sas) + 6; in brcmnand_hamming_ooblayout_ecc()
890 static int brcmnand_hamming_ooblayout_free(struct mtd_info *mtd, int section, in brcmnand_hamming_ooblayout_free() argument
899 if (section >= sectors * 2) in brcmnand_hamming_ooblayout_free()
902 oobregion->offset = (section / 2) * sas; in brcmnand_hamming_ooblayout_free()
904 if (section & 1) { in brcmnand_hamming_ooblayout_free()
911 if (!section) { in brcmnand_hamming_ooblayout_free()
930 static int brcmnand_bch_ooblayout_ecc(struct mtd_info *mtd, int section, in brcmnand_bch_ooblayout_ecc() argument
939 if (section >= sectors) in brcmnand_bch_ooblayout_ecc()
942 oobregion->offset = (section * (sas + 1)) - chip->ecc.bytes; in brcmnand_bch_ooblayout_ecc()
948 static int brcmnand_bch_ooblayout_free_lp(struct mtd_info *mtd, int section, in brcmnand_bch_ooblayout_free_lp() argument
957 if (section >= sectors) in brcmnand_bch_ooblayout_free_lp()
963 oobregion->offset = section * sas; in brcmnand_bch_ooblayout_free_lp()
966 if (!section) { in brcmnand_bch_ooblayout_free_lp()
974 static int brcmnand_bch_ooblayout_free_sp(struct mtd_info *mtd, int section, in brcmnand_bch_ooblayout_free_sp() argument
982 if (section > 1 || sas - chip->ecc.bytes < 6 || in brcmnand_bch_ooblayout_free_sp()
983 (section && sas - chip->ecc.bytes == 6)) in brcmnand_bch_ooblayout_free_sp()
986 if (!section) { in brcmnand_bch_ooblayout_free_sp()