zte's code,first commit

Change-Id: I9a04da59e459a9bc0d67f101f700d9d7dc8d681b
diff --git a/pub/include/infra/ram_config.h b/pub/include/infra/ram_config.h
new file mode 100755
index 0000000..a068d70
--- /dev/null
+++ b/pub/include/infra/ram_config.h
@@ -0,0 +1,62 @@
+/*******************************************************************************

+* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£

+* 

+* ÎļþÃû³Æ:     ram_config.h

+* Îļþ±êʶ:     ram_config.h

+* ÄÚÈÝÕªÒª:     ´æ´¢µØÖ·ÅäÖÃÍ·Îļþ

+* ʹÓ÷½·¨:     #include "ram_config.h"

+* 

+* ÐÞ¸ÄÈÕÆÚ        °æ±¾ºÅ      Ð޸ıê¼Ç        ÐÞ¸ÄÈË          ÐÞ¸ÄÄÚÈÝ

+* ------------------------------------------------------------------------------

+* 2015/04/16      V1.0        Create          ÁõÑÇÄÏ          ´´½¨

+* 

+*******************************************************************************/

+

+#ifndef _RAM_CONFIG_H

+#define _RAM_CONFIG_H

+

+/*******************************************************************************

+*                                   Í·Îļþ                                     *

+*******************************************************************************/

+#if defined   (_CHIP_ZX297520)

+#include "ram_config_7520.h"

+#include "psm_ram_config_7520.h"

+#elif defined (_CHIP_ZX297520V1_1)

+#include "ram_config_7520v1_1.h"

+#include "psm_ram_config_7520v1_1.h"

+#elif defined (_CHIP_ZX297520V2)

+#include "ram_config_7520v2.h"

+#include "psm_ram_config_7520v2.h"

+#elif defined (_CHIP_ZX297520V3)

+#include "ram_config_7520v3.h"

+#include "psm_ram_config_7520v3.h"

+#elif defined (_CHIP_ZX297510)

+#include "ram_config_7510.h"

+#elif defined (_CHIP_ZX2804)

+#include "ram_config_2804.h"

+#include "psm_ram_config_2804.h"

+#elif defined (_OS_WIN)

+//#include "ram_config_7520v3.h"

+//#include "psm_ram_config_7520v3.h"

+#else

+# error "unknown chipset"

+#endif

+

+/*******************************************************************************

+*                                   ºê¶¨Òå                                     *

+*******************************************************************************/

+

+/*******************************************************************************

+*                                Êý¾ÝÀàÐͶ¨Òå                                  *

+*******************************************************************************/

+

+/*******************************************************************************

+*                                È«¾Ö±äÁ¿ÉùÃ÷                                  *

+*******************************************************************************/

+

+/*******************************************************************************

+*                                È«¾Öº¯ÊýÉùÃ÷                                  *

+*******************************************************************************/

+

+#endif  // #ifndef _RAM_CONFIG_H

+

diff --git a/pub/include/infra/rf_iram_pub_config.h b/pub/include/infra/rf_iram_pub_config.h
new file mode 100644
index 0000000..a28ffbc
--- /dev/null
+++ b/pub/include/infra/rf_iram_pub_config.h
@@ -0,0 +1,76 @@
+/*******************************************************************************

+* °æÈ¨ËùÓÐ (C)2015, ÖÐÐËͨѶ¹É·ÝÓÐÏÞ¹«Ë¾¡£

+* 

+* ÎļþÃû³Æ:     rf_iram_pub_config.h

+* Îļþ±êʶ:     rf_iram_pub_config.h

+* ÄÚÈÝÕªÒª:     PSÓëPHYÐÅÏ¢½»»¥IRAMµÄÉ䯵¹«¹²ÒµÎñÇøÓò»®·Ö(¹²512B)

+* ʹÓ÷½·¨:     #include "ram_config.h"

+* 

+* ÐÞ¸ÄÈÕÆÚ        °æ±¾ºÅ      Ð޸ıê¼Ç        ÐÞ¸ÄÈË          ÐÞ¸ÄÄÚÈÝ

+* ------------------------------------------------------------------------------

+* 2015/06/08      V1.0        Create          ÁõÑÇÄÏ          ´´½¨

+* 

+*******************************************************************************/

