From patchwork Thu Nov 15 22:46:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 1752171 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 91B863FC8A for ; Thu, 15 Nov 2012 22:50:10 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TZ8EJ-0006EL-22; Thu, 15 Nov 2012 22:48:15 +0000 Received: from mail.free-electrons.com ([88.190.12.23]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TZ8DA-0005kf-Mj for linux-arm-kernel@lists.infradead.org; Thu, 15 Nov 2012 22:47:06 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 7D912180; Thu, 15 Nov 2012 23:46:59 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham version=3.3.1 Received: from localhost (gar31-2-82-226-185-134.fbx.proxad.net [82.226.185.134]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4DD2A17D; Thu, 15 Nov 2012 23:46:43 +0100 (CET) From: Maxime Ripard To: Arnd Bergmann , Olof Johansson Subject: [PATCH 4/6] ARM: sunxi: Add earlyprintk support Date: Thu, 15 Nov 2012 23:46:23 +0100 Message-Id: <1353019586-21043-5-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1353019586-21043-1-git-send-email-maxime.ripard@free-electrons.com> References: <1353019586-21043-1-git-send-email-maxime.ripard@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121115_174704_964431_8F2044EC X-CRM114-Status: GOOD ( 14.07 ) 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.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-kernel@lists.infradead.org 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 Signed-off-by: Maxime Ripard Acked-by: Stefan Roese --- arch/arm/Kconfig.debug | 8 ++++++++ arch/arm/include/debug/sunxi.S | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 arch/arm/include/debug/sunxi.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index b0f3857..6672b02 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -345,6 +345,13 @@ choice Say Y here if you want kernel low-level debugging support on SOCFPGA based platforms. + config DEBUG_SUNXI_UART + bool "Kernel low-level debugging messages via sunXi UART" + depends on ARCH_SUNXI + help + Say Y here if you want kernel low-level debugging support + on Allwinner A1X based platforms. + config DEBUG_VEXPRESS_UART0_DETECT bool "Autodetect UART0 on Versatile Express Cortex-A core tiles" depends on ARCH_VEXPRESS && CPU_CP15_MMU @@ -416,6 +423,7 @@ config DEBUG_LL_INCLUDE default "debug/mvebu.S" if DEBUG_MVEBU_UART default "debug/picoxcell.S" if DEBUG_PICOXCELL_UART default "debug/socfpga.S" if DEBUG_SOCFPGA_UART + default "debug/sunxi.S" if DEBUG_SUNXI_UART default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 default "mach/debug-macro.S" diff --git a/arch/arm/include/debug/sunxi.S b/arch/arm/include/debug/sunxi.S new file mode 100644 index 0000000..ffd101f --- /dev/null +++ b/arch/arm/include/debug/sunxi.S @@ -0,0 +1,22 @@ +/* + * Early serial output macro for Allwinner A1X SoCs + * + * Copyright (C) 2012 Maxime Ripard + * + * Maxime Ripard + * + * 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. +*/ + +#define SUNXI_UART1_PHYS_BASE 0x01c28400 +#define SUNXI_UART1_VIRT_BASE 0xf1c28400 + + .macro addruart, rp, rv, tmp + ldr \rp, =SUNXI_UART1_PHYS_BASE + ldr \rv, =SUNXI_UART1_VIRT_BASE + .endm + +#define UART_SHIFT 2 +#include