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: 16013 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D4AF8277CA for ; Wed, 10 Apr 2013 04:14:46 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id 11sf89024vbf.1 for ; Tue, 09 Apr 2013 21:14:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :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 :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=ouzdX6Z8+FQuNKmtic1bHCsBtvqqr3EiBgr6+V5aMnw=; b=QxpgwANaTaKgzODH0xttBR/vuoZ04+xxO6M/2DpBPhWRwavNOt+u3eLlxiuNVEsVzX vLPFeWYAONA5MvWyouLbu4QVho6b8BIStriFPuMqAufoIzwMOnTELxskppqEWGckRPfN B0mxu1v0q51aBTBhkx8lRwD2foOPhE9kODAKqXQqsG3Bx3HYLP3ujWaSjKx5FlYUGxkP 1va5mCNh/zj2O1VYTieBD14SZxPqylSAp2fKvuIttuUSGIbzhofC3U3EudE6sfZ/IWPN GfBAY0LtWWanNZrbDgAnHkim1pZQSG9KdAYEg/kYfZ5ZK6r7y3MbSlJxlBcQZzMqFsoE U0oQ== X-Received: by 10.224.18.132 with SMTP id w4mr583667qaa.1.1365567268252; Tue, 09 Apr 2013 21:14:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.107.103 with SMTP id hb7ls100783qeb.52.gmail; Tue, 09 Apr 2013 21:14:28 -0700 (PDT) X-Received: by 10.220.124.74 with SMTP id t10mr209131vcr.67.1365567268089; Tue, 09 Apr 2013 21:14:28 -0700 (PDT) Received: from mail-vb0-x22c.google.com (mail-vb0-x22c.google.com [2607:f8b0:400c:c02::22c]) by mx.google.com with ESMTPS id x3si23931651vdh.146.2013.04.09.21.14.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 21:14:28 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22c is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22c; Received: by mail-vb0-f44.google.com with SMTP id e12so35801vbg.31 for ; Tue, 09 Apr 2013 21:14:28 -0700 (PDT) X-Received: by 10.52.65.147 with SMTP id x19mr257591vds.27.1365567267814; Tue, 09 Apr 2013 21:14:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.85.136 with SMTP id h8csp90254vez; Tue, 9 Apr 2013 21:14:27 -0700 (PDT) X-Received: by 10.68.105.5 with SMTP id gi5mr467446pbb.180.1365567266656; Tue, 09 Apr 2013 21:14:26 -0700 (PDT) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by mx.google.com with ESMTPS id oy4si6494679pac.128.2013.04.09.21.14.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Apr 2013 21:14:26 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.42 is neither permitted nor denied by best guess record for domain of haojian.zhuang@linaro.org) client-ip=209.85.220.42; Received: by mail-pa0-f42.google.com with SMTP id kq13so83881pab.1 for ; Tue, 09 Apr 2013 21:14:26 -0700 (PDT) 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 Cc: patches@linaro.org, Haojian Zhuang 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: ALoCoQnl4uG2i7JwGrOcMuoL6PaDF2fywWMLDupK9dIVexWXDh3Ka1azutDCpsXe0xuG3C+8HKoO X-Original-Sender: haojian.zhuang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22c is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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