From patchwork Thu Mar 14 07:19:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 15340 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DB0BA23E39 for ; Thu, 14 Mar 2013 07:21:06 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id 219C2A18C37 for ; Thu, 14 Mar 2013 07:21:06 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fr13so1010602vbb.17 for ; Thu, 14 Mar 2013 00:21:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=hAM+psqAzOcWW4N2aAVtrcLuD89jWPuYNSiGXwq6Ers=; b=GYnHhRr3JhE8u9oWjhMzdqIiSvMNUA4FtPmYSYw2SAhz6cnG6gaN+035dj92tsYoMA STpHtY3sWV3lBd84faMlJum1NW5hylrbAQBfKMWon9Un4lX4DDmenute1J/G6oUQat/l XDEXPkUofvEXsil2BMYb8mU0yKiSypubqZ7HeDPZqinUdY6ewhgXtaLgqsdVuXS5mjbZ 6nc2likQjvERFOjVOMzODYznBgM4GFvN77eLnC/F6De9rEYwch9mqb9TQ0D4fIHLHT8E nCgzjb3sZmPVAjqQOg5tYhH9Ww24ifCKbft7yFaGszJpt2x4LZ9d0lntkE33gV21CSty MbLw== X-Received: by 10.52.177.163 with SMTP id cr3mr522618vdc.94.1363245665632; Thu, 14 Mar 2013 00:21:05 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp57579veb; Thu, 14 Mar 2013 00:21:05 -0700 (PDT) X-Received: by 10.68.11.169 with SMTP id r9mr3005935pbb.221.1363245664290; Thu, 14 Mar 2013 00:21:04 -0700 (PDT) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by mx.google.com with ESMTPS id tx10si2726150pbc.272.2013.03.14.00.21.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Mar 2013 00:21:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.42 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.160.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.42 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) smtp.mail=haojian.zhuang@linaro.org Received: by mail-pb0-f42.google.com with SMTP id xb4so1832353pbc.15 for ; Thu, 14 Mar 2013 00:21:03 -0700 (PDT) X-Received: by 10.68.137.131 with SMTP id qi3mr3313806pbb.47.1363245663805; Thu, 14 Mar 2013 00:21:03 -0700 (PDT) Received: from localhost.localdomain ([67.198.145.34]) by mx.google.com with ESMTPS id qp13sm1941967pbb.3.2013.03.14.00.20.59 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Mar 2013 00:21:02 -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 Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH v4 1/5] ARM: debug: support debug ll on hisilicon soc Date: Thu, 14 Mar 2013 15:19:40 +0800 Message-Id: <1363245584-24488-2-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363245584-24488-1-git-send-email-haojian.zhuang@linaro.org> References: <1363245584-24488-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQlxQSLFiCabso/XnBqofDlvgcBQfS7j6rn4KLw/OqvNQqaEfAJaCZ7E5IEV+OVuJF/VxUc7 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 acdddda..fd658db 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