Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
onenand_bbt.c File Reference
#include <linux/slab.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/onenand.h>
#include <linux/export.h>

Go to the source code of this file.

Functions

int onenand_scan_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd)
 
int onenand_default_bbt (struct mtd_info *mtd)
 
 EXPORT_SYMBOL (onenand_scan_bbt)
 
 EXPORT_SYMBOL (onenand_default_bbt)
 

Function Documentation

EXPORT_SYMBOL ( onenand_scan_bbt  )
EXPORT_SYMBOL ( onenand_default_bbt  )
int onenand_default_bbt ( struct mtd_info mtd)

onenand_default_bbt - [OneNAND Interface] Select a default bad block table for the device

Parameters
mtdMTD device structure

This function selects the default bad block table support for the device and calls the onenand_scan_bbt function

Definition at line 234 of file onenand_bbt.c.

int onenand_scan_bbt ( struct mtd_info mtd,
struct nand_bbt_descr bd 
)

onenand_scan_bbt - [OneNAND Interface] scan, find, read and maybe create bad block table(s)

Parameters
mtdMTD device structure
bddescriptor for the good/bad block search pattern

The function checks, if a bad block table(s) is/are already available. If not it scans the device for manufacturer marked good / bad blocks and writes the bad block table(s) to the selected place.

The bad block table memory is allocated here. It is freed by the onenand_release function.

Definition at line 183 of file onenand_bbt.c.