diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-07-05 04:02:51 -0400 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-07-05 04:02:51 -0400 |
commit | 4bc256501a159abc7e9fee43f63c68894f6a11d8 (patch) | |
tree | 934b9da94e0dfb720556d24004399784bbe8a8d7 /include | |
parent | d0f349fbce2905607e0473d2358f97f48866e52c (diff) |
MXC: add debug-macro.S for mxc
This patch adds debug-macro.S for arch-mxc
Disadvantage: Due to the board specific UART definition, these macros (and
compile time) will fail for multi board kernels.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-mxc/board-mx31ads.h | 5 | ||||
-rw-r--r-- | include/asm-arm/arch-mxc/debug-macro.S | 38 |
2 files changed, 43 insertions, 0 deletions
diff --git a/include/asm-arm/arch-mxc/board-mx31ads.h b/include/asm-arm/arch-mxc/board-mx31ads.h index 8590127760a..1bc6fb0f9a8 100644 --- a/include/asm-arm/arch-mxc/board-mx31ads.h +++ b/include/asm-arm/arch-mxc/board-mx31ads.h | |||
@@ -109,4 +109,9 @@ | |||
109 | 109 | ||
110 | #define MXC_MAX_EXP_IO_LINES 16 | 110 | #define MXC_MAX_EXP_IO_LINES 16 |
111 | 111 | ||
112 | /* mandatory for CONFIG_LL_DEBUG */ | ||
113 | |||
114 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | ||
115 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | ||
116 | |||
112 | #endif /* __ASM_ARCH_MXC_BOARD_MX31ADS_H__ */ | 117 | #endif /* __ASM_ARCH_MXC_BOARD_MX31ADS_H__ */ |
diff --git a/include/asm-arm/arch-mxc/debug-macro.S b/include/asm-arm/arch-mxc/debug-macro.S new file mode 100644 index 00000000000..34befbb2ea4 --- /dev/null +++ b/include/asm-arm/arch-mxc/debug-macro.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* linux/include/asm-arm/arch-imx/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 | |||
14 | #include <asm/arch/hardware.h> | ||
15 | |||
16 | #ifdef CONFIG_MACH_MX31ADS | ||
17 | #include <asm/arch/board-mx31ads.h> | ||
18 | #endif | ||
19 | |||
20 | .macro addruart,rx | ||
21 | mrc p15, 0, \rx, c1, c0 | ||
22 | tst \rx, #1 @ MMU enabled? | ||
23 | ldreq \rx, =MXC_LL_UART_PADDR @ physical | ||
24 | ldrne \rx, =MXC_LL_UART_VADDR @ virtual | ||
25 | .endm | ||
26 | |||
27 | .macro senduart,rd,rx | ||
28 | str \rd, [\rx, #0x40] @ TXDATA | ||
29 | .endm | ||
30 | |||
31 | .macro waituart,rd,rx | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | 1002: ldr \rd, [\rx, #0x98] @ SR2 | ||
36 | tst \rd, #1 << 3 @ TXDC | ||
37 | beq 1002b @ wait until transmit done | ||
38 | .endm | ||