From: Seung-Woo Kim Date: Thu, 2 Nov 2017 07:08:18 +0000 (+0900) Subject: Revert "spl: serial_bcm283x: set GPIO before enabling uart to remove rx" X-Git-Tag: accepted/tizen/unified/20201110.125028~234 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58721d1656b26724717e76eeab912bb8a1fdf722;p=platform%2Fkernel%2Fu-boot.git Revert "spl: serial_bcm283x: set GPIO before enabling uart to remove rx" 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 --- diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c index 7af86ee..20d9eb9 100644 --- a/drivers/serial/serial_bcm283x_mu.c +++ b/drivers/serial/serial_bcm283x_mu.c @@ -229,6 +229,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); @@ -236,17 +240,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)