From 69a8ff2ffa32d6b243d7170325bb8b608ff04659 Mon Sep 17 00:00:00 2001 From: Huibin Hong Date: Mon, 21 May 2018 14:39:16 +0800 Subject: [PATCH] soc: rockchip: rk_fiq_debugger: remove debug_port_init of uart putc and flush If uart is busy all the time, which may call debug_port_init and reset uart, but this can't clear the USR busy status. The LCR can't be writed if UART is busy.UART can't be reinited ok. This issue is tested by open and close wifi, and start logcat. A lot of android log is outputed by uart,uart is always busy,maybe it triggers reinit process, and cause the issue. It is unnecessary to call debug_port_init, because we have make sure uart is ok all the time. Change-Id: I1ef06e2a913d7045e86fe75a48a152c04e7e96a7 Signed-off-by: Huibin Hong --- drivers/soc/rockchip/rk_fiq_debugger.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/soc/rockchip/rk_fiq_debugger.c b/drivers/soc/rockchip/rk_fiq_debugger.c index e2c90030840c..740755b6f721 100755 --- a/drivers/soc/rockchip/rk_fiq_debugger.c +++ b/drivers/soc/rockchip/rk_fiq_debugger.c @@ -185,9 +185,6 @@ static void debug_putc(struct platform_device *pdev, unsigned int c) while (!(rk_fiq_read(t, UART_USR) & UART_USR_TX_FIFO_NOT_FULL) && count--) udelay(10); - /* If uart is always busy, maybe it is abnormal, reinit it */ - if ((count == 0) && (rk_fiq_read(t, UART_USR) & UART_USR_BUSY)) - debug_port_init(pdev); rk_fiq_write(t, c, UART_TX); } @@ -200,9 +197,6 @@ static void debug_flush(struct platform_device *pdev) while (!(rk_fiq_read_lsr(t) & UART_LSR_TEMT) && count--) udelay(10); - /* If uart is always busy, maybe it is abnormal, reinit it */ - if ((count == 0) && (rk_fiq_read(t, UART_USR) & UART_USR_BUSY)) - debug_port_init(pdev); } #ifdef CONFIG_RK_CONSOLE_THREAD @@ -223,9 +217,6 @@ static void console_putc(struct platform_device *pdev, unsigned int c) while (!(rk_fiq_read(t, UART_USR) & UART_USR_TX_FIFO_NOT_FULL) && count--) usleep_range(200, 210); - /* If uart is always busy, maybe it is abnormal, reinit it */ - if ((count == 0) && (rk_fiq_read(t, UART_USR) & UART_USR_BUSY)) - debug_port_init(pdev); rk_fiq_write(t, c, UART_TX); } @@ -239,9 +230,6 @@ static void console_flush(struct platform_device *pdev) while (!(rk_fiq_read_lsr(t) & UART_LSR_TEMT) && count--) usleep_range(200, 210); - /* If uart is always busy, maybe it is abnormal, reinit it */ - if ((count == 0) && (rk_fiq_read(t, UART_USR) & UART_USR_BUSY)) - debug_port_init(pdev); } static void console_put(struct platform_device *pdev,