fiq debugger: add resume for debug uart

The uart power domain is off after suspend, which makes
uart registers reseted. So, when resume, uart driver gets
wrong registers value, and enters endless loop.

Change-Id: I90eb805d85cc27486e94949b9a84c4f8a12430b7
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
Huibin Hong
2016-06-22 18:21:29 +08:00
committed by Huang, Tao
parent 8afd25d646
commit 0e7d751d6c

View File

@@ -177,6 +177,12 @@ static void debug_flush(struct platform_device *pdev)
cpu_relax();
}
static int uart_dev_resume(struct platform_device *pdev)
{
debug_port_init(pdev);
return 0;
}
#ifdef CONFIG_RK_CONSOLE_THREAD
#define FIFO_SIZE SZ_64K
static DEFINE_KFIFO(fifo, unsigned char, FIFO_SIZE);
@@ -321,6 +327,7 @@ void rk_serial_debug_init(void __iomem *base, int irq, int signal_irq,
t->pdata.uart_init = debug_port_init;
t->pdata.uart_getc = debug_getc;
t->pdata.uart_putc = debug_putc;
t->pdata.uart_dev_resume = uart_dev_resume;
#ifndef CONFIG_RK_CONSOLE_THREAD
t->pdata.uart_flush = debug_flush;
#endif