aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/include/mach/debug-macro.S
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /arch/arm/plat-mxc/include/mach/debug-macro.S
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'arch/arm/plat-mxc/include/mach/debug-macro.S')
-rw-r--r--arch/arm/plat-mxc/include/mach/debug-macro.S73
1 files changed, 73 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
new file mode 100644
index 00000000000..e4dde91f023
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
@@ -0,0 +1,73 @@
1/* arch/arm/mach-imx/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13#include <mach/hardware.h>
14
15#ifdef CONFIG_SOC_IMX1
16#define UART_PADDR MX1_UART1_BASE_ADDR
17#endif
18
19#ifdef CONFIG_SOC_IMX25
20#ifdef UART_PADDR
21#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
22#endif
23#define UART_PADDR MX25_UART1_BASE_ADDR
24#endif
25
26#if defined(CONFIG_SOC_IMX21) || defined (CONFIG_SOC_IMX27)
27#ifdef UART_PADDR
28#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
29#endif
30#define UART_PADDR MX2x_UART1_BASE_ADDR
31#endif
32
33#if defined(CONFIG_SOC_IMX31) || defined(CONFIG_SOC_IMX35)
34#ifdef UART_PADDR
35#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
36#endif
37#define UART_PADDR MX3x_UART1_BASE_ADDR
38#endif
39
40#ifdef CONFIG_SOC_IMX51
41#ifdef UART_PADDR
42#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
43#endif
44#define UART_PADDR MX51_UART1_BASE_ADDR
45#endif
46
47/* iMX50/53 have same addresses, but not iMX51 */
48#if defined(CONFIG_SOC_IMX50) || defined(CONFIG_SOC_IMX53)
49#ifdef UART_PADDR
50#error "CONFIG_DEBUG_LL is incompatible with multiple archs"
51#endif
52#define UART_PADDR MX53_UART1_BASE_ADDR
53#endif
54
55#define UART_VADDR IMX_IO_ADDRESS(UART_PADDR)
56
57 .macro addruart, rp, rv
58 ldr \rp, =UART_PADDR @ physical
59 ldr \rv, =UART_VADDR @ virtual
60 .endm
61
62 .macro senduart,rd,rx
63 str \rd, [\rx, #0x40] @ TXDATA
64 .endm
65
66 .macro waituart,rd,rx
67 .endm
68
69 .macro busyuart,rd,rx
701002: ldr \rd, [\rx, #0x98] @ SR2
71 tst \rd, #1 << 3 @ TXDC
72 beq 1002b @ wait until transmit done
73 .endm