Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
[deliverable/linux.git] / arch / arm / include / debug / 8250.S
CommitLineData
268099e3 1/*
2facbc88 2 * arch/arm/include/debug/8250.S
268099e3 3 *
c3faa9b7 4 * Copyright (C) 1994-2013 Russell King
268099e3
RK
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/serial_reg.h>
11
c3faa9b7
RK
12 .macro addruart, rp, rv, tmp
13 ldr \rp, =CONFIG_DEBUG_UART_PHYS
14 ldr \rv, =CONFIG_DEBUG_UART_VIRT
15 .endm
c3faa9b7 16
0b4cccbe
RK
17#ifdef CONFIG_DEBUG_UART_8250_WORD
18 .macro store, rd, rx:vararg
6ef4e479 19 ARM_BE8(rev \rd, \rd)
0b4cccbe 20 str \rd, \rx
6ef4e479 21 ARM_BE8(rev \rd, \rd)
0b4cccbe
RK
22 .endm
23
24 .macro load, rd, rx:vararg
25 ldr \rd, \rx
6ef4e479 26 ARM_BE8(rev \rd, \rd)
0b4cccbe
RK
27 .endm
28#else
29 .macro store, rd, rx:vararg
30 strb \rd, \rx
31 .endm
32
33 .macro load, rd, rx:vararg
34 ldrb \rd, \rx
35 .endm
36#endif
37
4a003647 38#define UART_SHIFT CONFIG_DEBUG_UART_8250_SHIFT
4a003647 39
268099e3 40 .macro senduart,rd,rx
0b4cccbe 41 store \rd, [\rx, #UART_TX << UART_SHIFT]
268099e3
RK
42 .endm
43
44 .macro busyuart,rd,rx
0b4cccbe 451002: load \rd, [\rx, #UART_LSR << UART_SHIFT]
268099e3
RK
46 and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
47 teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
48 bne 1002b
49 .endm
50
51 .macro waituart,rd,rx
7610b607 52#ifdef CONFIG_DEBUG_UART_8250_FLOW_CONTROL
0b4cccbe 531001: load \rd, [\rx, #UART_MSR << UART_SHIFT]
268099e3
RK
54 tst \rd, #UART_MSR_CTS
55 beq 1001b
56#endif
57 .endm
This page took 0.666135 seconds and 5 git commands to generate.