diff -ruN u-boot-2009.08_BSP_20120705/board/freescale/common/fsl_bmp_600x400.c u-boot-2009.08_SVN_checkout/board/freescale/common/fsl_bmp_600x400.c
--- u-boot-2009.08_BSP_20120705/board/freescale/common/fsl_bmp_600x400.c	2012-06-20 15:04:59.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/board/freescale/common/fsl_bmp_600x400.c	2013-09-25 16:44:22.000000000 +0800
@@ -17,6 +17,7 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
+ #if 0
 const unsigned char fsl_bmp_600x400[] = {
 	0x42, 0x4d, 0xb6, 0xad, 0x03, 0x00, 0x00, 0x00,
 	0x00, 0x00, 0x36, 0x04, 0x00, 0x00, 0x28, 0x00,
@@ -30156,3 +30157,8 @@
 };
 
 int fsl_bmp_600x400_size = sizeof(fsl_bmp_600x400);
+#else
+int fsl_bmp_600x400_size=0;
+const unsigned char fsl_bmp_600x400[];
+
+#endif
diff -ruN u-boot-2009.08_BSP_20120705/board/freescale/mx53_smd/ch7033/ch703xlib.c u-boot-2009.08_SVN_checkout/board/freescale/mx53_smd/ch7033/ch703xlib.c
--- u-boot-2009.08_BSP_20120705/board/freescale/mx53_smd/ch7033/ch703xlib.c	2012-06-20 15:04:59.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/board/freescale/mx53_smd/ch7033/ch703xlib.c	2013-09-25 16:44:23.000000000 +0800
@@ -2273,7 +2273,7 @@
 		// HDMI_LVDS_SEL fixed to 1:
 		iicbuf_write_ex(HDMI_LVDS_SEL, 1);
 		// Panel enable for lvds:
-//		iicbuf_write_ex(PWM_EN, 0);	//// -wyc 2012-2-14
+		iicbuf_write_ex(PWM_EN, 0);	//// -wyc 2012-2-14
 		// h/v sync polarity:
 		hsp = pHdmiFmt->hs_pol;
 		vsp = pHdmiFmt->vs_pol;
@@ -2865,6 +2865,7 @@
 	iicbuf_write_ex(DPCKN4, dpckn4_reg);
 
 	// 12. uclk2d:
+	printf("%s %d %d\n",__FUNCTION__,__LINE__,pInput->audio_type);
 	if (AUDIO_SPDIF != pInput->audio_type) {  // i2s
 		uclk2d_reg = pOutput->uclk_khz / 10;
 	} else	{  // spdif
diff -ruN u-boot-2009.08_BSP_20120705/board/freescale/mx53_smd/ch7033/cmd_ch7033cfg.c u-boot-2009.08_SVN_checkout/board/freescale/mx53_smd/ch7033/cmd_ch7033cfg.c
--- u-boot-2009.08_BSP_20120705/board/freescale/mx53_smd/ch7033/cmd_ch7033cfg.c	2012-06-20 15:04:59.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/board/freescale/mx53_smd/ch7033/cmd_ch7033cfg.c	2013-09-25 16:44:23.000000000 +0800
@@ -301,7 +301,7 @@
 	{
 		len+=sprintf(buf+len," di1_primary");
 	}
-
+	len+=sprintf(buf+len," bpp=32");
 
 	return setenv("bootargs_base",buf);
 
diff -ruN u-boot-2009.08_BSP_20120705/board/freescale/mx53_smd/cmd_boardcfg.c u-boot-2009.08_SVN_checkout/board/freescale/mx53_smd/cmd_boardcfg.c
--- u-boot-2009.08_BSP_20120705/board/freescale/mx53_smd/cmd_boardcfg.c	2012-06-20 15:04:59.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/board/freescale/mx53_smd/cmd_boardcfg.c	2013-09-25 16:44:23.000000000 +0800
@@ -121,8 +121,9 @@
 				sprintf(print_buf,"run bootargs_base bootargs_mmc1;mmc read 0 ${loadaddr} 0x800 0x1800;bootm");
 			}		
 			setenv("bootcmd_mmc",print_buf);
-			sprintf(print_buf,"run bootcmd_mmc;run bootcmd_sata;run bootcmd_mmc1");/*SD-->SATA-->iNand*/
-			break;
+			//	sprintf(print_buf,"run bootcmd_mmc;run bootcmd_sata;run bootcmd_mmc1");/*SD-->SATA-->iNand*/
+			//break;
+			return 0;
 	}
 	setenv("bootcmd",print_buf);
 	return 0;
