提交 49db76eb 编写于 作者: P Philipp Zabel 提交者: Russell King

[ARM] 4663/1: Only putc uncompressor output into FFUART if it was enabled by the bootloader

Also, use existing register and bit definitions instead of numbers.
Signed-off-by: NPhilipp Zabel <philipp.zabel@gmail.com>
Acked-by: NNicolas Pitre <nico@cam.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 6bc54e69
......@@ -9,6 +9,9 @@
* published by the Free Software Foundation.
*/
#include <linux/serial_reg.h>
#include <asm/arch/pxa-regs.h>
#define FFUART ((volatile unsigned long *)0x40100000)
#define BTUART ((volatile unsigned long *)0x40200000)
#define STUART ((volatile unsigned long *)0x40700000)
......@@ -19,9 +22,11 @@
static inline void putc(char c)
{
while (!(UART[5] & 0x20))
if (!(UART[UART_IER] & IER_UUE))
return;
while (!(UART[UART_LSR] & LSR_TDRQ))
barrier();
UART[0] = c;
UART[UART_TX] = c;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册