Revert "spl: serial_bcm283x: set GPIO before enabling uart to remove rx" 15/158615/1 accepted/tizen/4.0/unified/20171102.140322 accepted/tizen/unified/20171103.162237 submit/tizen/20171102.071401 submit/tizen_4.0/20171102.071416
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 2 Nov 2017 07:08:18 +0000 (16:08 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Thu, 2 Nov 2017 07:08:29 +0000 (16:08 +0900)
This reverts commit d1dac2248ae24ba833069679734f966f0e481b5a.

The commit fixes hang on u-boot console with serial connection, but
it blocks all serial rx communication, so it is not possible to send
any command via uart. So reverting it and the original issue will be
handled later.

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

index 85d5555e9b01a59a50d08b9c1ee94cf1d73f2dcf..c3d6d70aac8620d65401946497d269caf798c24a 100644 (file)
@@ -211,6 +211,10 @@ 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);
 
@@ -218,17 +222,13 @@ static inline void _debug_uart_init(void)
        GPPUD = 0;
        for (i = 0; i < 150; i++)
                __asm__ __volatile__("nop");
-       GPPUDCLK0 = (2 << 14);
+       GPPUDCLK0 = (2 << 14) | (2 << 15);
        for (i = 0; i < 150; i++)
                __asm__ __volatile__("nop");
 
        GPPUDCLK0 = 0;
 
-       AUX_ENB |= 1;   /* Enable mini-uart */
-       MU_LCR = 3;     /* 8 bit. */
-       MU_BAUD = 270;  /* 115200 baud.(0x10e) */
-
-       MU_CNTL = 2;    /* Enable Tx */
+       MU_CNTL = 3;    /* Enable Tx & Rx */
 }
 
 static inline void _debug_uart_putc(int ch)