Lines Matching refs:bbm
59 struct bbm_info *bbm = this->bbm; in create_bbt() local
79 numblocks = this->chipsize >> (bbm->bbt_erase_shift - 1); in create_bbt()
103 bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); in create_bbt()
116 from += (1 << bbm->bbt_erase_shift); in create_bbt()
147 struct bbm_info *bbm = this->bbm; in onenand_isbad_bbt() local
153 res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; in onenand_isbad_bbt()
184 struct bbm_info *bbm = this->bbm; in onenand_scan_bbt() local
189 bbm->bbt = kzalloc(len, GFP_KERNEL); in onenand_scan_bbt()
190 if (!bbm->bbt) in onenand_scan_bbt()
194 bbm->bbt_erase_shift = this->erase_shift; in onenand_scan_bbt()
196 if (!bbm->isbad_bbt) in onenand_scan_bbt()
197 bbm->isbad_bbt = onenand_isbad_bbt; in onenand_scan_bbt()
202 kfree(bbm->bbt); in onenand_scan_bbt()
203 bbm->bbt = NULL; in onenand_scan_bbt()
232 struct bbm_info *bbm; in onenand_default_bbt() local
234 this->bbm = kzalloc(sizeof(struct bbm_info), GFP_KERNEL); in onenand_default_bbt()
235 if (!this->bbm) in onenand_default_bbt()
238 bbm = this->bbm; in onenand_default_bbt()
241 if (!bbm->badblock_pattern) in onenand_default_bbt()
242 bbm->badblock_pattern = &largepage_memorybased; in onenand_default_bbt()
244 return onenand_scan_bbt(mtd, bbm->badblock_pattern); in onenand_default_bbt()