From patchwork Tue Apr 28 09:18:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Nie X-Patchwork-Id: 47660 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3A77620553 for ; Tue, 28 Apr 2015 09:21:44 +0000 (UTC) Received: by wizk4 with SMTP id k4sf4238169wiz.2 for ; Tue, 28 Apr 2015 02:21:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=AsKdi7Ft3UslgBlqKlUoD//ek7KgeRzhwKtt+3zGW0Q=; b=XxQOd2tK3VaIli1aox1UhOpft8XscSnm82Y3lYQibVbxOgep+dzTLQQ2tK5mPC66mK 9BaeKqkv8jZuC/6odMPQFYmlIBUMV1PhzclxcDUv0Mydfxsk8wKRWHWj+l6ihFwt+kCg PF1DW7fPtXiBTGFYlNQKOnlX9B+YwiUWbJYRNjoOCFayN9EKvBvu8qLEmXv/64E7Gc4m k/4J245ahuHmwnpuyFtDmWw1p2i+kwMYiH9za5v2Jk6Gh+JbUJSgJFCA3NtX0WvRNQHj TrcNXVqgDSsxfF9uHpiyqs4/oo82lY+hsq03xWDoO+veJxxzDgfRiuHoXH3pyZsMtXAl ip6A== X-Gm-Message-State: ALoCoQmTrZrpiFJvvB13Y+Cn8mgKzcpMCRVVpdTLxrGjc4NWtgm6xfv/VzxJDZj75Eqv6uRXLbOk X-Received: by 10.180.211.168 with SMTP id nd8mr9583169wic.4.1430212903505; Tue, 28 Apr 2015 02:21:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.225 with SMTP id db1ls43233lac.78.gmail; Tue, 28 Apr 2015 02:21:43 -0700 (PDT) X-Received: by 10.153.4.135 with SMTP id ce7mr13717505lad.44.1430212903344; Tue, 28 Apr 2015 02:21:43 -0700 (PDT) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id t4si16658912lbo.3.2015.04.28.02.21.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Apr 2015 02:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by lbbzk7 with SMTP id zk7so102394392lbb.0 for ; Tue, 28 Apr 2015 02:21:43 -0700 (PDT) X-Received: by 10.152.4.137 with SMTP id k9mr13569643lak.29.1430212903260; Tue, 28 Apr 2015 02:21:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp1766384lbt; Tue, 28 Apr 2015 02:21:42 -0700 (PDT) X-Received: by 10.68.178.229 with SMTP id db5mr2252879pbc.17.1430212901446; Tue, 28 Apr 2015 02:21:41 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id sa6si33695767pbb.125.2015.04.28.02.21.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Apr 2015 02:21:41 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yn1gc-0001Vo-0s; Tue, 28 Apr 2015 09:20:14 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yn1fd-0000JO-P9 for linux-arm-kernel@lists.infradead.org; Tue, 28 Apr 2015 09:19:14 +0000 Received: by pacyx8 with SMTP id yx8so158669667pac.1 for ; Tue, 28 Apr 2015 02:18:52 -0700 (PDT) X-Received: by 10.68.213.135 with SMTP id ns7mr30288079pbc.157.1430212732489; Tue, 28 Apr 2015 02:18:52 -0700 (PDT) Received: from localhost.localdomain ([107.6.117.179]) by mx.google.com with ESMTPSA id ht10sm21822534pdb.41.2015.04.28.02.18.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Apr 2015 02:18:51 -0700 (PDT) From: Jun Nie To: arm@kernel.org, linux-arm-kernel@lists.infradead.org, mturquette@linaro.org, shawn.guo@linaro.org, arnd@arndb.de Subject: [PATCH v4 3/7] ARM: zx: add low level debug support for zx296702 Date: Tue, 28 Apr 2015 17:18:07 +0800 Message-Id: <1430212691-16009-4-git-send-email-jun.nie@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430212691-16009-1-git-send-email-jun.nie@linaro.org> References: <1430212691-16009-1-git-send-email-jun.nie@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150428_021913_917753_5C82CF64 X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.54 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.220.54 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Jun Nie , linux@arm.linux.org.uk, zte-lt@lists.linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: jun.nie@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Use the UART0 peripheral for low level debug. Only the UART port 0 is currently supported. Signed-off-by: Jun Nie --- arch/arm/Kconfig.debug | 14 ++++++++++++++ arch/arm/include/debug/pl01x.S | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 0c12ffb..b637563 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1157,6 +1157,18 @@ choice For more details about semihosting, please see chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd. + config DEBUG_ZTE_ZX + bool "Use ZTE ZX UART" + select DEBUG_UART_PL01X + depends on ARCH_ZX + help + Say Y here if you are enabling ZTE ZX296702 SOC and need + debug uart support. + + This option is preferred over the platform specific + options; the platform specific options are deprecated + and will be soon removed. + config DEBUG_LL_UART_8250 bool "Kernel low-level debugging via 8250 UART" help @@ -1337,6 +1349,7 @@ config DEBUG_UART_PHYS default 0x02531000 if DEBUG_KEYSTONE_UART1 default 0x03010fe0 if ARCH_RPC default 0x07000000 if DEBUG_SUN9I_UART0 + default 0x09405000 if DEBUG_ZTE_ZX default 0x10009000 if DEBUG_REALVIEW_STD_PORT || \ DEBUG_VEXPRESS_UART0_CA9 default 0x1010c000 if DEBUG_REALVIEW_PB1176_PORT @@ -1466,6 +1479,7 @@ config DEBUG_UART_VIRT default 0xfb009000 if DEBUG_REALVIEW_STD_PORT default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT default 0xfc40ab00 if DEBUG_BRCMSTB_UART + default 0xfc705000 if DEBUG_ZTE_ZX default 0xfcfe8600 if DEBUG_UART_BCM63XX default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX default 0xfd000000 if ARCH_SPEAR13XX diff --git a/arch/arm/include/debug/pl01x.S b/arch/arm/include/debug/pl01x.S index 92ef808..f7d8323 100644 --- a/arch/arm/include/debug/pl01x.S +++ b/arch/arm/include/debug/pl01x.S @@ -12,6 +12,13 @@ */ #include +#ifdef CONFIG_DEBUG_ZTE_ZX +#undef UART01x_DR +#undef UART01x_FR +#define UART01x_DR 0x04 +#define UART01x_FR 0x14 +#endif + #ifdef CONFIG_DEBUG_UART_PHYS .macro addruart, rp, rv, tmp ldr \rp, =CONFIG_DEBUG_UART_PHYS