Home | History | Annotate | Download | only in mtd
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef __LINUX_MTD_BBM_H
     20 #define __LINUX_MTD_BBM_H
     21 #define NAND_MAX_CHIPS 8
     22 struct nand_bbt_descr {
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24  int options;
     25  int pages[NAND_MAX_CHIPS];
     26  int offs;
     27  int veroffs;
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29  uint8_t version[NAND_MAX_CHIPS];
     30  int len;
     31  int maxblocks;
     32  int reserved_block_code;
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34  uint8_t *pattern;
     35 };
     36 #define NAND_BBT_NRBITS_MSK 0x0000000F
     37 #define NAND_BBT_1BIT 0x00000001
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define NAND_BBT_2BIT 0x00000002
     40 #define NAND_BBT_4BIT 0x00000004
     41 #define NAND_BBT_8BIT 0x00000008
     42 #define NAND_BBT_LASTBLOCK 0x00000010
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define NAND_BBT_ABSPAGE 0x00000020
     45 #define NAND_BBT_SEARCH 0x00000040
     46 #define NAND_BBT_PERCHIP 0x00000080
     47 #define NAND_BBT_VERSION 0x00000100
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #define NAND_BBT_CREATE 0x00000200
     50 #define NAND_BBT_SCANALLPAGES 0x00000400
     51 #define NAND_BBT_SCANEMPTY 0x00000800
     52 #define NAND_BBT_WRITE 0x00001000
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 #define NAND_BBT_SAVECONTENT 0x00002000
     55 #define NAND_BBT_SCAN2NDPAGE 0x00004000
     56 #define NAND_BBT_SCAN_MAXBLOCKS 4
     57 #define ONENAND_BADBLOCK_POS 0
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59 struct bbm_info {
     60  int bbt_erase_shift;
     61  int badblockpos;
     62  int options;
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64  uint8_t *bbt;
     65  int (*isbad_bbt)(struct mtd_info *mtd, loff_t ofs, int allowbbt);
     66  struct nand_bbt_descr *badblock_pattern;
     67  void *priv;
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69 };
     70 #endif
     71