+

+#ifndef _RF_IRAM_PUB_CONFIG_H

+#define _RF_IRAM_PUB_CONFIG_H

+

+#include "ram_config.h"

+/*******************************************************************************

+*                                   Í·Îļþ                                     *

+*******************************************************************************/

+

+/*******************************************************************************

+*                                   ºê¶¨Òå                                     *

+*******************************************************************************/

+/* IRAMÖУ¬PSÓëPHYÐÅÏ¢½»»¥µÄÉ䯵¹«¹²ÒµÎñ»ùµØÖ·ÎªIRAM_BASE_ADDR_PUB_RF£¬´óСΪ512B  */

+

+/* IRAM_PUB_RFÖУ¬µÚÒ»²¿·ÖÇøÓòΪUEID£¬´óСΪ64Byte*/

+#define IRAM_PUB_RF_BASE_ADDR_UEID           (IRAM_BASE_ADDR_PUB_RF)

+#define IRAM_PUB_RF_BASE_LEN_UEID            (64>>CPU_SHIFT)

+

+/* IRAM_PUB_RFÖУ¬µÚÒ»²¿·ÖÇøÓòΪβ¹»Ø¶ÁµÄDACÖµ£¬´óСΪ4Byte*/

+#define IRAM_PUB_RF_BASE_ADD_TEMPCOMP_DAC       (IRAM_BASE_ADDR_PUB_RF + IRAM_PUB_RF_BASE_LEN_UEID)

+#define IRAM_PUB_RF_BASE_LEN_TEMPCOMP_DAC       (4>>CPU_SHIFT)

+

+#define IRAM_PUB_RF_BASE_ADDR_MIPI_INIT_DATA    (IRAM_PUB_RF_BASE_ADD_TEMPCOMP_DAC + IRAM_PUB_RF_BASE_LEN_TEMPCOMP_DAC)

+#define IRAM_PUB_RF_BASE_LEN_MIPI_INIT_DATA     (128>>CPU_SHIFT)

+

+#define IRAM_PUB_RF_BASE_ADDR_PIN_MUX_PARA    (IRAM_PUB_RF_BASE_ADDR_MIPI_INIT_DATA + IRAM_PUB_RF_BASE_LEN_MIPI_INIT_DATA)

+#define IRAM_PUB_RF_BASE_LEN_PIN_MUX_PARA     (2>>CPU_SHIFT)

+

+/* IRAM_PUB_RFÖУ¬¸Ã²¿·ÖÇøÓòÓÃÓÚ½«TDS PAIDLE¿ØÖÆ×Ö¹²Ïí¸øR7£¬ÓÃÓÚRFIDLE2SLEEPʱÅäÖÃPAIDLE */

+#define IRAM_PUB_RF_BASE_ADDR_PAIDLE_PARA    (IRAM_PUB_RF_BASE_ADDR_PIN_MUX_PARA + IRAM_PUB_RF_BASE_LEN_PIN_MUX_PARA)

+#define IRAM_PUB_RF_BASE_LEN_PAID_PARA     (20>>CPU_SHIFT)

+

+

+/*com NVÖÐÔö¼Ó¾§Ìådac VS temp¡¡µÄÂë±í£¬£µ¶ÈÒ»¸ö¸ñµã£¬£­£´£°¶Èµ½£¹£°¶È*/

+

+#define IRAM_PUB_RF_BASE_ADDR_CRYSTAL_DACVSTEMP (IRAM_PUB_RF_BASE_ADDR_PAIDLE_PARA + IRAM_PUB_RF_BASE_LEN_PAID_PARA)

+#define IRAM_PUB_RF_BASE_LEN_CRYSTAL_DACVSTEMP  (54>>CPU_SHIFT)

+

+#define IRAM_PUB_RF_BASE_ADDR_SLEEP_FALG_PARA (IRAM_PUB_RF_BASE_ADDR_CRYSTAL_DACVSTEMP + IRAM_PUB_RF_BASE_LEN_CRYSTAL_DACVSTEMP)

