Linux Kernel
3.7.1
|
#include <linux/wait.h>
#include <linux/spinlock.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/flashchip.h>
#include <linux/mtd/bbm.h>
Go to the source code of this file.
Data Structures | |
struct | nand_onfi_params |
struct | nand_hw_control |
struct | nand_ecc_ctrl |
struct | nand_buffers |
struct | nand_chip |
struct | nand_flash_dev |
struct | nand_manufacturers |
struct | platform_nand_chip |
struct | platform_nand_ctrl |
struct | platform_nand_data |
Enumerations | |
enum | nand_ecc_modes_t { NAND_ECC_NONE, NAND_ECC_SOFT, NAND_ECC_HW, NAND_ECC_HW_SYNDROME, NAND_ECC_HW_OOB_FIRST, NAND_ECC_SOFT_BCH } |
Functions | |
int | nand_scan (struct mtd_info *mtd, int max_chips) |
int | nand_scan_ident (struct mtd_info *mtd, int max_chips, struct nand_flash_dev *table) |
int | nand_scan_tail (struct mtd_info *mtd) |
void | nand_release (struct mtd_info *mtd) |
void | nand_wait_ready (struct mtd_info *mtd) |
int | nand_lock (struct mtd_info *mtd, loff_t ofs, uint64_t len) |
int | nand_unlock (struct mtd_info *mtd, loff_t ofs, uint64_t len) |
struct nand_onfi_params | __attribute__ ((packed)) |
: Manufacturer name | |
struct nand_manufacturers - NAND Flash Manufacturer ID Structure : manufacturer ID code of device. | |
struct nand_flash_dev | nand_flash_ids [] |
struct nand_manufacturers | nand_manuf_ids [] |
int | nand_scan_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd) |
int | nand_update_bbt (struct mtd_info *mtd, loff_t offs) |
int | nand_default_bbt (struct mtd_info *mtd) |
int | nand_isbad_bbt (struct mtd_info *mtd, loff_t offs, int allowbbt) |
int | nand_erase_nand (struct mtd_info *mtd, struct erase_info *instr, int allowbbt) |
int | nand_do_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, uint8_t *buf) |
#define NAND_HAS_CACHEPROG | ( | chip | ) | ((chip->options & NAND_CACHEPRG)) |
#define NAND_HAS_COPYBACK | ( | chip | ) | ((chip->options & NAND_COPYBACK)) |
#define NAND_HAS_SUBPAGE_READ | ( | chip | ) | ((chip->options & NAND_SUBPAGE_READ)) |
#define NAND_MUST_PAD | ( | chip | ) | (!(chip->options & NAND_NO_PADDING)) |
#define NAND_SAMSUNG_LP_OPTIONS (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK) |
enum nand_ecc_modes_t |
|
read |
mcontroller : adapter info structure for old mimd_t apps
: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id
Definition at line 171 of file esd_usb2.c.
nand_erase_nand - [INTERN] erase block(s) : MTD device structure : erase instruction : allow erasing the bbt area
Erase one ore more blocks.
Definition at line 2499 of file nand_base.c.
nand_isbad_bbt - [NAND Interface] Check if a block is bad : MTD device structure : offset in the device : allow access to bad block table region
Definition at line 1381 of file nand_bbt.c.
nand_lock - [REPLACEABLE] locks all blocks present in the device : mtd info : offset to start unlock from : length to unlock
This feature is not supported in many NAND parts. 'Micron' NAND parts do have this feature, but it allows only to lock all blocks, not for specified range for block. Implementing 'lock' feature by making use of 'unlock', for now.
Returns lock status.
Definition at line 972 of file nand_base.c.
nand_release - [NAND Interface] Free resources held by the NAND device : MTD device structure
Definition at line 3693 of file nand_base.c.
nand_scan - [NAND Interface] Scan for the NAND device : MTD device structure : number of chips to scan for
This fills out all the uninitialized function pointers with the defaults. The flash ID is read and the mtd/chip structures are filled with the appropriate values. The mtd->owner field must be set to the module of the caller.
Definition at line 3672 of file nand_base.c.
int nand_scan_bbt | ( | struct mtd_info * | mtd, |
struct nand_bbt_descr * | bd | ||
) |
nand_scan_bbt - [NAND Interface] scan, find, read and maybe create bad block table(s) : MTD device structure : descriptor 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 must be freed by calling the nand_free_bbt function.
Definition at line 1121 of file nand_bbt.c.
nand_scan_ident - [NAND Interface] Scan for the NAND device : MTD device structure : number of chips to scan for : alternative NAND ID table
This is the first phase of the normal nand_scan() function. It reads the flash ID and sets up MTD fields accordingly.
The mtd->owner field must be set to the module of the caller.
Definition at line 3307 of file nand_base.c.
nand_scan_tail - [NAND Interface] Scan for the NAND device : MTD device structure
This is the second phase of the normal nand_scan() function. It fills out all the uninitialized function pointers with the defaults and scans for a bad block table if appropriate.
Definition at line 3362 of file nand_base.c.
nand_unlock - [REPLACEABLE] unlocks specified locked blocks : mtd info : offset to start unlock from : length to unlock
Returns unlock status.
Definition at line 919 of file nand_base.c.
Definition at line 492 of file nand_base.c.
struct nand_flash_dev nand_flash_ids[] |
Definition at line 24 of file nand_ids.c.
struct nand_manufacturers nand_manuf_ids[] |
Definition at line 168 of file nand_ids.c.