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

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/lib/libupi_ab/inc/upi_mtd.h b/ap/lib/libupi_ab/inc/upi_mtd.h
new file mode 100755
index 0000000..a856ffb
--- /dev/null
+++ b/ap/lib/libupi_ab/inc/upi_mtd.h
@@ -0,0 +1,74 @@
+/**
+* @file upi_mtd.h
+* @brief °æ±¾·ÖÇøÅäÖÃÐÅÏ¢
+*
+* Copyright (C) 2017 Sanechips Technology Co., Ltd.
+* @author
+*
+*/
+
+#ifndef _UPI_MTD_H
+#define _UPI_MTD_H
+
+/*******************************************************************************
+ *                           Include header files                              *
+ ******************************************************************************/
+
+#include "upi_img_interface.h"
+#include "upi_update.h"
+/*******************************************************************************
+ *                             Macro definitions                               *
+ ******************************************************************************/
+
+
+/*******************************************************************************
+ *                             Type definitions                                *
+ ******************************************************************************/
+
+typedef enum {
+	DEVICE_MTD = 0,
+	DEVICE_ZFTL = 1,
+	DEVICE_MTD_BLOCK,
+	DEVICE_UNKNOWN,
+} device_type_t;
+
+/*******************************************************************************
+ *                       Global variable declarations                          *
+ ******************************************************************************/
+
+
+/*******************************************************************************
+ *                       Global function declarations                          *
+ ******************************************************************************/
+
+/**
+ * @brief
+ * @note
+ */
+
+int mtd_find(const char *i_parti_name, char *o_mtd_path, device_type_t device_type, unsigned int o_mtd_path_len);
+int get_partition_update_info(int target, const char *partition_name, device_data_t *device_data);
+int mtd_erase_partition(int target, const char*partition_name);
+int is_partition_exist(int target, char * partition_name);
+
+/**
+ * @brief
+ * @note
+ */
+
+int write_mtd_partition_data(partition_mtd_info_t *mtd_info, int offset, int len, unsigned char *write_data);
+int read_mtd_partition_data(partition_mtd_info_t *mtd_info, int offset, int len, char * read_data);
+
+
+int get_partition_mtd_info(const char *partition_name, int partition_type, partition_mtd_info_t *mtd_info);
+
+
+/*******************************************************************************
+ *                      Inline function implementations                        *
+ ******************************************************************************/
+
+
+
+
+#endif // _UPI_MTD_H
+