From patchwork Thu Feb 28 07:19:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 15132 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 62E4F23E2E for ; Thu, 28 Feb 2013 07:19:42 +0000 (UTC) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by fiordland.canonical.com (Postfix) with ESMTP id F0F0FA18E2F for ; Thu, 28 Feb 2013 07:19:41 +0000 (UTC) Received: by mail-ve0-f172.google.com with SMTP id cz11so1507617veb.3 for ; Wed, 27 Feb 2013 23:19:41 -0800 (PST) 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 :x-gm-message-state; bh=+66oHRVYMvjFtgYB0RV1a64Ts4XpUqmydh546lErSE4=; b=i5ql24ZOhpYeKJfD2ZoA5+8AKQ82oRESz+6gPXl6BvnhYA7CgGsZ3NAN/z5fwp1Nh2 DAtu0hLFTvctS6VxQH/XN3AsLW+2bhRaNzVbLT/pcd86LJDWv7BW5g4qr+Tb5sNUC93Q uFWVovH7eUj6mzAl+B2Z7QTuQMJiBAdtWEv39nYItfppwVYYOJiW/kj4vQCCDRHy9Vgk czNx/uQXI3op84U0t+O3BDzqXAnzZbPwFCyJEA7ISkg+WIWq/FebrxRSM0bV3BrDFYN6 8V612y/XdielBGZpqePW27fF0qfzIiKmosoF7YmxACxxlqyQxOFa8xeODCixpPgS7kMT QoRg== X-Received: by 10.220.39.69 with SMTP id f5mr2118351vce.45.1362035981399; Wed, 27 Feb 2013 23:19:41 -0800 (PST) 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.145.101 with SMTP id st5csp210871veb; Wed, 27 Feb 2013 23:19:40 -0800 (PST) X-Received: by 10.66.191.162 with SMTP id gz2mr11650903pac.206.1362035980104; Wed, 27 Feb 2013 23:19:40 -0800 (PST) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by mx.google.com with ESMTPS id xe2si7567211pbc.49.2013.02.27.23.19.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Feb 2013 23:19:40 -0800 (PST) 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 xb4so908615pbc.15 for ; Wed, 27 Feb 2013 23:19:38 -0800 (PST) X-Received: by 10.68.134.233 with SMTP id pn9mr7687399pbb.90.1362035978138; Wed, 27 Feb 2013 23:19:38 -0800 (PST) Received: from localhost.localdomain ([140.206.155.71]) by mx.google.com with ESMTPS id k7sm8255069paz.13.2013.02.27.23.19.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 Feb 2013 23:19:37 -0800 (PST) From: Haojian Zhuang To: jone.lixin@huawei.com, arnd@arndb.de, olof@lixom.net, linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Haojian Zhuang Subject: [PATCH 1/7] ARM: debug: support debug ll on hisilicon soc Date: Thu, 28 Feb 2013 15:19:20 +0800 Message-Id: <1362035966-17628-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQlDYV/deo4xZ2Pcq7YSvSvZAdlwVTnZdCZF9jESg/yLwOJNwryuUOt2XLgc8DRkxYKTGNRg 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..32958a6 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_HS + 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_HS + 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..e719545 --- /dev/null +++ b/arch/arm/include/debug/hisilicon.S @@ -0,0 +1,30 @@ +/* + * Early serial output macro for Hisilicon SoC + * + * Copyright (C) 2012-2013 Linaro Ltd. + * Copyright (C) 2012-2013 Hisilicon Ltd. + * + * 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