From patchwork Fri Aug 10 15:52:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 1306121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 3251E3FC66 for ; Fri, 10 Aug 2012 15:54:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SzrVE-0000Yv-JS; Fri, 10 Aug 2012 15:51:56 +0000 Received: from mail-gh0-f177.google.com ([209.85.160.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SzrVA-0000Y2-Cz for linux-arm-kernel@lists.infradead.org; Fri, 10 Aug 2012 15:51:52 +0000 Received: by ghbf20 with SMTP id f20so1826769ghb.36 for ; Fri, 10 Aug 2012 08:51:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=9QKWMzmonixj3coC7f0adzmjJl20SB01GWp+a8f4hCI=; b=l5ujwOYReuPcVIfvjG/JDI+60SEQmhe25H4v5d3RHOSFiOkJjwfm7vpCbmIKsQyDd0 CjojApdDaYGtjvBmHREh5txpNKweVbZEeveH0TenOgXxnXqj0YZ7iDrP4+v/DBF6tmmJ GXl9KkUR4gRkeu+C85KDUabLZfDjvUebYFnbDzZVBFm/EzEvpJBccbArF97+nr23dpKR XJsLLSujdE2IHg14LN/+6uwLFQ2Y81R9LMfn/GxnxkRImCh5uZC2d36vDLq0285vwE1u NB90Iahe7d5dLWS6wPXgps99Rxxa2hFnxjKDanLNGjlNTNUbCVpEjsj19RuOXuLp2WlQ uztw== Received: by 10.66.76.170 with SMTP id l10mr224879paw.57.1344613910594; Fri, 10 Aug 2012 08:51:50 -0700 (PDT) Received: from localhost ([221.239.195.16]) by mx.google.com with ESMTPS id rs4sm3560224pbc.0.2012.08.10.08.51.46 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Aug 2012 08:51:49 -0700 (PDT) From: Haojian Zhuang To: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, rmk@arm.linux.org.uk, eric.y.miao@gmail.com Subject: [PATCH] ARM: mmp: implement DEBUG_LL port choice Date: Fri, 10 Aug 2012 23:52:07 +0800 Message-Id: <1344613927-8238-1-git-send-email-haojian.zhuang@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (haojian.zhuang[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Haojian Zhuang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DEBUG_LL port must be choiced in arch-mmp. DEBUG_LL port should be UART2 in TTC DKB. And it should be UART3 in brownstone. Signed-off-by: Haojian Zhuang --- arch/arm/Kconfig.debug | 14 ++++++++++++++ arch/arm/mach-mmp/include/mach/debug-macro.S | 12 ++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index f15f82b..0919191 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -224,6 +224,20 @@ choice Say Y here if you want kernel low-level debugging support on i.MX6Q UART4. + config DEBUG_MMP_UART2 + bool "Kernel low-level debugging message via MMP UART2" + depends on ARCH_MMP + help + Say Y here if you want kernel low-level debugging support + on MMP UART2. + + config DEBUG_MMP_UART3 + bool "Kernel low-level debugging message via MMP UART3" + depends on ARCH_MMP + help + Say Y here if you want kernel low-level debugging support + on MMP UART3. + config DEBUG_MSM_UART1 bool "Kernel low-level debugging messages via MSM UART1" depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 diff --git a/arch/arm/mach-mmp/include/mach/debug-macro.S b/arch/arm/mach-mmp/include/mach/debug-macro.S index b6f14d2..5c3cc29 100644 --- a/arch/arm/mach-mmp/include/mach/debug-macro.S +++ b/arch/arm/mach-mmp/include/mach/debug-macro.S @@ -9,13 +9,21 @@ * published by the Free Software Foundation. */ +#if defined(CONFIG_DEBUG_MMP_UART2) +#define MMP_UART_OFFSET 0x00017000 +#elif defined(CONFIG_DEBUG_MMP_UART3) +#define MMP_UART_OFFSET 0x00018000 +#else +#error "Select uart for DEBUG_LL" +#endif + #include .macro addruart, rp, rv, tmp ldr \rp, =APB_PHYS_BASE @ physical ldr \rv, =APB_VIRT_BASE @ virtual - orr \rp, \rp, #0x00017000 - orr \rv, \rv, #0x00017000 + orr \rp, \rp, #MMP_UART_OFFSET + orr \rv, \rv, #MMP_UART_OFFSET .endm #define UART_SHIFT 2