aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2012-12-29 11:21:53 +0800
committerZhangfei Gao <zhangfei.gao@linaro.org>2013-08-13 14:33:07 +0800
commit4504eab212e4dce7ed1e80c60ec0e02373acf9ec (patch)
tree515b463b3d031e53e2164c42898e5d3db1e90204
parent814dcbcaede280b39d52991f61891394ab7cf8e1 (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 1d41908d5cda..b90a2cef5d87 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -251,6 +251,13 @@ choice
Say Y here if you want kernel low-level debugging support
on i.MX6Q/DL.
+ 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
@@ -623,6 +630,7 @@ config DEBUG_LL_INCLUDE
default "debug/cns3xxx.S" if DEBUG_CNS3XXX
default "debug/exynos.S" if DEBUG_EXYNOS_UART
default "debug/highbank.S" if DEBUG_HIGHBANK_UART
+ default "debug/hisilicon.S" if DEBUG_HI3620_UART0 || DEBUG_HI3620_UART4
default "debug/icedcc.S" if DEBUG_ICEDCC
default "debug/imx.S" if DEBUG_IMX1_UART || \
DEBUG_IMX25_UART || \
diff --git a/arch/arm/include/debug/hisilicon.S b/arch/arm/include/debug/hisilicon.S
new file mode 100644
index 000000000000..3f25488e1332
--- /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