spl: serial_bcm283x: remove unnecessary gpio setting 46/158846/1 accepted/tizen/4.0/unified/20171106.162923 accepted/tizen/unified/20171106.162858 submit/tizen/20171106.082505 submit/tizen_4.0/20171106.082447 tizen_4.0.IoT.p2_release
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 3 Nov 2017 09:33:39 +0000 (18:33 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 3 Nov 2017 10:22:42 +0000 (19:22 +0900)
The config.txt has enable_uart=1 option, so bootcode.bin will set
register to enable uart, so spl of rpi3 does not need to set uart
register. Remove the unnecessary setting to remove garbage in uart
rx.

This fixes unexpected hang-up on u-boot prompt without connection
uart to serial console.

Change-Id: I813b4304e434c0f3d51d06078b38d09adb7b993d
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/serial/serial_bcm283x_mu.c

index c3d6d70..606e233 100644 (file)
@@ -209,26 +209,10 @@ U_BOOT_DRIVER(serial_bcm283x_mu) = {
 
 static inline void _debug_uart_init(void)
 {
-       int     i;
-
-       AUX_ENB |= 1;   /* Enable mini-uart */
-       MU_LCR = 3;     /* 8 bit. */
-       MU_BAUD = 270;  /* 115200 baud.(0x10e) */
-
-       GPFSEL1 &= ~((7<<12) | (7 << 15));      /* GPIO14 & 15 : alt5 */
-       GPFSEL1 |= (2 << 12) | (2 << 15);
-
-       /* Disable pull-up/down */
-       GPPUD = 0;
-       for (i = 0; i < 150; i++)
-               __asm__ __volatile__("nop");
-       GPPUDCLK0 = (2 << 14) | (2 << 15);
-       for (i = 0; i < 150; i++)
-               __asm__ __volatile__("nop");
-
-       GPPUDCLK0 = 0;
-
-       MU_CNTL = 3;    /* Enable Tx & Rx */
+       /*
+        * uart setting is already done from bootcode.bin
+        * with enable_uart=1 in config.txt
+        */
 }
 
 static inline void _debug_uart_putc(int ch)