annotate target-utils/libcommon/serio.S @ 866:3adb4154f02f

power cycle crash bug found: see the changes in gsm-fw/gpf/osl/os_mem_fl.c
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sat, 16 May 2015 01:38:49 +0000
parents d7591faa1258
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 #include "ns16550.h"
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 @ this module implements the elementary serial I/O operations
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 .text
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 .code 32
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 .global serial_out
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 serial_out:
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 ldr r1, =uart_base
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 ldr r2, [r1]
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 1: ldrb r3, [r2, #NS16550_LSR]
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 tst r3, #NS16550_LSR_THRE
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 beq 1b
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14 strb r0, [r2, #NS16550_THR]
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 bx lr
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 .global serial_in_poll
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 serial_in_poll:
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 ldr r1, =uart_base
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 ldr r2, [r1]
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 ldrb r3, [r2, #NS16550_LSR]
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 tst r3, #NS16550_LSR_DR
393
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
23 ldrneb r0, [r2, #NS16550_RBR]
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
24 mvneq r0, #0
1
da98dc08f575 loadagent: beginning to lay the foundation
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 bx lr
393
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
26
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
27 .global serial_flush
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
28 serial_flush:
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
29 ldr r1, =uart_base
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
30 ldr r2, [r1]
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
31 1: ldrb r3, [r2, #NS16550_LSR]
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
32 tst r3, #NS16550_LSR_TEMP
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
33 beq 1b
d7591faa1258 target-utils serial I/O made consistent with other projects
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 11
diff changeset
34 bx lr