From patchwork Fri Jul 26 04:32:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2833777 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B4842C0319 for ; Fri, 26 Jul 2013 04:35:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6CD920190 for ; Fri, 26 Jul 2013 04:35:43 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A27F320178 for ; Fri, 26 Jul 2013 04:35:42 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2ZkS-0000BV-NO; Fri, 26 Jul 2013 04:35:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2ZkK-0005z3-SP; Fri, 26 Jul 2013 04:35:16 +0000 Received: from mail-pa0-f47.google.com ([209.85.220.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2Zk6-0005wa-0c for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2013 04:35:03 +0000 Received: by mail-pa0-f47.google.com with SMTP id kl13so2819291pab.6 for ; Thu, 25 Jul 2013 21:34:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=5mCwZYxvy05nuYeOeJX8X1HjQDF7HzLvMT6J8NutvVs=; b=WAQ4JkWvYa3WtPHt4AQNfMmsKqByaK7qxZefUhHBwNy/cbYp86CLGRtELdxrJivx1V cy6PdR5XDfhLTAv4/uYW/1BxEnApmx29uHAlUNg9+Habj9ODE9Dbd2dSb/VCwEcy2KG0 i8PzKkCReK3ZRP/qv3vc77HKp/8BRI/ts+zJSJ79JbaJ87g3Jbd90MCJysJToDKsyOlP W8trCOOpDOGAqTILl4keB0MR5gh0bOIQbBOvNqLDIwTReYV5uz7M/S1tGa5sN4gkSpec S/U0L3FTamBch3RbBjQ/z+JNn46C1pUWnq7LwgixI2woT/vv/iBSP2uYqoVOgQ2ARDaD DM+Q== X-Received: by 10.66.253.40 with SMTP id zx8mr53034820pac.71.1374813280425; Thu, 25 Jul 2013 21:34:40 -0700 (PDT) Received: from localhost.localdomain ([67.229.68.101]) by mx.google.com with ESMTPSA id is3sm51351497pbc.25.2013.07.25.21.34.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Jul 2013 21:34:39 -0700 (PDT) From: Haojian Zhuang To: arnd@arndb.de, linux@arm.linux.org.uk, linus.walleij@linaro.org, olof@lixom.net, rob.herring@calxeda.com, linux-arm-kernel@lists.infradead.org, tglx@linutronix.de, john.stultz@linaro.org, mturquette@linaro.org Subject: [PATCH v6 2/4] ARM: debug: support debug ll on hisilicon soc Date: Fri, 26 Jul 2013 12:32:13 +0800 Message-Id: <1374813135-16238-3-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1374813135-16238-1-git-send-email-haojian.zhuang@linaro.org> References: <1374813135-16238-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQlzjkvCuBjlb7E224iP4eOGgmzlqeadQbolabcId2+hMH3YgjXF6XMghUKRDPUAGBIl52oN X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130726_003502_348748_14C019E5 X-CRM114-Status: GOOD ( 13.43 ) X-Spam-Score: -2.6 (--) Cc: Haojian Zhuang , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Support UART0 debug ll on hisilicon Hi3620 SoC. Signed-off-by: Haojian Zhuang --- arch/arm/Kconfig.debug | 15 +++++++++++++++ arch/arm/include/debug/hisilicon.S | 30 ++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 arch/arm/include/debug/hisilicon.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index e401a76..289a248 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -272,6 +272,20 @@ choice Say Y here if you want the debug print routines to direct their output to UART1 serial port on KEYSTONE2 devices. + config DEBUG_HI3620_UART + bool "Hisilicon HI3620 Debug UART" + depends on ARCH_HI3xxx + help + Say Y here if you want kernel low-level debugging support + on HI3620 UART. + + config DEBUG_HI3716_UART + bool "Hisilicon Hi3716 Debug UART" + depends on ARCH_HI3xxx + help + Say Y here if you want kernel low-level debugging support + on HI3716 UART. + config DEBUG_MMP_UART2 bool "Kernel low-level debugging message via MMP UART2" depends on ARCH_MMP @@ -765,6 +779,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_UART || DEBUG_HI3716_UART 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 0000000..47ad019 --- /dev/null +++ b/arch/arm/include/debug/hisilicon.S @@ -0,0 +1,30 @@ +/* + * Early serial output macro for Hisilicon SoC + * + * Copyright (C) 2012-2013 Hisilicon Technologies Co., Ltd. + * Copyright (C) 2012-2013 Linaro Ltd. + * + * Author: Haojian Zhuang + * + * 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. +*/ + +#if defined(CONFIG_DEBUG_HI3620_UART) +#define HS_UART_PHYS_BASE 0xfcb00000 +#define HS_UART_VIRT_BASE 0xfeb00000 +#elif defined(CONFIG_DEBUG_HI3716_UART) +#define HS_UART_PHYS_BASE 0xf8b00000 +#define HS_UART_VIRT_BASE 0xfeb00000 +#endif + +#if defined(CONFIG_DEBUG_HI3620_UART) || defined(CONFIG_DEBUG_HI3716_UART) + .macro addruart,rp,rv,tmp + ldr \rp, =HS_UART_PHYS_BASE + ldr \rv, =HS_UART_VIRT_BASE + .endm + +#include + +#endif