+#define IRAM_PUB_RF_BASE_SLEEP_FALG_LEN_PARA  (2>>CPU_SHIFT)

+

+#define IRAM_PUB_RF_BASE_ADDR_ZXPA_FLAG_PARA  (IRAM_PUB_RF_BASE_ADDR_SLEEP_FALG_PARA + IRAM_PUB_RF_BASE_SLEEP_FALG_LEN_PARA)

+#define IRAM_PUB_RF_BASE_ADDR_ZXPA_LEN_PARA   (4>>CPU_SHIFT)

+

+/*******************************************************************************

+*								 Êý¾ÝÀàÐͶ¨Òå								   *

+*******************************************************************************/

+

+/*******************************************************************************

+*								 È«¾Ö±äÁ¿ÉùÃ÷								   *

+*******************************************************************************/

+

+/*******************************************************************************

+*								 È«¾Öº¯ÊýÉùÃ÷								   *

+*******************************************************************************/

+	

+#endif  // #ifndef _RF_IRAM_PUB_CONFIG_H

+

+

+

+

+

+

diff --git a/pub/include/infra/zsys_trace.h b/pub/include/infra/zsys_trace.h
new file mode 100644
index 0000000..c46cdad
--- /dev/null
+++ b/pub/include/infra/zsys_trace.h
@@ -0,0 +1,175 @@
+

+#ifndef __TRACE_FLAG__

+#define __TRACE_FLAG__

+

+typedef enum _T_TRACE_FLAG

