From patchwork Tue Mar 12 17:08:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 15296 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 3577823E3E for ; Tue, 12 Mar 2013 17:09:30 +0000 (UTC) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by fiordland.canonical.com (Postfix) with ESMTP id D093BA18777 for ; Tue, 12 Mar 2013 17:09:29 +0000 (UTC) Received: by mail-ve0-f173.google.com with SMTP id oz10so62616veb.18 for ; Tue, 12 Mar 2013 10:09:29 -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=KtQxEXhceZDwlvTz5z+c2sB2b9hcdmvgQcAgYO55GIwrWGnslfFN3PZZoLuhw20C0z QEeyCPEhf0KRT1zlgTPaExWKi+VRJxjWWMHzvbwWTXXg0hIM0KY5YUSIwMEPKxTn/+Ao meKd/5UPMA6011o38h0D+I3lcZ0hjDH2OaG3VE8ReW7BFoD6yoISKGHRKCrJhapKz6tL q9p+XHUZXNMUjnC5eGVzLDYVI6PheI0g7z8Frhha0pQRu1S2w8udPl8/ML5d2ayQub/a 8jCAklDLFPR1ZtzPGbBhTt6ExNHFIjww9wod50gbNScRk1UkaC5B8FNpt9d/xTCybrnD CZKw== X-Received: by 10.220.242.73 with SMTP id lh9mr6476835vcb.49.1363108169324; Tue, 12 Mar 2013 10:09:29 -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 nf2csp138400veb; Tue, 12 Mar 2013 10:09:28 -0700 (PDT) X-Received: by 10.182.231.39 with SMTP id td7mr13042943obc.86.1363108168413; Tue, 12 Mar 2013 10:09:28 -0700 (PDT) Received: from mail-ia0-x22f.google.com (mail-ia0-x22f.google.com [2607:f8b0:4001:c02::22f]) by mx.google.com with ESMTPS id ju8si20931869obb.11.2013.03.12.10.09.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 10:09:28 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:4001:c02::22f is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=2607:f8b0:4001:c02::22f; Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:4001:c02::22f 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-ia0-f175.google.com with SMTP id y26so62592iab.34 for ; Tue, 12 Mar 2013 10:09:27 -0700 (PDT) X-Received: by 10.50.13.175 with SMTP id i15mr12123067igc.105.1363108167460; Tue, 12 Mar 2013 10:09:27 -0700 (PDT) Received: from localhost.localdomain ([140.206.155.72]) by mx.google.com with ESMTPS id xc3sm20593825igb.10.2013.03.12.10.09.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 10:09:26 -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 v2 07/14] ARM: debug: support debug ll on hisilicon soc Date: Wed, 13 Mar 2013 01:08:36 +0800 Message-Id: <1363108124-17484-8-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1363108124-17484-1-git-send-email-haojian.zhuang@linaro.org> References: <1363108124-17484-1-git-send-email-haojian.zhuang@linaro.org> X-Gm-Message-State: ALoCoQnyVrzqbIQTFg9pBLR+meAHPAFBX6BYX+CFfSPyj1q1xAtFgVX8/jZnPoR+WJPqd8aT2hFt 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