From patchwork Wed Apr 10 04:14:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haojian Zhuang X-Patchwork-Id: 2419291 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 12FDA3FD8C for ; Wed, 10 Apr 2013 04:14:36 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPmQc-0006sr-VQ; Wed, 10 Apr 2013 04:14:35 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPmQa-0003Er-IN; Wed, 10 Apr 2013 04:14:32 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPmQW-0003EQ-JA for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2013 04:14:29 +0000 Received: by mail-pa0-f54.google.com with SMTP id fa11so82201pad.27 for ; Tue, 09 Apr 2013 21:14:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=ouzdX6Z8+FQuNKmtic1bHCsBtvqqr3EiBgr6+V5aMnw=; b=BCMzCOkk6KmPxTy1Q/dsWU0cnn9hatyU6wncJhdIxQQcnKCfUnybAypwQHZ6sVwHm6 Bm0w2M+5boXEkwig263PY2HoB+uifOR/UQh3b9k4R2aGGg60/lp8nBNRCKa4rNFh14+S em92pAezgt3jo4AaMmIW+eMt172OpGBnFPR6RlgvIYHNn14jlAfGa4x1R9cfDdSApHKs IBieCL8MxKdSLrHByKVMJRda/JTMsojrfYi00Q0Oi26gg0wKFdD7bZ+h/Iy1+0YOsOem lttSAbuZUXtLMZ+/kSSV/TG0Vr9VnCXXbM1jCLUFL4i7ux83gwHCEnS/EidqLNXzO4vN MnaQ== X-Received: by 10.68.211.161 with SMTP id nd1mr615121pbc.59.1365567266118; Tue, 09 Apr 2013 21:14:26 -0700 (PDT) Received: from localhost.localdomain ([27.115.121.38]) by mx.google.com with ESMTPS id fb7sm33714220pab.16.2013.04.09.21.14.20 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 21:14:25 -0700 (PDT) From: Haojian Zhuang To: eric.y.miao@gmail.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, arnd@arndb.de Subject: [PATCH] ARM: pxa: move debug uart code Date: Wed, 10 Apr 2013 12:14:03 +0800 Message-Id: <1365567243-17872-1-git-send-email-haojian.zhuang@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQmVoKnygeTwdRpElMBDKyMsbxw7rz/pcqvXRYlESjTigGQzrqIIbd2Ghk0/yJvVwp/SLGVy X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130410_001428_748326_4F56D79B X-CRM114-Status: GOOD ( 15.49 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 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] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Haojian Zhuang , patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Move debug uart code from mach-pxa/mach-mmp to debug directory. Since they are similar, merge them together. Signed-off-by: Haojian Zhuang Acked-by: Eric Miao --- arch/arm/Kconfig.debug | 9 +++++++ arch/arm/include/debug/pxa.S | 33 ++++++++++++++++++++++++++ arch/arm/mach-mmp/include/mach/debug-macro.S | 30 ----------------------- arch/arm/mach-pxa/include/mach/debug-macro.S | 23 ------------------ 4 files changed, 42 insertions(+), 53 deletions(-) create mode 100644 arch/arm/include/debug/pxa.S delete mode 100644 arch/arm/mach-mmp/include/mach/debug-macro.S delete mode 100644 arch/arm/mach-pxa/include/mach/debug-macro.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 2bf1973..2267ff7 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -330,6 +330,13 @@ choice Say Y here if you want kernel low-level debugging support on PicoXcell based platforms. + config DEBUG_PXA_UART1 + depends on ARCH_PXA + bool "Use PXA UAR0 for low-level debug" + help + Say Y here if you want kernel low-level debugging support + on PXA UART1. + config DEBUG_REALVIEW_STD_PORT bool "RealView Default UART" depends on ARCH_REALVIEW @@ -615,6 +622,8 @@ config DEBUG_LL_INCLUDE default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART + default "debug/pxa.S" if DEBUG_PXA_UART1 || DEBUG_MMP_UART2 || \ + DEBUG_MMP_UART3 default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 diff --git a/arch/arm/include/debug/pxa.S b/arch/arm/include/debug/pxa.S new file mode 100644 index 0000000..e1e795a --- /dev/null +++ b/arch/arm/include/debug/pxa.S @@ -0,0 +1,33 @@ +/* + * Early serial output macro for Marvell PXA/MMP SoC + * + * Copyright (C) 1994-1999 Russell King + * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks + * + * Copyright (C) 2013 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_PXA_UART1) +#define PXA_UART_REG_PHYS_BASE 0x40100000 +#define PXA_UART_REG_VIRT_BASE 0xf2100000 +#elif defined(CONFIG_DEBUG_MMP_UART2) +#define PXA_UART_REG_PHYS_BASE 0xd4017000 +#define PXA_UART_REG_VIRT_BASE 0xfe017000 +#elif defined(CONFIG_DEBUG_MMP_UART3) +#define PXA_UART_REG_PHYS_BASE 0xd4018000 +#define PXA_UART_REG_VIRT_BASE 0xfe018000 +#else +#error "Select uart for DEBUG_LL" +#endif + + .macro addruart, rp, rv, tmp + ldr \rp, =PXA_UART_REG_PHYS_BASE + ldr \rv, =PXA_UART_REG_VIRT_BASE + .endm + +#define UART_SHIFT 2 +#include diff --git a/arch/arm/mach-mmp/include/mach/debug-macro.S b/arch/arm/mach-mmp/include/mach/debug-macro.S deleted file mode 100644 index 5c3cc29..0000000 --- a/arch/arm/mach-mmp/include/mach/debug-macro.S +++ /dev/null @@ -1,30 +0,0 @@ -/* arch/arm/mach-mmp/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copied from arch/arm/mach-pxa/include/mach/debug.S - * - * 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_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, #MMP_UART_OFFSET - orr \rv, \rv, #MMP_UART_OFFSET - .endm - -#define UART_SHIFT 2 -#include diff --git a/arch/arm/mach-pxa/include/mach/debug-macro.S b/arch/arm/mach-pxa/include/mach/debug-macro.S deleted file mode 100644 index 70b112e..0000000 --- a/arch/arm/mach-pxa/include/mach/debug-macro.S +++ /dev/null @@ -1,23 +0,0 @@ -/* arch/arm/mach-pxa/include/mach/debug-macro.S - * - * Debugging macro include header - * - * Copyright (C) 1994-1999 Russell King - * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks - * - * 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. - * -*/ - -#include "hardware.h" - - .macro addruart, rp, rv, tmp - mov \rp, #0x00100000 - orr \rv, \rp, #io_p2v(0x40000000) @ virtual - orr \rp, \rp, #0x40000000 @ physical - .endm - -#define UART_SHIFT 2 -#include