+{

+    TRACE_ZLOADER_START = 0x00010000,

+    TRACE_ZLOADER_NAND,

+    TRACE_ZLOADER_DDR,

+    TRACE_ZLOADER_PARTITION,

+    TRACE_ZLOADER_LOAD_UBOOT,

+    TRACE_ZLOADER_LOAD_RPM,

+    TRACE_ZLOADER_RUN_UBOOT,

+    TRACE_ZLOADER_END_ERR,

+    TRACE_ZLOADER_HANG,

+    TRACE_ZLOADER_9,

+    TRACE_ZLOADER_10,

+    TRACE_ZLOADER_11,

+    TRACE_ZLOADER_12,

+    TRACE_ZLOADER_13,

+    TRACE_ZLOADER_14,

+    TRACE_ZLOADER_15,

+    TRACE_ZLOADER_16,

+    TRACE_ZLOADER_17,

+    TRACE_ZLOADER_18,

+    TRACE_ZLOADER_RUN_RPM = 0x00019999,  /*zloader start normal*/

+

+    TRACE_UBOOT_START = 0x00020000,

+    TRACE_UBOOT_PMU,

+    TRACE_UBOOT_NAND,

+    TRACE_UBOOT_TLOAD,

+    TRACE_UBOOT_PARTITION,

+    TRACE_UBOOT_PSHOLD,

+    TRACE_UBOOT_FOTA_UPDATE,

+    TRACE_UBOOT_FOTA,

+    TRACE_UBOOT_FOTA_RESET,

+    TRACE_UBOOT_CHECK_POWERKEY,

+    TRACE_UBOOT_POWER_REASON,

+    TRACE_UBOOT_LOW_BATTERY,

+    TRACE_UBOOT_SHOW_LCD,

+    TRACE_UBOOT_LOAD_IMAGE,

+    TRACE_UBOOT_LOAD_LINUX,

+    TRACE_UBOOT_MAINLOOP,

+    TRACE_UBOOT_16,

+    TRACE_UBOOT_17,

+    TRACE_UBOOT_18,

+    TRACE_UBOOT_BOOT_LINUX = 0x00029999,  /*uboot start normal*/

+

+    TRACE_RPM_0 = 0x00030000,

+    TRACE_RPM_1,

+    TRACE_RPM_SLEEP,

+    TRACE_RPM_RUNNING,

+    TRACE_RPM_4,

+    TRACE_RPM_5,

+    TRACE_RPM_6,

+    TRACE_RPM_7,

+    TRACE_RPM_8,

+    TRACE_RPM_9,

+    TRACE_RPM_10,

+    TRACE_RPM_11,

+    TRACE_RPM_12,

+    TRACE_RPM_13,

+    TRACE_RPM_14,

+    TRACE_RPM_15,

+    TRACE_RPM_16,

+    TRACE_RPM_17,

+    TRACE_RPM_18,

+    TRACE_RPM_19,

+

+    TRACE_AP_0 = 0x00040000,

+    TRACE_AP_INIT_CALL,

+    TRACE_AP_SLEEP,

+    TRACE_AP_RUNNING,

+    TRACE_AP_4,

+    TRACE_AP_5,

+    TRACE_AP_6,

+    TRACE_AP_7,

+    TRACE_AP_8,

+    TRACE_AP_9,

+    TRACE_AP_10,

+    TRACE_AP_11,

+    TRACE_AP_12,

+    TRACE_AP_13,

+    TRACE_AP_14,

+    TRACE_AP_15,

+    TRACE_AP_16,

+    TRACE_AP_17,

+    TRACE_AP_18,

+    TRACE_AP_19,

+

+    TRACE_PS_0 = 0x00050000,

+    TRACE_PS_1,

+    TRACE_PS_SLEEP,

+    TRACE_PS_RUNNING,

+    TRACE_PS_4,

+    TRACE_PS_5,

+    TRACE_PS_6,

+    TRACE_PS_7,

+    TRACE_PS_8,

+    TRACE_PS_9,

+    TRACE_PS_10,

+    TRACE_PS_11,

+    TRACE_PS_12,

+    TRACE_PS_13,

+    TRACE_PS_14,

+    TRACE_PS_15,

+    TRACE_PS_16,

+    TRACE_PS_17,

+    TRACE_PS_18,

+    TRACE_PS_19,

+

+    TRACE_PHY_0 = 0x00060000,

+    TRACE_PHY_1,

+    TRACE_PHY_SLEEP,

+    TRACE_PHY_RUNNING,

+    TRACE_PHY_4,

+    TRACE_PHY_5,

+    TRACE_PHY_6,

+    TRACE_PHY_7,

+    TRACE_PHY_8,

+    TRACE_PHY_9,

+    TRACE_PHY_10,

+    TRACE_PHY_11,

+    TRACE_PHY_12,

+    TRACE_PHY_13,

+    TRACE_PHY_14,

+    TRACE_PHY_15,

+    TRACE_PHY_16,

+    TRACE_PHY_17,

+    TRACE_PHY_18,

+    TRACE_PHY_19,

+

+    TRACE_SYSENTRY = 0x00070000,

+    TRACE_SYSENTRY_FINISH,

+    TRACE_HAL_INIT,

+    TRACE_HAL_REF_INIT,

+    TRACE_SLEEP,

+    TRACE_RUNNING,

+    TRACE_COMM_6,

+    TRACE_COMM_7,

+    TRACE_COMM_8,

+    TRACE_COMM_9,

+    TRACE_COMM_10,

+    TRACE_COMM_11,

+    TRACE_COMM_12,

+    TRACE_COMM_13,

+    TRACE_COMM_14,

+    TRACE_COMM_15,

+    TRACE_COMM_16,

+    TRACE_COMM_17,

+    TRACE_COMM_18,

+    TRACE_COMM_19,

+

+} T_TRACE_FLAG;

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£ºzSys_SetTraceFlag

+* ¹¦ÄÜÃèÊö£ºÉèÖøú×ÙLOG

+* ²ÎÊý˵Ã÷£º 

+* ·µ »Ø Öµ£º 

+* ÆäËü˵Ã÷£º 

+**************************************************************************/

+VOID zSys_SetTraceFlag(T_TRACE_FLAG flag, VOID *data);

+

+/**************************************************************************

+* º¯ÊýÃû³Æ£ºzSys_GetTraceFlag

+* ¹¦ÄÜÃèÊö£º²éѯ¸ú×ÙLOG

+* ²ÎÊý˵Ã÷£º 

+* ·µ »Ø Öµ£º 

+* ÆäËü˵Ã÷£º 

+**************************************************************************/

+T_TRACE_FLAG zSys_GetTraceFlag(VOID);

+

+

+#endif