diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-01-17 03:37:42 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-01-29 01:05:41 -0500 |
commit | 3e549a69469775ae26dd3bc34365e6da5bdbf18c (patch) | |
tree | a09365927f90c3c2e5275b95e8cb2705ac377a6d | |
parent | cd4842f55861202d8b1d8b1ed035f22014f0812c (diff) |
ARM: imx: use debug_ll_io_init() for imx6q
Use debug_ll_io_init() to map low level debug port for imx6q, so that
arch/arm/mach-imx/lluart.c can be removed.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
-rw-r--r-- | arch/arm/mach-imx/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/common.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-imx/lluart.c | 47 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 3 |
4 files changed, 2 insertions, 54 deletions
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile index 0634b3152c24..f35eb397bd50 100644 --- a/arch/arm/mach-imx/Makefile +++ b/arch/arm/mach-imx/Makefile | |||
@@ -88,7 +88,6 @@ obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o | |||
88 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o | 88 | obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o |
89 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o | 89 | obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o |
90 | 90 | ||
91 | obj-$(CONFIG_DEBUG_LL) += lluart.o | ||
92 | obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o | 91 | obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o |
93 | obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o | 92 | obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o |
94 | obj-$(CONFIG_HAVE_IMX_SRC) += src.o | 93 | obj-$(CONFIG_HAVE_IMX_SRC) += src.o |
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h index 7eb3bb2267b5..d67264097b32 100644 --- a/arch/arm/mach-imx/common.h +++ b/arch/arm/mach-imx/common.h | |||
@@ -116,11 +116,6 @@ void tzic_handle_irq(struct pt_regs *); | |||
116 | 116 | ||
117 | extern void imx_enable_cpu(int cpu, bool enable); | 117 | extern void imx_enable_cpu(int cpu, bool enable); |
118 | extern void imx_set_cpu_jump(int cpu, void *jump_addr); | 118 | extern void imx_set_cpu_jump(int cpu, void *jump_addr); |
119 | #ifdef CONFIG_DEBUG_LL | ||
120 | extern void imx_lluart_map_io(void); | ||
121 | #else | ||
122 | static inline void imx_lluart_map_io(void) {} | ||
123 | #endif | ||
124 | extern void v7_cpu_resume(void); | 119 | extern void v7_cpu_resume(void); |
125 | extern u32 *pl310_get_save_ptr(void); | 120 | extern u32 *pl310_get_save_ptr(void); |
126 | #ifdef CONFIG_SMP | 121 | #ifdef CONFIG_SMP |
diff --git a/arch/arm/mach-imx/lluart.c b/arch/arm/mach-imx/lluart.c deleted file mode 100644 index 2fdc9bf2fb5e..000000000000 --- a/arch/arm/mach-imx/lluart.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. | ||
3 | * Copyright 2011 Linaro Ltd. | ||
4 | * | ||
5 | * The code contained herein is licensed under the GNU General Public | ||
6 | * License. You may obtain a copy of the GNU General Public License | ||
7 | * Version 2 or later at the following locations: | ||
8 | * | ||
9 | * http://www.opensource.org/licenses/gpl-license.html | ||
10 | * http://www.gnu.org/copyleft/gpl.html | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/sizes.h> | ||
16 | #include <asm/mach/map.h> | ||
17 | |||
18 | #include "hardware.h" | ||
19 | |||
20 | #define IMX6Q_UART1_BASE_ADDR 0x02020000 | ||
21 | #define IMX6Q_UART2_BASE_ADDR 0x021e8000 | ||
22 | #define IMX6Q_UART3_BASE_ADDR 0x021ec000 | ||
23 | #define IMX6Q_UART4_BASE_ADDR 0x021f0000 | ||
24 | #define IMX6Q_UART5_BASE_ADDR 0x021f4000 | ||
25 | |||
26 | /* | ||
27 | * IMX6Q_UART_BASE_ADDR is put in the middle to force the expansion | ||
28 | * of IMX6Q_UART##n##_BASE_ADDR. | ||
29 | */ | ||
30 | #define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR | ||
31 | #define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n) | ||
32 | #define IMX6Q_DEBUG_UART_BASE IMX6Q_UART_BASE(CONFIG_DEBUG_IMX6Q_UART_PORT) | ||
33 | |||
34 | static struct map_desc imx_lluart_desc = { | ||
35 | #ifdef CONFIG_DEBUG_IMX6Q_UART | ||
36 | .virtual = IMX_IO_P2V(IMX6Q_DEBUG_UART_BASE), | ||
37 | .pfn = __phys_to_pfn(IMX6Q_DEBUG_UART_BASE), | ||
38 | .length = 0x4000, | ||
39 | .type = MT_DEVICE, | ||
40 | #endif | ||
41 | }; | ||
42 | |||
43 | void __init imx_lluart_map_io(void) | ||
44 | { | ||
45 | if (imx_lluart_desc.virtual) | ||
46 | iotable_init(&imx_lluart_desc, 1); | ||
47 | } | ||
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index a009df79fa0a..ce7476d49271 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/hardware/cache-l2x0.h> | 31 | #include <asm/hardware/cache-l2x0.h> |
32 | #include <asm/hardware/gic.h> | 32 | #include <asm/hardware/gic.h> |
33 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | ||
34 | #include <asm/mach/time.h> | 35 | #include <asm/mach/time.h> |
35 | #include <asm/system_misc.h> | 36 | #include <asm/system_misc.h> |
36 | 37 | ||
@@ -216,7 +217,7 @@ static void __init imx6q_init_late(void) | |||
216 | 217 | ||
217 | static void __init imx6q_map_io(void) | 218 | static void __init imx6q_map_io(void) |
218 | { | 219 | { |
219 | imx_lluart_map_io(); | 220 | debug_ll_io_init(); |
220 | imx_scu_map_io(); | 221 | imx_scu_map_io(); |
221 | } | 222 | } |
222 | 223 | ||