Lines Matching refs:bbm
60 struct bbm_info *bbm = this->bbm; in create_bbt() local
80 numblocks = this->chipsize >> (bbm->bbt_erase_shift - 1); in create_bbt()
104 bbm->bbt[i >> 3] |= 0x03 << (i & 0x6); in create_bbt()
117 from += (1 << bbm->bbt_erase_shift); in create_bbt()
148 struct bbm_info *bbm = this->bbm; in onenand_isbad_bbt() local
154 res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03; in onenand_isbad_bbt()
185 struct bbm_info *bbm = this->bbm; in onenand_scan_bbt() local
190 bbm->bbt = kzalloc(len, GFP_KERNEL); in onenand_scan_bbt()
191 if (!bbm->bbt) in onenand_scan_bbt()
195 bbm->badblockpos = ONENAND_BADBLOCK_POS; in onenand_scan_bbt()
198 bbm->bbt_erase_shift = this->erase_shift; in onenand_scan_bbt()
200 if (!bbm->isbad_bbt) in onenand_scan_bbt()
201 bbm->isbad_bbt = onenand_isbad_bbt; in onenand_scan_bbt()
206 kfree(bbm->bbt); in onenand_scan_bbt()
207 bbm->bbt = NULL; in onenand_scan_bbt()
236 struct bbm_info *bbm; in onenand_default_bbt() local
238 this->bbm = kzalloc(sizeof(struct bbm_info), GFP_KERNEL); in onenand_default_bbt()
239 if (!this->bbm) in onenand_default_bbt()
242 bbm = this->bbm; in onenand_default_bbt()
245 if (!bbm->badblock_pattern) in onenand_default_bbt()
246 bbm->badblock_pattern = &largepage_memorybased; in onenand_default_bbt()
248 return onenand_scan_bbt(mtd, bbm->badblock_pattern); in onenand_default_bbt()