aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/include/debug/imx.S (renamed from arch/arm/mach-imx/include/mach/debug-macro.S)33
2 files changed, 30 insertions, 11 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index b0f3857b3a4c..5566520686a5 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -412,6 +412,14 @@ endchoice
412config DEBUG_LL_INCLUDE 412config DEBUG_LL_INCLUDE
413 string 413 string
414 default "debug/icedcc.S" if DEBUG_ICEDCC 414 default "debug/icedcc.S" if DEBUG_ICEDCC
415 default "debug/imx.S" if DEBUG_IMX1_UART || \
416 DEBUG_IMX25_UART || \
417 DEBUG_IMX21_IMX27_UART || \
418 DEBUG_IMX31_IMX35_UART || \
419 DEBUG_IMX51_UART || \
420 DEBUG_IMX50_IMX53_UART ||\
421 DEBUG_IMX6Q_UART2 || \
422 DEBUG_IMX6Q_UART4
415 default "debug/highbank.S" if DEBUG_HIGHBANK_UART 423 default "debug/highbank.S" if DEBUG_HIGHBANK_UART
416 default "debug/mvebu.S" if DEBUG_MVEBU_UART 424 default "debug/mvebu.S" if DEBUG_MVEBU_UART
417 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART 425 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
diff --git a/arch/arm/mach-imx/include/mach/debug-macro.S b/arch/arm/include/debug/imx.S
index 761e45f9456f..0b65d792f664 100644
--- a/arch/arm/mach-imx/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/imx.S
@@ -10,27 +10,38 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12 */ 12 */
13#include <mach/hardware.h>
14
15#ifdef CONFIG_DEBUG_IMX1_UART 13#ifdef CONFIG_DEBUG_IMX1_UART
16#define UART_PADDR MX1_UART1_BASE_ADDR 14#define UART_PADDR 0x00206000
17#elif defined (CONFIG_DEBUG_IMX25_UART) 15#elif defined (CONFIG_DEBUG_IMX25_UART)
18#define UART_PADDR MX25_UART1_BASE_ADDR 16#define UART_PADDR 0x43f90000
19#elif defined (CONFIG_DEBUG_IMX21_IMX27_UART) 17#elif defined (CONFIG_DEBUG_IMX21_IMX27_UART)
20#define UART_PADDR MX2x_UART1_BASE_ADDR 18#define UART_PADDR 0x1000a000
21#elif defined (CONFIG_DEBUG_IMX31_IMX35_UART) 19#elif defined (CONFIG_DEBUG_IMX31_IMX35_UART)
22#define UART_PADDR MX3x_UART1_BASE_ADDR 20#define UART_PADDR 0x43f90000
23#elif defined (CONFIG_DEBUG_IMX51_UART) 21#elif defined (CONFIG_DEBUG_IMX51_UART)
24#define UART_PADDR MX51_UART1_BASE_ADDR 22#define UART_PADDR 0x73fbc000
25#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) 23#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
26#define UART_PADDR MX53_UART1_BASE_ADDR 24#define UART_PADDR 0x53fbc000
27#elif defined (CONFIG_DEBUG_IMX6Q_UART2) 25#elif defined (CONFIG_DEBUG_IMX6Q_UART2)
28#define UART_PADDR MX6Q_UART2_BASE_ADDR 26#define UART_PADDR 0x021e8000
29#elif defined (CONFIG_DEBUG_IMX6Q_UART4) 27#elif defined (CONFIG_DEBUG_IMX6Q_UART4)
30#define UART_PADDR MX6Q_UART4_BASE_ADDR 28#define UART_PADDR 0x021f0000
31#endif 29#endif
32 30
33#define UART_VADDR IMX_IO_ADDRESS(UART_PADDR) 31/*
32 * FIXME: This is a copy of IMX_IO_P2V in hardware.h, and needs to
33 * stay sync with that. It's hard to maintain, and should be fixed
34 * globally for multi-platform build to use a fixed virtual address
35 * for low-level debug uart port across platforms.
36 */
37#define IMX_IO_P2V(x) ( \
38 (((x) & 0x80000000) >> 7) | \
39 (0xf4000000 + \
40 (((x) & 0x50000000) >> 6) + \
41 (((x) & 0x0b000000) >> 4) + \
42 (((x) & 0x000fffff))))
43
44#define UART_VADDR IMX_IO_P2V(UART_PADDR)
34 45
35 .macro addruart, rp, rv, tmp 46 .macro addruart, rp, rv, tmp
36 ldr \rp, =UART_PADDR @ physical 47 ldr \rp, =UART_PADDR @ physical