diff target-utils/libcommon/serflush.S @ 26:1a3bbab2ea26

loadagent: jump command implemented
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 04 May 2013 05:38:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/target-utils/libcommon/serflush.S	Sat May 04 05:38:58 2013 +0000
@@ -0,0 +1,12 @@
+#include "ns16550.h"
+
+	.text
+	.code	32
+	.global	serial_flush
+serial_flush:
+	ldr	r1, =uart_base
+	ldr	r2, [r1]
+1:	ldrb	r3, [r2, #NS16550_LSR]
+	tst	r3, #NS16550_LSR_TEMP
+	beq	1b
+	bx	lr