From bde7cce9ea576114e07152d77ae25f3df5a72c60 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Tue, 18 Sep 2012 17:21:47 +0800 Subject: [PATCH] rk: sram: add default sram_printch implementation --- arch/arm/plat-rk/sram.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/plat-rk/sram.c b/arch/arm/plat-rk/sram.c index 0edbf2f82c63..ec667094aa54 100644 --- a/arch/arm/plat-rk/sram.c +++ b/arch/arm/plat-rk/sram.c @@ -69,6 +69,21 @@ int __init rk29_sram_init(void) return 0; } +__weak void __sramfunc sram_printch(char byte) +{ +#ifdef DEBUG_UART_BASE + writel_relaxed(byte, DEBUG_UART_BASE); + dsb(); + + /* loop check LSR[6], Transmitter Empty bit */ + while (!(readl_relaxed(DEBUG_UART_BASE + 0x14) & 0x40)) + barrier(); + + if (byte == '\n') + sram_printch('\r'); +#endif +} + void __sramfunc sram_printascii(const char *s) { while (*s) { -- 2.34.1