aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2013-05-12 05:22:17 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:00:36 -0400
commitd1c237555dae7c04aa7f38e1b044f84c6baa1025 (patch)
tree1d70fa05c5dfb744230a9b0703430802933da2b6
parente9e1b6319e45d2dd853861f0c704296db21dba76 (diff)
ARM: imx: add low-level debug for Vybrid
Add low-level debug support for Vybrid, so that earlyprintk can be enabled for debugging early boot issue. Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/include/debug/vf.S26
-rw-r--r--arch/arm/mach-imx/mach-vf610.c2
3 files changed, 36 insertions, 0 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 29f7623553c1..f87333d35033 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -316,6 +316,13 @@ choice
316 Say Y here if you want kernel low-level debugging support 316 Say Y here if you want kernel low-level debugging support
317 on MVEBU based platforms. 317 on MVEBU based platforms.
318 318
319 config DEBUG_VF_UART
320 bool "Vybrid UART"
321 depends on SOC_VF610
322 help
323 Say Y here if you want kernel low-level debugging support
324 on Vybrid based platforms.
325
319 config DEBUG_NOMADIK_UART 326 config DEBUG_NOMADIK_UART
320 bool "Kernel low-level debugging messages via NOMADIK UART" 327 bool "Kernel low-level debugging messages via NOMADIK UART"
321 depends on ARCH_NOMADIK 328 depends on ARCH_NOMADIK
@@ -655,6 +662,7 @@ config DEBUG_LL_INCLUDE
655 default "debug/ux500.S" if DEBUG_UX500_UART 662 default "debug/ux500.S" if DEBUG_UX500_UART
656 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ 663 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
657 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 664 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
665 default "debug/vf.S" if DEBUG_VF_UART
658 default "debug/vt8500.S" if DEBUG_VT8500_UART0 666 default "debug/vt8500.S" if DEBUG_VT8500_UART0
659 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 667 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
660 default "mach/debug-macro.S" 668 default "mach/debug-macro.S"
diff --git a/arch/arm/include/debug/vf.S b/arch/arm/include/debug/vf.S
new file mode 100644
index 000000000000..3791e5e7b6a6
--- /dev/null
+++ b/arch/arm/include/debug/vf.S
@@ -0,0 +1,26 @@
1/*
2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 */
9
10 .macro addruart, rp, rv, tmp
11 ldr \rp, =0x40028000 @ physical
12 ldr \rv, =0xfe028000 @ virtual
13 .endm
14
15 .macro senduart, rd, rx
16 strb \rd, [\rx, #0x7] @ Data Register
17 .endm
18
19 .macro busyuart, rd, rx
201001: ldrb \rd, [\rx, #0x4] @ Status Register 1
21 tst \rd, #1 << 6 @ TC
22 beq 1001b @ wait until transmit done
23 .endm
24
25 .macro waituart,rd,rx
26 .endm
diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c
index 816991deb9b8..bac37cbb933c 100644
--- a/arch/arm/mach-imx/mach-vf610.c
+++ b/arch/arm/mach-imx/mach-vf610.c
@@ -12,6 +12,7 @@
12#include <linux/irqchip.h> 12#include <linux/irqchip.h>
13#include <linux/clk-provider.h> 13#include <linux/clk-provider.h>
14#include <asm/mach/arch.h> 14#include <asm/mach/arch.h>
15#include <asm/mach/map.h>
15#include <asm/hardware/cache-l2x0.h> 16#include <asm/hardware/cache-l2x0.h>
16 17
17#include "common.h" 18#include "common.h"
@@ -40,6 +41,7 @@ static const char *vf610_dt_compat[] __initdata = {
40}; 41};
41 42
42DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)") 43DT_MACHINE_START(VYBRID_VF610, "Freescale Vybrid VF610 (Device Tree)")
44 .map_io = debug_ll_io_init,
43 .init_irq = vf610_init_irq, 45 .init_irq = vf610_init_irq,
44 .init_time = vf610_init_time, 46 .init_time = vf610_init_time,
45 .init_machine = vf610_init_machine, 47 .init_machine = vf610_init_machine,