diff -ruN u-boot-2009.08_BSP_20120705/board/freescale/mx53_smd/mx53_smd.c u-boot-2009.08_SVN_checkout/board/freescale/mx53_smd/mx53_smd.c
--- u-boot-2009.08_BSP_20120705/board/freescale/mx53_smd/mx53_smd.c	2012-06-20 15:04:59.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/board/freescale/mx53_smd/mx53_smd.c	2013-09-25 16:44:23.000000000 +0800
@@ -103,13 +103,32 @@
 			ipu_di_clk_parent_t di_clk_parent,
 			int di_clk_val);
 #ifdef CONFIG_ADV_SOM_CMX53
+
+#ifdef ADV_Panel_720P// 720 p
 static struct fb_videomode lvds_xga = {
-	 "XGA", 60, 1024, 768, 15385, 220, 40, 21, 7, 60, 10,
+	 //"XGA", 60, 800, 480, 15385, 220, 40, 21, 7, 60, 10,
+	 //"AUO-G070VW01", 60, 800, 480, 31075, 100, 100, 10, 15, 56, 3,
+	 "720P60", 60, 1280, 720, 13468,220,110,20,5,40, 5,
+	 FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT|FB_SYNC_EXT, 
+	 FB_VMODE_NONINTERLACED,
+	 0,
+#elif defined(ADV_Panel_800_480)
+static struct fb_videomode lvds_xga = {
+#if 1
+	 //"XGA", 60, 800, 480, 15385, 220, 40, 21, 7, 60, 10,
+	 //"AUO-G070VW01", 60, 800, 480, 31075, 100, 100, 10, 15, 56, 3,
+//	 "AUO-G070VW01", 62, 800, 480, 15385, 174, 88, 24, 5, 58, 9,
+	 "AUO-G070VW01", 60, 800, 480, 15385, 100, 50, 24, 6, 36, 7, // s2
 	 FB_SYNC_EXT,
 	 FB_VMODE_NONINTERLACED,
 	 0,
+#endif
+//	"AUO-G084SN05", 60, 800, 600, 37887, 100, 100, 10, 15, 56, 3, // s2
+//	FB_SYNC_EXT,
+//	FB_VMODE_NONINTERLACED,
+//	0,
+#endif	 
 };
-
 #else
 static struct fb_videomode lvds_xga = {
 	 "XGA", 60, 1024, 768, 15385, 220, 40, 21, 7, 60, 10,
@@ -823,7 +842,9 @@
 	/*lvds_num must be number "1"*/
 	s = getenv("lvds_num");
 	di = simple_strtol(s, NULL, 10);
+	di=0;
 	/* 20KHz PWM wave, 50% duty */
+#if 0 // orig	
 	if (di == 1) {
 		imx_pwm_config(pwm1, 25000, 50000);
 		imx_pwm_enable(pwm1);
@@ -831,9 +852,96 @@
 		imx_pwm_config(pwm0, 25000, 50000);
 		imx_pwm_enable(pwm0);
 	}
+#else
+	imx_pwm_config(pwm1, 25000, 50000);
+	imx_pwm_enable(pwm1);
+
+	imx_pwm_config(pwm0, 25000, 50000);
+	imx_pwm_enable(pwm0);
+
+	//imx_pwm_config(pwm1, 25000, 50000);
+	//imx_pwm_enable(pwm1);
+#endif
+
 
 #ifdef CONFIG_ADV_SOM_CMX53 //chlee#20110221
-	mxc_request_iomux(MX53_PIN_SD1_DATA3, IOMUX_CONFIG_ALT3);
+        //=========
+	if(di == 0)
+	{
+		//mxc_request_iomux(MX53_PIN_LVDS0_TX3_P, IOMUX_CONFIG_ALT1);
+		//mxc_request_iomux(MX53_PIN_LVDS0_CLK_P, IOMUX_CONFIG_ALT1);
+		//mxc_request_iomux(MX53_PIN_LVDS0_TX2_P, IOMUX_CONFIG_ALT1);
+		//mxc_request_iomux(MX53_PIN_LVDS0_TX1_P, IOMUX_CONFIG_ALT1);
+		//mxc_request_iomux(MX53_PIN_LVDS0_TX0_P, IOMUX_CONFIG_ALT1);
+
+		mxc_request_iomux(MX53_PIN_DISP0_DAT0, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT1, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT2, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT3, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT4, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT5, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT6, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT7, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT8, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT9, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT10, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT11, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT12, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT13, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT14, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT15, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT16, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT17, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT18, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT19, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT20, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT21, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT22, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT23, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DI0_PIN2, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DI0_PIN3, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DI0_DISP_CLK, IOMUX_CONFIG_ALT0);
+		
+	}
+	else
+	{
+		mxc_request_iomux(MX53_PIN_LVDS1_TX3_P, IOMUX_CONFIG_ALT1);
+		mxc_request_iomux(MX53_PIN_LVDS1_CLK_P, IOMUX_CONFIG_ALT1);
+		mxc_request_iomux(MX53_PIN_LVDS1_TX2_P, IOMUX_CONFIG_ALT1);
+		mxc_request_iomux(MX53_PIN_LVDS1_TX1_P, IOMUX_CONFIG_ALT1);
+		mxc_request_iomux(MX53_PIN_LVDS1_TX0_P, IOMUX_CONFIG_ALT1);
+
+		//mxc_request_iomux(MX53_PIN_DISP0_DAT0, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT1, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT2, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT3, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT4, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT5, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT6, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT7, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT8, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT9, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT10, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT11, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT12, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT13, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT14, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT15, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT16, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT17, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT18, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT19, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT20, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT21, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT22, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DISP0_DAT23, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DI0_PIN2, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DI0_PIN3, IOMUX_CONFIG_ALT0);
+		mxc_request_iomux(MX53_PIN_DI0_DISP_CLK, IOMUX_CONFIG_ALT0);
+	}
+	//=========
+	//mxc_request_iomux(MX53_PIN_SD1_DATA3, IOMUX_CONFIG_ALT3);
+        mxc_request_iomux(MX53_PIN_SD1_DATA3, IOMUX_CONFIG_ALT1);
 	mxc_request_iomux(MX53_PIN_NANDF_WE_B,IOMUX_CONFIG_ALT1);
 	mxc_request_iomux(MX53_PIN_NANDF_RE_B,IOMUX_CONFIG_ALT1);
 /*	mxc_iomux_set_pad(MX53_PIN_NANDF_WE_B,0x1DC);
@@ -849,37 +957,18 @@
 	reg |= (1 << 21);
 	writel(reg, GPIO1_BASE_ADDR + 0x4);
 #endif
-	/*GPIO6[12] <---BLK_PWR*/
-	reg = readl(GPIO6_BASE_ADDR + 0x0);
-	reg |= (1 << 12);
-	writel(reg, GPIO6_BASE_ADDR + 0x0);
-
-	reg = readl(GPIO6_BASE_ADDR + 0x4);
-	reg |= (1 << 12);
-	writel(reg, GPIO6_BASE_ADDR + 0x4);
 
-	/*GPIO6[12] <---BLK_PWR*/
-	reg = readl(GPIO6_BASE_ADDR + 0x0);
-	reg |= (1 << 12);
-	writel(reg, GPIO6_BASE_ADDR + 0x0);
-
-	reg = readl(GPIO6_BASE_ADDR + 0x4);
-	reg |= (1 << 12);
-	writel(reg, GPIO6_BASE_ADDR + 0x4);
-	
-	/*GPIO6[13] <---LCD_PWR*/
-	reg = readl(GPIO6_BASE_ADDR + 0x0);
-	reg |= (1 << 13);
-	writel(reg, GPIO6_BASE_ADDR + 0x0);
-
-	reg = readl(GPIO6_BASE_ADDR + 0x4);
-	reg |= (1 << 13);
-	writel(reg, GPIO6_BASE_ADDR + 0x4);	
 #else
 	mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT4);
 #endif
+
+#if 1 // hbchen 201208 // variables: 24 bits(IPU_PIX_FMT_RGB24) / pixel clock(65000000)
+	ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB24,
+			DI_PCLK_LDB, /*74250000*/65000000);
+#else
 	ret = ipuv3_fb_init(&lvds_xga, di, IPU_PIX_FMT_RGB666,
 			DI_PCLK_LDB, 65000000);
