From patchwork Wed Mar 13 05:05:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2261541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 601873FD8C for ; Wed, 13 Mar 2013 05:12:49 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFdwi-0006D4-Es; Wed, 13 Mar 2013 05:09:48 +0000 Received: from mail-pb0-f42.google.com ([209.85.160.42]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UFduV-00057Z-NA for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2013 05:07:32 +0000 Received: by mail-pb0-f42.google.com with SMTP id xb4so617659pbc.15 for ; Tue, 12 Mar 2013 22:07:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=Fu+q0pJfKok66R8j+EAmyx0d7uILDN7T5Dr5Rj16UM4=; b=Y+1xetR0B1lZsWnhmxtpDqOd6Q/mCIOO4A9QGAz4v+XAQsazRivC7kheXqLRWEzFdU RaW4ABClq1A8ifPGS9J8H3vvqSZntT+s8mYcHjJF7hwUBX3Pt5AaR/KhGt7FPbkoLeQe lo3MFscYC9959MKTjFwBnjc7ocv9m22f0+x7GsCqfsVT/Satwk16fSzH1LDfNKhO+/ie tZX++ieeWP72IkH0ihartjJQit2FinhXg2pi1bVhbKG8myohgkFGc42K3nDOm2siUdJ6 tzKozWguU81TuzogmxZsHzicuOwpWaEeSwSblwWw/KSLgdZy/sfssd5JzzmhLuX0MyEn JxLQ== X-Received: by 10.68.48.168 with SMTP id m8mr36838852pbn.138.1363151250306; Tue, 12 Mar 2013 22:07:30 -0700 (PDT) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPS id ab1sm27947630pbd.37.2013.03.12.22.07.25 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 22:07:29 -0700 (PDT) From: Haojian Zhuang To: linux@arm.linux.org.uk, linus.walleij@linaro.org, arnd@arndb.de, olof@lixom.net, rob.herring@calxeda.com, linux-arm-kernel@lists.infradead.org, pawel.moll@arm.com, swarren@nvidia.com, john.stultz@linaro.org, tglx@linutronix.de, mturquette@linaro.org Subject: [PATCH v3 07/11] ARM: debug: support debug ll on hisilicon soc Date: Wed, 13 Mar 2013 13:05:38 +0800 Message-Id: <1363151142-32162-8-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363151142-32162-1-git-send-email-haojian.zhuang@linaro.org> References: <1363151142-32162-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQnbPSOBxyjQDlJ4IAsDye7Mg+4JR314AqH4nI2PQs3v7I5/T0GmhMRqwCyTB0EnrVkXDNwT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130313_010731_866842_4F632D6C X-CRM114-Status: GOOD ( 11.38 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.42 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 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 ecfcdba..fd2a39d 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -240,6 +240,20 @@ choice Say Y here if you want kernel low-level debugging support on i.MX6Q. + 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 @@ -589,6 +603,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX53_UART ||\ DEBUG_IMX6Q_UART default "debug/highbank.S" if DEBUG_HIGHBANK_UART + default "debug/hisilicon.S" if DEBUG_HI3620_UART || DEBUG_HI3716_UART default "debug/mvebu.S" if DEBUG_MVEBU_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/picoxcell.S" if DEBUG_PICOXCELL_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