aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2012-12-29 11:21:53 +0800
committerGuodong Xu <guodong.xu@linaro.org>2013-02-21 16:12:13 +0800
commit5488e389f7d9a9eb1734d3ac0e733301c80f5624 (patch)
treed33756e84d12a35d83405e41b48ac8f815e4f752
parent19f949f52599ba7c3f67a5897ac6be14bfcb1200 (diff)
ARM: debug: support debug ll on hisilicon soc
Support UART0 debug ll on hisilicon Hi3620 SoC. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/include/debug/hisilicon.S24
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 661030d6bc6..b7a3c7bbe02 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -233,6 +233,13 @@ choice
Say Y here if you want kernel low-level debugging support
on i.MX6Q.
+ config DEBUG_HI3620_UART0
+ bool "Hisilicon HI3620 Debug UART0"
+ depends on ARCH_HS
+ help
+ Say Y here if you want kernel low-level debugging support
+ on HI3620 UART0.
+
config DEBUG_MMP_UART2
bool "Kernel low-level debugging message via MMP UART2"
depends on ARCH_MMP
@@ -500,6 +507,7 @@ config DEBUG_LL_INCLUDE
DEBUG_IMX50_IMX53_UART ||\
DEBUG_IMX6Q_UART
default "debug/highbank.S" if DEBUG_HIGHBANK_UART
+ default "debug/hisilicon.S" if DEBUG_HI3620_UART0 || DEBUG_HI3620_UART4
default "debug/mvebu.S" if DEBUG_MVEBU_UART
default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART
default "debug/socfpga.S" if DEBUG_SOCFPGA_UART
diff --git a/arch/arm/include/debug/hisilicon.S b/arch/arm/include/debug/hisilicon.S
new file mode 100644
index 00000000000..3f25488e133
--- /dev/null
+++ b/arch/arm/include/debug/hisilicon.S
@@ -0,0 +1,24 @@
+/*
+ * Early serial output macro for Hisilicon SoC
+ *
+ * Copyright (C) 2012-2013 Linaro Ltd.
+ *
+ * Haojian Zhuang <haojian.zhuang@linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#define HI3620_UART0_PHYS_BASE 0xfcb00000
+#define HI3620_UART0_VIRT_BASE 0xfeb00000
+
+#if defined(CONFIG_DEBUG_HI3620_UART0)
+ .macro addruart,rp,rv,tmp
+ ldr \rp, =HI3620_UART0_PHYS_BASE
+ ldr \rv, =HI3620_UART0_VIRT_BASE
+ .endm
+
+#include <asm/hardware/debug-pl01x.S>
+
+#endif