aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Miao <eric.miao@linaro.org>2011-12-21 14:21:15 +0800
committerEric Miao <eric.miao@linaro.org>2012-01-11 21:38:19 +0800
commit76a4f765f4b278c8d8db8e15262b5a41af8b39e5 (patch)
tree84dcaed083c6648df83299b3fa804bd9ba2cd977
parent6155aface4a5048b6398fe2b5bc33687db9fb26b (diff)
downloadlinux-linaro-76a4f765f4b278c8d8db8e15262b5a41af8b39e5.tar.gz
imx6q: add UART2 as debug UART (to be removed)
Signed-off-by: Richard Zhao <richard.zhao@linaro.org> Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r--arch/arm/mach-imx/lluart.c22
-rw-r--r--arch/arm/plat-mxc/include/mach/debug-macro.S2
-rw-r--r--arch/arm/plat-mxc/include/mach/mx6q.h3
3 files changed, 18 insertions, 9 deletions
diff --git a/arch/arm/mach-imx/lluart.c b/arch/arm/mach-imx/lluart.c
index d4ab6f29a76..b3368a3c091 100644
--- a/arch/arm/mach-imx/lluart.c
+++ b/arch/arm/mach-imx/lluart.c
@@ -10,23 +10,31 @@
* http://www.gnu.org/copyleft/gpl.html
*/
+#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/page.h>
#include <asm/sizes.h>
#include <asm/mach/map.h>
#include <mach/hardware.h>
-static struct map_desc imx_lluart_desc = {
+static struct map_desc imx_lluart_desc[] = {
#ifdef CONFIG_DEBUG_IMX6Q_UART
- .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR),
- .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR),
- .length = MX6Q_UART4_SIZE,
- .type = MT_DEVICE,
+ {
+ .virtual = MX6Q_IO_P2V(MX6Q_UART2_BASE_ADDR),
+ .pfn = __phys_to_pfn(MX6Q_UART2_BASE_ADDR),
+ .length = MX6Q_UART_SIZE,
+ .type = MT_DEVICE,
+ }, {
+ .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR),
+ .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR),
+ .length = MX6Q_UART_SIZE,
+ .type = MT_DEVICE,
+ },
#endif
};
void __init imx_lluart_map_io(void)
{
- if (imx_lluart_desc.virtual)
- iotable_init(&imx_lluart_desc, 1);
+ if (ARRAY_SIZE(imx_lluart_desc))
+ iotable_init(imx_lluart_desc, ARRAY_SIZE(imx_lluart_desc));
}
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
index 6e192c4a391..e0945a2b813 100644
--- a/arch/arm/plat-mxc/include/mach/debug-macro.S
+++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
@@ -25,7 +25,7 @@
#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
#define UART_PADDR MX53_UART1_BASE_ADDR
#elif defined (CONFIG_DEBUG_IMX6Q_UART)
-#define UART_PADDR MX6Q_UART4_BASE_ADDR
+#define UART_PADDR MX6Q_UART2_BASE_ADDR
#endif
#define UART_VADDR IMX_IO_ADDRESS(UART_PADDR)
diff --git a/arch/arm/plat-mxc/include/mach/mx6q.h b/arch/arm/plat-mxc/include/mach/mx6q.h
index e051ff1f651..7684284669b 100644
--- a/arch/arm/plat-mxc/include/mach/mx6q.h
+++ b/arch/arm/plat-mxc/include/mach/mx6q.h
@@ -29,8 +29,9 @@
#define MX6Q_CCM_SIZE 0x4000
#define MX6Q_ANATOP_BASE_ADDR 0x020c8000
#define MX6Q_ANATOP_SIZE 0x1000
+#define MX6Q_UART2_BASE_ADDR 0x021e8000
#define MX6Q_UART4_BASE_ADDR 0x021f0000
-#define MX6Q_UART4_SIZE 0x4000
+#define MX6Q_UART_SIZE 0x4000
/* The last 4K is for cpu hotplug to workaround wdog issue */
#define MX6Q_IRAM_BASE_ADDR 0x00900000