+#endif
 	if (ret)
 		puts("L640CD cannot be configured\n");
 
@@ -892,13 +981,61 @@
 	reg |= 0xF0000000;
 	writel(reg, CCM_BASE_ADDR + CLKCTL_CCGR6);
 
+#if 1 // hbchen 201208
+	writel(0x685, IOMUXC_BASE_ADDR + 0x8);//hbchen // 24 bit lvds interface
+	//writel(0x58C, IOMUXC_BASE_ADDR + 0x8);//hbchen // 24 bit lvds interface
+	//writel(0x221, IOMUXC_BASE_ADDR + 0x8);//hbchen // 24 bit lvds interface
+	//writel(0x784, IOMUXC_BASE_ADDR + 0x8);//hbchen // 24 bit lvds interface
+#else	
 	if (di == 1)
-		writel(0x40C, IOMUXC_BASE_ADDR + 0x8);
-	else
-		writel(0x201, IOMUXC_BASE_ADDR + 0x8);
+		{
+			writel(0x58C, IOMUXC_BASE_ADDR + 0x8);//hbchen // 24 bit lvds interface
+		//writel(0x221, IOMUXC_BASE_ADDR + 0x8);//hbchen // 24 bit lvds interface
+			//writel(0x40C, IOMUXC_BASE_ADDR + 0x8); // orig
+		}
+	else{
+			writel(0x221, IOMUXC_BASE_ADDR + 0x8);//hbchen // 24 bit lvds interface
+			//writel(0x201, IOMUXC_BASE_ADDR + 0x8); // orig
+		}
+#endif
 	
 }
 #endif
