[Feature][ZXW-237]merge P54U03 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: Id39ef8b992af691eab09c01d4ea26da89e5f4049
diff --git a/boot/common/src/uboot/drivers/serial/uart.c b/boot/common/src/uboot/drivers/serial/uart.c
old mode 100644
new mode 100755
index 2118369..c5eb337
--- a/boot/common/src/uboot/drivers/serial/uart.c
+++ b/boot/common/src/uboot/drivers/serial/uart.c
@@ -171,6 +171,36 @@
 }
 
 
+#ifdef CONFIG_CTRL_X_SWTCH_UART
+extern bool g_flg_ctrl_x;
+void serial_getc_cons_key_flag(unsigned long us,unsigned int wait)
+{
+	int c1,c2;
+	static int cnt_wait = 0;
+	while(1)
+	{
+		if((__REG(UART_FR) & UART_RXFE) == 0)
+			c1 = (__REG(UART_DR) & 0xff);
+		udelay(us);
+		if((__REG(UART_FR) & UART_RXFE) == 0)
+			c2 = (__REG(UART_DR) & 0xff);
+		if((c1 == c2) && (c1 == 24)){
+			g_flg_ctrl_x = false;
+			debug("ctrk+x:get.\n");
+			return 1;
+		}
+		if(cnt_wait > wait){
+			debug("ctrk+x:not get.\n");
+			g_flg_ctrl_x = true;
+			cnt_wait = 0;
+			return 0;
+		}else{
+			cnt_wait++;
+		}
+	}
+	return 0;	
+}
+#endif
 #ifdef CONFIG_HWFLOW
 static int hwflow = 0; /* turned off by default */
 int hwflow_onoff(int on)