aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2013-05-12 05:22:17 -0400
committerShawn Guo <shawn.guo@linaro.org>2013-10-20 21:11:07 -0400
commitc7c3eac6277bc60fb4472a16c5af5d54afc83596 (patch)
treed5adc61fddb818e903eeb617d6f2e8c5a560f763
parent4c1dd3e5edc1619199b4a42618169ac3ac457cb5 (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@linaro.org>
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/include/debug/vf.S26
2 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 9762c84b4198..d597c6b8488b 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -386,6 +386,13 @@ choice
386 when u-boot hands over to the kernel, the system 386 when u-boot hands over to the kernel, the system
387 silently crashes, with no serial output at all. 387 silently crashes, with no serial output at all.
388 388
389 config DEBUG_VF_UART
390 bool "Vybrid UART"
391 depends on SOC_VF610
392 help
393 Say Y here if you want kernel low-level debugging support
394 on Vybrid based platforms.
395
389 config DEBUG_NOMADIK_UART 396 config DEBUG_NOMADIK_UART
390 bool "Kernel low-level debugging messages via NOMADIK UART" 397 bool "Kernel low-level debugging messages via NOMADIK UART"
391 depends on ARCH_NOMADIK 398 depends on ARCH_NOMADIK
@@ -906,6 +913,7 @@ config DEBUG_LL_INCLUDE
906 default "debug/tegra.S" if DEBUG_TEGRA_UART 913 default "debug/tegra.S" if DEBUG_TEGRA_UART
907 default "debug/ux500.S" if DEBUG_UX500_UART 914 default "debug/ux500.S" if DEBUG_UX500_UART
908 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT 915 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT
916 default "debug/vf.S" if DEBUG_VF_UART
909 default "debug/vt8500.S" if DEBUG_VT8500_UART0 917 default "debug/vt8500.S" if DEBUG_VT8500_UART0
910 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 918 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
911 default "mach/debug-macro.S" 919 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..ba12cc44b2cb
--- /dev/null
+++ b/arch/arm/include/debug/vf.S
@@ -0,0 +1,26 @@
1/*
2 * Copyright 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