+void powerOnLCD(void)
+{
+	int ret;
+	unsigned int reg;
+	/*GPIO6[13] <---LCD_PWR*/
+	reg = readl(GPIO6_BASE_ADDR + 0x0);
+	reg |= (1 << 13);
+	writel(reg, GPIO6_BASE_ADDR + 0x0);
+
+	reg = readl(GPIO6_BASE_ADDR + 0x4);
+	reg |= (1 << 13);
+	writel(reg, GPIO6_BASE_ADDR + 0x4); 
+	udelay(10000);/*10ms*/
+
+		/*GPIO1[21] <---BLK_PWM*/
+	reg = readl(GPIO1_BASE_ADDR + 0x0);
+	reg |= (1 << 21);
+	writel(reg, GPIO1_BASE_ADDR + 0x0);
+
+	reg = readl(GPIO1_BASE_ADDR + 0x4);
+	reg |= (1 << 21);
+	writel(reg, GPIO1_BASE_ADDR + 0x4);
+
+	/*GPIO6[12] <---BLK_PWR*/
+	reg = readl(GPIO6_BASE_ADDR + 0x0);
+	reg |= (1 << 12);
+	writel(reg, GPIO6_BASE_ADDR + 0x0);
+
+	reg = readl(GPIO6_BASE_ADDR + 0x4);
+	reg |= (1 << 12);
+	writel(reg, GPIO6_BASE_ADDR + 0x4);
+	
+	
+}
+
 
 #ifdef CONFIG_VIDEO_MX5
 void panel_info_init(void)
@@ -958,6 +1095,35 @@
 }
 int board_init(void)
 {
+	u32 	reg;
+
+	/* nSuspend_out */
+	mxc_request_iomux(MX53_PIN_ATA_DATA2, IOMUX_CONFIG_ALT1);
+
+	reg = readl(GPIO2_BASE_ADDR);
+	reg |= (0x1 << 2);
+	writel(reg, GPIO2_BASE_ADDR);
+
+	reg = readl(GPIO2_BASE_ADDR+4);
+	reg |= (0x1 << 2);
+	writel(reg, GPIO2_BASE_ADDR+4);
+
+	udelay(100000);/*100ms*/
+
+	/* USB_HOST_PWR_EN */
+	mxc_request_iomux(MX53_PIN_ATA_DATA7, IOMUX_CONFIG_ALT1);
+
+	reg = readl(GPIO2_BASE_ADDR);
+	reg |= (0x1 << 7);
+	writel(reg, GPIO2_BASE_ADDR);
+
+	reg = readl(GPIO2_BASE_ADDR+4);
+	reg |= (0x1 << 7);
+	writel(reg, GPIO2_BASE_ADDR+4);
+
+	udelay(100000);/*100ms*/
+
+
 #ifdef CONFIG_MFG
 /* MFG firmware need reset usb to avoid host crash firstly */
 #define USBCMD 0x140
diff -ruN u-boot-2009.08_BSP_20120705/common/cmd_nvedit.c u-boot-2009.08_SVN_checkout/common/cmd_nvedit.c
--- u-boot-2009.08_BSP_20120705/common/cmd_nvedit.c	2012-06-20 15:05:01.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/common/cmd_nvedit.c	2013-09-25 16:44:25.000000000 +0800
@@ -425,6 +425,17 @@
 	return _do_setenv (flag, argc, argv);
 }
 
