import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-mt8127 / include / mach / debug-macro.S
CommitLineData
6fa3eb70
S
1/* linux/include/asm-arm/arch-mt6575/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 2006 MediaTek Inc.
6 *
7 */
8
9@#include <asm/arch/hardware.h>
10
11 .macro addruart,rx
12 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @ MMU enabled?
14 mov \rx, #0x9000
15 movteq \rx, #0xC100 @ physical base address
16 movtne \rx, #0xF100 @ virtual base
17 .endm
18
19 .macro senduart,rd,rx
20 strb \rd, [\rx, #0x0]
21 .endm
22
23 .macro waituart,rd,rx
241001: ldr \rd, [\rx, #0x14] @ UART0 status
25 tst \rd, #0x40 @ write allow
26 beq 1001b
27 .endm
28
29 .macro busyuart,rd,rx
301002: ldr \rd, [\rx, #0x14] @ UART0 status
31 tst \rd, #0x40 @ uart full .eq. busy
32 beq 1002b
33 .endm