[Feature][ZXW-33]merge ZXW 0428 version

Change-Id: I11f167edfea428d9fab198ff00ff1364932d1b0b
diff --git a/boot/common/src/uboot/drivers/misc/load.c b/boot/common/src/uboot/drivers/misc/load.c
index 8419dca..c44dc9b 100755
--- a/boot/common/src/uboot/drivers/misc/load.c
+++ b/boot/common/src/uboot/drivers/misc/load.c
@@ -305,6 +305,7 @@
 	return 0;
 }
 
+#ifdef CONFIG_ZX297520V3E_VEHICLE_DC
 int fs_load_dtb_image(void)
 {
     char    cmd[64] = {0};
@@ -320,7 +321,7 @@
 	run_command(cmd, 0);
 	flush_dcache_all();
 	/*2¡¢¿½±´°æ±¾Êý¾Ýµ½ÔËÐеØÖ· */
-	memcpy((uchar *)CAP_DTB_ADDR, 
+	memcpy((uchar *)DDR_BASE_CAP_DTB_ADDR, 
 			(uchar *)(CONFIG_SYS_SDRAM_TEMP_BASE), 
 			CAP_DTB_LEN);
 
@@ -328,6 +329,7 @@
 	
 	return 0;
 }
+#endif
 
 int fs_load_m0_image(void)
 {
@@ -965,7 +967,8 @@
 		}
 		
 		if(fotaFlagInfo->boot_flag.magic != FLAGS_MAGIC)
-		{
+		{	
+			flush_dcache_all();
 			ret = flash->read(nand,(loff_t)backup_area_offset,
 						  &fota_size,(u_char *)(fotaFlagInfo));
 			if(ret != 0)
@@ -995,6 +998,7 @@
 		}
 		if(fotaFlagInfo->boot_flag.magic != FLAGS_MAGIC)
 		{
+            flush_dcache_all();
 			ret = nand_read(&(nor->nor[0].mtd), (loff_t)backup_area_offset, 
 						&fota_size, (u_char *)(fotaFlagInfo));
 			if(ret != 0)
diff --git a/boot/common/src/uboot/drivers/peripheral/peripheral.c b/boot/common/src/uboot/drivers/peripheral/peripheral.c
old mode 100644
new mode 100755
index 4b0d8fe..4394c7b
--- a/boot/common/src/uboot/drivers/peripheral/peripheral.c
+++ b/boot/common/src/uboot/drivers/peripheral/peripheral.c
@@ -73,7 +73,8 @@
 	jtag_init();

 #endif

 

-#if 0//ref need ldo8 2.85V

+//#if 0//ref need ldo8 2.85V

+#ifdef CONFIG_ZX297520V3E_VEHICLE_DC

 /*set mmc io and vccQ*/	

 	zx234290_set_ldo8_voltage(VLDOD_1_800);

 	zx234290_set_ldo8_sleep_voltage(VLDOD_1_800);

diff --git a/boot/common/src/uboot/drivers/power/zx234290.c b/boot/common/src/uboot/drivers/power/zx234290.c
index 1f2f485..b6f9678 100755
--- a/boot/common/src/uboot/drivers/power/zx234290.c
+++ b/boot/common/src/uboot/drivers/power/zx234290.c
@@ -28,7 +28,7 @@
 #include <power.h>
 #include <zx234290.h>
 #include <zx234502.h>
-
+#include <watchdog.h>
 
 int zx234290_write_flag(UINT8 val);
 
@@ -181,6 +181,7 @@
 		return -EIO;
     }
 	printf( "	[%s][START_UP_STATUS = 0x%X] ...\n", __FUNCTION__, reg_start);
+    (*(volatile unsigned long *)(START_UP_STATUS_BASE))=reg_start;
 
 	/* ¶Á²¢ÇåZX234290_REG_USER */
     ret = zx234290_i2c_read_reg(ZX234290_REG_USER, &reg_user);
@@ -195,6 +196,7 @@
        return -EIO;
     }
     printf( "	[%s][USER_RESERVED   = 0x%X] ...\n", __FUNCTION__, reg_user);
+    (*(volatile unsigned long *)(USER_RESERVED_BASE)) =reg_user;
 
    /* 1. Õý³£¿ª»ú¼ì²â */
 	if( reg_start & PWR_ON_START_UP )
diff --git a/boot/common/src/uboot/drivers/wdt/wdt.c b/boot/common/src/uboot/drivers/wdt/wdt.c
index 5353df5..0621cb4 100644
--- a/boot/common/src/uboot/drivers/wdt/wdt.c
+++ b/boot/common/src/uboot/drivers/wdt/wdt.c
@@ -26,6 +26,7 @@
 #include <watchdog.h>

 #include <asm/arch/lsp_crpm.h>

 

+

 /****************************************************************************

 * 	                                           Local Macros

 ****************************************************************************/

@@ -33,7 +34,6 @@
 #define WDT_DIABLE		(0x44495341) /*ascii: DISA*/

 #define WDT_OFF 		(0x57445446) //ascii:WDTF

 

-#define WDT_REBOOT_RECORD_BASE	(0x102410)

 

 /*open and close wdt function for long time operation in boot.*/

 #define RM_WDT_BASE	(0x00148000)