+#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
+int do_destroyenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	printf("invalidate the CRC\n");
+	env_crc_destroy();
+	printf("write invalidate enviroment data to storage\n");
+	return saveenv() ? 1 : 0;
+}
+#endif
+
+
 /************************************************************************
  * Prompt for environment variable
  */
@@ -614,6 +625,15 @@
 	"    - delete environment variable 'name'"
 );
 
+#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE)
+U_BOOT_CMD(
+	destroyenv, CONFIG_SYS_MAXARGS, 0,	do_destroyenv,
+	"destroy enviroment variables stored in medium",
+	"\n    - destroy all environment variables in medium"
+	"\n      after reset the default settings will be used"
+);
+#endif
+
 #if defined(CONFIG_CMD_ASKENV)
 
 U_BOOT_CMD(
diff -ruN u-boot-2009.08_BSP_20120705/common/env_common.c u-boot-2009.08_SVN_checkout/common/env_common.c
--- u-boot-2009.08_BSP_20120705/common/env_common.c	2012-06-20 15:05:02.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/common/env_common.c	2013-09-25 16:44:25.000000000 +0800
@@ -228,6 +228,12 @@
 	gd->env_valid = 1;
 }
 
+void env_crc_destroy(void)
+{
+	env_ptr->crc += 1;
+}
+
+
 void env_relocate (void)
 {
 	DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__,
diff -ruN u-boot-2009.08_BSP_20120705/common/env_mmc.c u-boot-2009.08_SVN_checkout/common/env_mmc.c
--- u-boot-2009.08_BSP_20120705/common/env_mmc.c	2012-06-20 15:05:02.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/common/env_mmc.c	2013-09-25 16:44:25.000000000 +0800
@@ -66,11 +66,28 @@
 	mmc_env_devno = get_mmc_env_devno();
 #else
 	mmc_env_devno = CONFIG_SYS_MMC_ENV_DEV;
+
 #endif
 
 	return 0;
 }
 
