FreeCalypso > hg > freecalypso-sw
annotate target-utils/libcommon/serflush.S @ 390:bb4814eb51e4
target-utils abb[rw] commands: call abb_init() to avoid dead hang
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Wed, 11 Jun 2014 07:11:16 +0000 |
parents | 1a3bbab2ea26 |
children |
rev | line source |
---|---|
26
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include "ns16550.h" |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 .text |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 .code 32 |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 .global serial_flush |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 serial_flush: |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 ldr r1, =uart_base |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 ldr r2, [r1] |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 1: ldrb r3, [r2, #NS16550_LSR] |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 tst r3, #NS16550_LSR_TEMP |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 beq 1b |
1a3bbab2ea26
loadagent: jump command implemented
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 bx lr |