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: 18597 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f200.google.com (mail-gh0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EC32225DF6 for ; Fri, 26 Jul 2013 04:34:42 +0000 (UTC) Received: by mail-gh0-f200.google.com with SMTP id 10sf2311816ghy.3 for ; Thu, 25 Jul 2013 21:34:42 -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=5mCwZYxvy05nuYeOeJX8X1HjQDF7HzLvMT6J8NutvVs=; b=NG4jm4p9cfskEEmhfntK+gxX70LoS38WC3KAUUNSqbH8JIklZUC6TtkzwiXtcmcwqR LZcMRmF1ocJcEsl8rf8X9wkwJZyoH0ITAkI3Y6C0nXL3mB0ADilG8YuKFdkIpGuzBSEI t7yqXrHNIyveFSfoEH6lpCw9M+juDcwxbSTO73rYQjZjYv6NMrxrEfGo0/iAZwjHhfzT upX43U8mh6nLUZBKy9P9k73gySQ5hsiQi9i0Sw866Mrw38yRJeOCPvi5G5NjPNvvgGAH T+sVsZGJLC2TeWED7s8bI1yX3ln3h3TmxskGPaq7oCKeYIFw5AOgNES0kxlETCFMBfXw 1JmQ== X-Received: by 10.236.123.70 with SMTP id u46mr24011727yhh.20.1374813282389; Thu, 25 Jul 2013 21:34:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.201 with SMTP id q9ls943095qed.48.gmail; Thu, 25 Jul 2013 21:34:42 -0700 (PDT) X-Received: by 10.220.183.10 with SMTP id ce10mr2281857vcb.41.1374813282146; Thu, 25 Jul 2013 21:34:42 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id k4si13507478vdi.119.2013.07.25.21.34.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Jul 2013 21:34:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id d10so976870vea.10 for ; Thu, 25 Jul 2013 21:34:42 -0700 (PDT) X-Received: by 10.58.135.227 with SMTP id pv3mr19565542veb.21.1374813282010; Thu, 25 Jul 2013 21:34:42 -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 yu8csp3457veb; Thu, 25 Jul 2013 21:34:41 -0700 (PDT) X-Received: by 10.68.171.194 with SMTP id aw2mr51723840pbc.197.1374813280794; Thu, 25 Jul 2013 21:34:40 -0700 (PDT) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by mx.google.com with ESMTPS id ez5si627907pab.280.2013.07.25.21.34.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 25 Jul 2013 21:34:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.171 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.192.171; Received: by mail-pd0-f171.google.com with SMTP id y14so2475869pdi.2 for ; Thu, 25 Jul 2013 21:34:40 -0700 (PDT) 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 Cc: patches@linaro.org, Haojian Zhuang 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: ALoCoQnAn4ygBMcvTFO16Ph9bRllWSHXFAwaJrt1h2y7RQB2uxBLNp8NzEt+hE0DT0egvE6gv6VP X-Original-Sender: haojian.zhuang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.179 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 --- 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