aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2013-04-09 23:17:04 -0400
committerHaojian Zhuang <haojian.zhuang@linaro.org>2013-04-10 22:02:31 -0400
commit0a43cd3b1cc1b7e1dfc461cf55b414610d038769 (patch)
tree4a15a84bd2b9906b53431fbf30a4ff0770c141db
parent8cdde3386628266347334579a44b1c9dad9b9d1d (diff)
ARM: pxa: move debug uart code
Move debug uart code from mach-pxa/mach-mmp to debug directory. Since they are similar, merge them together. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Acked-by: Eric Mico <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/Kconfig.debug9
-rw-r--r--arch/arm/include/debug/pxa.S33
-rw-r--r--arch/arm/mach-mmp/include/mach/debug-macro.S30
-rw-r--r--arch/arm/mach-pxa/include/mach/debug-macro.S23
4 files changed, 42 insertions, 53 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 9b31f4311ea2..e5d2e6bbe76f 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -312,6 +312,13 @@ choice
312 Say Y here if you want kernel low-level debugging support 312 Say Y here if you want kernel low-level debugging support
313 on PicoXcell based platforms. 313 on PicoXcell based platforms.
314 314
315 config DEBUG_PXA_UART1
316 depends on ARCH_PXA
317 bool "Use PXA UART1 for low-level debug"
318 help
319 Say Y here if you want kernel low-level debugging support
320 on PXA UART1.
321
315 config DEBUG_REALVIEW_STD_PORT 322 config DEBUG_REALVIEW_STD_PORT
316 bool "RealView Default UART" 323 bool "RealView Default UART"
317 depends on ARCH_REALVIEW 324 depends on ARCH_REALVIEW
@@ -593,6 +600,8 @@ config DEBUG_LL_INCLUDE
593 default "debug/mvebu.S" if DEBUG_MVEBU_UART 600 default "debug/mvebu.S" if DEBUG_MVEBU_UART
594 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART 601 default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
595 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART 602 default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
603 default "debug/pxa.S" if DEBUG_PXA_UART1 || DEBUG_MMP_UART2 || \
604 DEBUG_MMP_UART3
596 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART 605 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
597 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 606 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
598 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ 607 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
diff --git a/arch/arm/include/debug/pxa.S b/arch/arm/include/debug/pxa.S
new file mode 100644
index 000000000000..e1e795aa3d7f
--- /dev/null
+++ b/arch/arm/include/debug/pxa.S
@@ -0,0 +1,33 @@
1/*
2 * Early serial output macro for Marvell PXA/MMP SoC
3 *
4 * Copyright (C) 1994-1999 Russell King
5 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
6 *
7 * Copyright (C) 2013 Haojian Zhuang
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#if defined(CONFIG_DEBUG_PXA_UART1)
15#define PXA_UART_REG_PHYS_BASE 0x40100000
16#define PXA_UART_REG_VIRT_BASE 0xf2100000
17#elif defined(CONFIG_DEBUG_MMP_UART2)
18#define PXA_UART_REG_PHYS_BASE 0xd4017000
19#define PXA_UART_REG_VIRT_BASE 0xfe017000
20#elif defined(CONFIG_DEBUG_MMP_UART3)
21#define PXA_UART_REG_PHYS_BASE 0xd4018000
22#define PXA_UART_REG_VIRT_BASE 0xfe018000
23#else
24#error "Select uart for DEBUG_LL"
25#endif
26
27 .macro addruart, rp, rv, tmp
28 ldr \rp, =PXA_UART_REG_PHYS_BASE
29 ldr \rv, =PXA_UART_REG_VIRT_BASE
30 .endm
31
32#define UART_SHIFT 2
33#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-mmp/include/mach/debug-macro.S b/arch/arm/mach-mmp/include/mach/debug-macro.S
deleted file mode 100644
index 5c3cc29688ab..000000000000
--- a/arch/arm/mach-mmp/include/mach/debug-macro.S
+++ /dev/null
@@ -1,30 +0,0 @@
1/* arch/arm/mach-mmp/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copied from arch/arm/mach-pxa/include/mach/debug.S
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#if defined(CONFIG_DEBUG_MMP_UART2)
13#define MMP_UART_OFFSET 0x00017000
14#elif defined(CONFIG_DEBUG_MMP_UART3)
15#define MMP_UART_OFFSET 0x00018000
16#else
17#error "Select uart for DEBUG_LL"
18#endif
19
20#include <mach/addr-map.h>
21
22 .macro addruart, rp, rv, tmp
23 ldr \rp, =APB_PHYS_BASE @ physical
24 ldr \rv, =APB_VIRT_BASE @ virtual
25 orr \rp, \rp, #MMP_UART_OFFSET
26 orr \rv, \rv, #MMP_UART_OFFSET
27 .endm
28
29#define UART_SHIFT 2
30#include <asm/hardware/debug-8250.S>
diff --git a/arch/arm/mach-pxa/include/mach/debug-macro.S b/arch/arm/mach-pxa/include/mach/debug-macro.S
deleted file mode 100644
index 70b112e8ef68..000000000000
--- a/arch/arm/mach-pxa/include/mach/debug-macro.S
+++ /dev/null
@@ -1,23 +0,0 @@
1/* arch/arm/mach-pxa/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
14#include "hardware.h"
15
16 .macro addruart, rp, rv, tmp
17 mov \rp, #0x00100000
18 orr \rv, \rp, #io_p2v(0x40000000) @ virtual
19 orr \rp, \rp, #0x40000000 @ physical
20 .endm
21
22#define UART_SHIFT 2
23#include <asm/hardware/debug-8250.S>