[Feature][ZXW-241]merge P56U01 version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: I7985538dde6951dd824c36149bf9a1e3ca23c734
diff --git a/boot/common/src/uboot/downloader/cmd_set.c b/boot/common/src/uboot/downloader/cmd_set.c
index 8831694..93950b1 100755
--- a/boot/common/src/uboot/downloader/cmd_set.c
+++ b/boot/common/src/uboot/downloader/cmd_set.c
@@ -33,7 +33,7 @@
 #include "boot_mode.h"

 

 

-#define ZLOAD_PARTITION_SIZE	0x3000

+#define ZLOAD_PARTITION_SIZE	0x10000

 

 

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

@@ -47,7 +47,7 @@
 

 extern char *tsp_console_buffer;

 extern struct fsl_qspi spi_nor_flash;

-

+extern int g_iftype;

 

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

  * Function:do_set

@@ -408,22 +408,37 @@
         return cmd_usage(cmdtp);

     }

 	sign = argv[1];	

-	type = read_boot_flashtype();

 

-	if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)

+	if(g_nor_flag == 1)

 	{

-        ret = set_nand_dlflag(sign);

-	}

-	else if(type == IF_TYPE_NOR)

-	{

+	    g_iftype = IF_TYPE_NOR;

+		nand_init();

 		ret = set_nor_dlflag(sign);

+		/*Çл»³õʼ»¯spi_nand*/

+		g_iftype = IF_TYPE_SPI_NAND;

+		nand_init();

+

+	}

+	else

+	{

+	    type = read_boot_flashtype();

+

+		if(type == IF_TYPE_NAND || type == IF_TYPE_SPI_NAND)

+		{

+	        ret = set_nand_dlflag(sign);

+		}

+		else if(type == IF_TYPE_NOR)

+		{

+			ret = set_nor_dlflag(sign);

+		}

+		

 	}

 

 	if(ret != 0)

 	{

 		return -1;

 	}

-		

+	

 	return 0;

 

 }