[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/boot/common/src/loader/include/bbt.h b/boot/common/src/loader/include/bbt.h
new file mode 100755
index 0000000..cfac901
--- /dev/null
+++ b/boot/common/src/loader/include/bbt.h
@@ -0,0 +1,63 @@
+/*******************************************************************************

+ * 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_*/

+

+