get_bbt_block (9) Linux Manual Page
get_bbt_block – Get the first valid eraseblock suitable to store a BBT
Synopsis
int get_bbt_block(struct nand_chip *this, struct nand_bbt_descr *td, struct nand_bbt_descr *md, int chip);
Arguments
this
-
- the NAND device
td
- the BBT description
md
- the mirror BBT descriptor
chip
- the CHIP selector
Description
This functions returns a positive block number pointing a valid eraseblock suitable to store a BBT (i.e. in the range reserved for BBT), or -ENOSPC if all blocks are already used of marked bad. If td->pages[chip] was already pointing to a valid block we re-use it, otherwise we search for the next valid one.
Author
Thomas Gleixner <tglx [at] linutronix.de>
- Author.
