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: 15317 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 8862923E2E for ; Wed, 13 Mar 2013 05:07:33 +0000 (UTC) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by fiordland.canonical.com (Postfix) with ESMTP id 2E4DEA19283 for ; Wed, 13 Mar 2013 05:07:33 +0000 (UTC) Received: by mail-vc0-f172.google.com with SMTP id l6so316003vcl.31 for ; Tue, 12 Mar 2013 22:07:32 -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=Fu+q0pJfKok66R8j+EAmyx0d7uILDN7T5Dr5Rj16UM4=; b=fzyEzOkp0RfKM5/WlT7qsVc1iFdwl9eVDT9SbjsQyOpUOM9xVvEe1+6wRAhBYqsil3 6onlFPTnIoRFhl7M/bFee2RrSUIsDN0kRoDkd7sXECYVJwj/mxBMKeFmHstoOpnX4Bc5 7tRn31UWQmSg7HSav/IVq4Qfu3097GHH+fX/3j1tMKRN983Nur4jh6aD5DlVqM26yv+9 UqrqQqfdtGYvDkQsEEsHOb1w3oyCbvVbdbsfM/GGayxtC20tPU+SoxCDJD7QO3texS9L puSf1w+LgD63N14vUEFeSY8v6anADSErKYwQv77sutCQwUmBAqYnujIX7wIMxRihFgqG SBMw== X-Received: by 10.220.39.69 with SMTP id f5mr3543246vce.45.1363151252645; Tue, 12 Mar 2013 22:07:32 -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 nf2csp1636veb; Tue, 12 Mar 2013 22:07:31 -0700 (PDT) X-Received: by 10.68.203.9 with SMTP id km9mr42812030pbc.191.1363151251242; Tue, 12 Mar 2013 22:07:31 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id ns4si33567513pbc.110.2013.03.12.22.07.30 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 22:07:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 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-f50.google.com with SMTP id up1so609776pbc.23 for ; Tue, 12 Mar 2013 22:07:30 -0700 (PDT) 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 Cc: patches@linaro.org, Haojian Zhuang 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: ALoCoQmNoojUds6X2038fTZOooND3n7NxfIb2Lbb5xYw0ID1sHhbwSbRuRG529NGdIxdlK2IQcPW 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