aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-01-17 03:37:42 -0500
committerShawn Guo <shawn.guo@linaro.org>2013-01-29 01:05:41 -0500
commit3e549a69469775ae26dd3bc34365e6da5bdbf18c (patch)
treea09365927f90c3c2e5275b95e8cb2705ac377a6d
parentcd4842f55861202d8b1d8b1ed035f22014f0812c (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/Makefile1
-rw-r--r--arch/arm/mach-imx/common.h5
-rw-r--r--arch/arm/mach-imx/lluart.c47
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c3
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
88obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o 88obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o
89obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o 89obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
90 90
91obj-$(CONFIG_DEBUG_LL) += lluart.o
92obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o 91obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
93obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o 92obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
94obj-$(CONFIG_HAVE_IMX_SRC) += src.o 93obj-$(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
117extern void imx_enable_cpu(int cpu, bool enable); 117extern void imx_enable_cpu(int cpu, bool enable);
118extern void imx_set_cpu_jump(int cpu, void *jump_addr); 118extern void imx_set_cpu_jump(int cpu, void *jump_addr);
119#ifdef CONFIG_DEBUG_LL
120extern void imx_lluart_map_io(void);
121#else
122static inline void imx_lluart_map_io(void) {}
123#endif
124extern void v7_cpu_resume(void); 119extern void v7_cpu_resume(void);
125extern u32 *pl310_get_save_ptr(void); 120extern 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
34static 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
43void __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
217static void __init imx6q_map_io(void) 218static 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