From patchwork Mon Jun 17 08:56:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 17940 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-bk0-f70.google.com (mail-bk0-f70.google.com [209.85.214.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1915E2100B for ; Mon, 17 Jun 2013 08:56:46 +0000 (UTC) Received: by mail-bk0-f70.google.com with SMTP id ji1sf2434463bkc.9 for ; Mon, 17 Jun 2013 01:56:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=kBYXKpypzi39/sRgiKNVfItH+2txp6As+l9TVqX7Fbk=; b=iWnLlcugUbydqlO0mAazFjdeXiD6mhty97aD/gKHrehvC5Ex9Q7syKl2Xd5k7HuYdV 2mDPCUqKEhusaJK4eK4M5t+JFWaivRCAgqsb+yFs3fKf/zjziJGysEqHsQw1unN+PlhB QSs/RQqhjKAXg8/42P7jcyJgjkWrJkzLEsWGK/fKGRGuwdzKdAT0JQXrHQSNaIswzys0 A0LEcg2Umt+Coo6qKOPGxA4ZisJA0xCR3HqnhXfmeX6oraGzlkmPUABu3RurvCvSOo+t pjzm45P5cB1A+bZW5ctI8TdXB0U+PahGQLi7Oz5JxcY2mCiy9MaL9JZs1ZTokoZxwP6S wKpA== X-Received: by 10.180.160.212 with SMTP id xm20mr2174436wib.0.1371459404767; Mon, 17 Jun 2013 01:56:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.126.103 with SMTP id mx7ls336377wib.53.canary; Mon, 17 Jun 2013 01:56:44 -0700 (PDT) X-Received: by 10.180.14.2 with SMTP id l2mr4243373wic.48.1371459404453; Mon, 17 Jun 2013 01:56:44 -0700 (PDT) Received: from mail-ve0-x232.google.com (mail-ve0-x232.google.com [2607:f8b0:400c:c01::232]) by mx.google.com with ESMTPS id l5si5072116wje.115.2013.06.17.01.56.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 01:56:44 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::232; Received: by mail-ve0-f178.google.com with SMTP id pb11so1884619veb.37 for ; Mon, 17 Jun 2013 01:56:43 -0700 (PDT) X-Received: by 10.220.169.146 with SMTP id z18mr3195698vcy.80.1371459403040; Mon, 17 Jun 2013 01:56:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp26248veb; Mon, 17 Jun 2013 01:56:42 -0700 (PDT) X-Received: by 10.66.155.230 with SMTP id vz6mr11921930pab.30.1371459401492; Mon, 17 Jun 2013 01:56:41 -0700 (PDT) Received: from mail-pb0-x22a.google.com (mail-pb0-x22a.google.com [2607:f8b0:400e:c01::22a]) by mx.google.com with ESMTPS id eh5si5906920pac.28.2013.06.17.01.56.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 01:56:41 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::22a is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=2607:f8b0:400e:c01::22a; Received: by mail-pb0-f42.google.com with SMTP id un1so2555605pbc.29 for ; Mon, 17 Jun 2013 01:56:41 -0700 (PDT) X-Received: by 10.66.232.42 with SMTP id tl10mr11920972pac.159.1371459401010; Mon, 17 Jun 2013 01:56:41 -0700 (PDT) Received: from localhost.localdomain ([27.115.121.40]) by mx.google.com with ESMTPSA id v7sm13051315pbq.32.2013.06.17.01.56.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 01:56: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 Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH v5 2/4] ARM: debug: support debug ll on hisilicon soc Date: Mon, 17 Jun 2013 16:56:14 +0800 Message-Id: <1371459376-25438-3-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1371459376-25438-1-git-send-email-haojian.zhuang@linaro.org> References: <1371459376-25438-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQk23tFJ5jJs7xtnHBesRdDnS6JDtI2LMWE3DtZiRLzzdRtIpqLgR6qPzDmRnTwuIxRNDDJa X-Original-Sender: haojian.zhuang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::232 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Support UART0 debug ll on hisilicon Hi3620 SoC. Signed-off-by: Haojian Zhuang Acked-by: Olof Johansson --- 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 1d41908..7396572 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -251,6 +251,20 @@ choice Say Y here if you want kernel low-level debugging support on i.MX6Q/DL. + 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 @@ -623,6 +637,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