/******************************************************************************* | |
* Copyright (C) 2016, ZXIC Corporation. | |
* | |
* File Name: | |
* File Mark: | |
* Description: | |
* Others: | |
* Version: v1.0 | |
* Author: zhouqi | |
* Date: 2013-8-21 | |
* History 1: | |
* Date: | |
* Version: | |
* Author: | |
* Modification: | |
* History 2: | |
********************************************************************************/ | |
#ifndef _ZX297520_NAND_H_ | |
#define _ZX297520_NAND_H_ | |
#define BAD_BLOCK 0x11 | |
#define BBT_SIZE 128 | |
#define NAND_MFR_TOSHIBA 0x98 | |
#define NAND_MFR_SAMSUNG 0xec | |
#define NAND_MFR_MICRON 0x2C | |
#define NAND_MFR_GIGADEVICE 0xC8 | |
#define NAND_MFR_WINBOND 0xEF | |
#define NAND_MFR_PARAGON 0xA1 | |
#define NAND_MFR_HEYANGTEK 0xC9 | |
#define NAND_MFR_ZETTA 0xBA | |
#define NAND_MFR_DOSILICON 0xE5 | |
#define NAND_MFR_FUDANWEI 0xA1 | |
#define NAND_DEVID_FDANWEI_1G 0xA5 | |
#define BBT_INFO_OOB_OFFSET_PARAGON 64 | |
#define BBT_INFO_OOB_VER_OFFSET_PARAGON 68 | |
#define BBT_INFO_OOB_OFFSET_HEYANGTEK 32 | |
#define BBT_INFO_OOB_VER_OFFSET_HEYANGTEK 64 | |
struct nand_bbt_descr { | |
int page; | |
int offs; | |
int len; | |
int veroffs; | |
uint8_t version; | |
int maxblocks; | |
uint8_t *pattern; | |
}; | |
int nand_creat_bbt( void ); | |
uint32_t nand_block_isbad(uint32_t offset); | |
#endif/*_ZX297520_NAND_H_*/ | |