projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85f3209
)
rk: sram: add default sram_printch implementation
author
黄涛
<huangtao@rock-chips.com>
Tue, 18 Sep 2012 09:21:47 +0000
(17:21 +0800)
committer
黄涛
<huangtao@rock-chips.com>
Tue, 18 Sep 2012 09:22:01 +0000
(17:22 +0800)
arch/arm/plat-rk/sram.c
patch
|
blob
|
history
diff --git
a/arch/arm/plat-rk/sram.c
b/arch/arm/plat-rk/sram.c
index 0edbf2f82c63ddb8d2558e69be368be4db542b05..ec667094aa54d6f5c0c4654170adcac41be8a10d 100644
(file)
--- 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) {