+int check_boot_device(void)
+{
+	struct mmc *mmc;
+	
+	mmc=find_mmc_device(0); /*check inand if exists*/
+	if(mmc_init(mmc)!=0)
+		mmc_env_devno=1;
+
+    else
+		mmc_env_devno=0;
+	printf("Found MMC(%d)... ", mmc_env_devno);
+
+	return 0;
+}
+
+
 int init_mmc_for_env(struct mmc *mmc)
 {
 	if (!mmc) {
diff -ruN u-boot-2009.08_BSP_20120705/drivers/video/mxc_ipuv3_fb.c u-boot-2009.08_SVN_checkout/drivers/video/mxc_ipuv3_fb.c
--- u-boot-2009.08_BSP_20120705/drivers/video/mxc_ipuv3_fb.c	2012-06-20 15:05:04.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/drivers/video/mxc_ipuv3_fb.c	2013-09-25 16:44:27.000000000 +0800
@@ -121,7 +121,7 @@
 	BOTH_OFF
 };
 
-static unsigned long default_bpp = 16;
+static unsigned long default_bpp = 24; // hbchen
 static unsigned char g_dp_in_use;
 static struct fb_info *mxcfb_info[3];
 static int ext_clk_used;
diff -ruN u-boot-2009.08_BSP_20120705/include/common.h u-boot-2009.08_SVN_checkout/include/common.h
--- u-boot-2009.08_BSP_20120705/include/common.h	2012-06-20 15:05:08.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/include/common.h	2013-09-25 16:44:20.000000000 +0800
@@ -245,6 +245,7 @@
 
 /* common/cmd_nvedit.c */
 int	env_init     (void);
+int	check_boot_device     (void);
 void	env_relocate (void);
 int	envmatch     (uchar *, int);
 char	*getenv	     (char *);
diff -ruN u-boot-2009.08_BSP_20120705/include/configs/mx53_smd.h u-boot-2009.08_SVN_checkout/include/configs/mx53_smd.h
--- u-boot-2009.08_BSP_20120705/include/configs/mx53_smd.h	2012-07-02 10:43:42.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/include/configs/mx53_smd.h	2013-09-25 16:44:21.000000000 +0800
@@ -148,9 +148,8 @@
 		"kernel=uImage\0"				\
 		"nfsroot=/opt/eldk/arm\0"				\
 		"bootargs_base=setenv bootargs console=ttymxc0,115200 " \
-			"ldb=single,di=1,ch0_map=SPWG,ch1_map=SPWG " \
-			"video=mxcdi0fb:RGB24,720P60 "\
-			"video=mxcdi0fb:RGB24,AUO-G070VW01 di1_primary,bpp=24\0"\
+			"ldb=single,di=1,ch0_map=JEIDA,ch1_map=JEIDA " \
+			"video=mxcdi0fb:RGB24,AUO-G070VW01,bpp=24 di1_primary\0"\
 		"bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs "\
 			"ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0"\
 		"bootcmd_net=run bootargs_base bootargs_nfs; "		\
@@ -165,8 +164,9 @@
 			"root=/dev/sda1 rootwait\0"	\
 		"bootcmd_sata=run bootargs_base bootargs_sata;sata read ${loadaddr} 0x800 0x1800;bootm\0"	\
 		"bootcmd=run bootcmd_mmc;run bootcmd_sata;run bootcmd_mmc1\0"	\
-		"splashimage=0x70800000\0" \
+        "showlogo=mmc read 0 0x70200000 0x0 0x1; fatload mmc 0:1 0x76000000 ulogo.bmp; bmp d 0x76000000;\0" \
 		"lvds_num=0x01\0" 
+		/*"splashimage=0x76000000\0" \*/
 /*		"ethaddr=00:04:9f:01:32:e0\0" */
 #else
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
@@ -259,7 +259,7 @@
 	#define CONFIG_IMX_MMC
 	#define CONFIG_SYS_FSL_ESDHC_NUM        2
 	#define CONFIG_SYS_FSL_ESDHC_ADDR       0
-	#define CONFIG_SYS_MMC_ENV_DEV  0
+	#define CONFIG_SYS_MMC_ENV_DEV  0 //0 is sd card, 1 is iNand
 	#define CONFIG_DOS_PARTITION	1
 	#define CONFIG_CMD_FAT		1
 	#define CONFIG_CMD_EXT2		1
@@ -360,7 +360,7 @@
 	#define CONFIG_ENV_IS_NOWHERE	1
 #endif
 /*enable splash screen*/
-//#define CONFIG_SPLASH_SCREEN
+#define CONFIG_SPLASH_SCREEN
 #ifdef CONFIG_SPLASH_SCREEN
 	/*
 	 * Framebuffer and LCD
@@ -381,6 +381,11 @@
 	#define CONFIG_IMX_PWM
 	#define IMX_PWM1_BASE    PWM1_BASE_ADDR
 	#define IMX_PWM2_BASE    PWM2_BASE_ADDR
+
+	// select one
+	#define ADV_Panel_800_480 1  // hbchen
+	//#define ADV_Panel_720P 1  // hbchen
+	
 #endif
 
 
@@ -391,5 +396,5 @@
 		#undef CONFIG_DYNAMIC_MMC_DEVNO //default boot from SPI NOR FLASH
 	#endif
 #endif
-#define CONFIG_ADV_UBOOT_VER "1.0"
+#define CONFIG_ADV_UBOOT_VER "1.1"
 #endif				/* __CONFIG_H */
diff -ruN u-boot-2009.08_BSP_20120705/lib_arm/board.c u-boot-2009.08_SVN_checkout/lib_arm/board.c
--- u-boot-2009.08_BSP_20120705/lib_arm/board.c	2012-06-20 15:05:08.000000000 +0800
+++ u-boot-2009.08_SVN_checkout/lib_arm/board.c	2013-09-25 16:44:19.000000000 +0800
@@ -383,6 +383,7 @@
 	mmc_initialize (gd->bd);
 #endif
 
+	check_boot_device();
 	/* initialize environment */
 	env_relocate ();
 
@@ -400,11 +401,18 @@
 	gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
 
 #if defined CONFIG_SPLASH_SCREEN && defined CONFIG_VIDEO_MX5
-	setup_splash_image();
+	//printf("!! setup_splash_image !!\n");
+	//setup_splash_image();
 #endif
 
 	stdio_init ();	/* get the devices list going. */
 
+#ifdef CONFIG_SPLASH_SCREEN //== hbchen, show logo first
+//printf("\n\n showlogo \n\n");
+	s = getenv ("showlogo");
+	run_command (s, 0);
+#endif
+	powerOnLCD();
 
 	jumptable_init ();
 
