From patchwork Thu Jul 25 22:42:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 2833713 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 821B2C0319 for ; Thu, 25 Jul 2013 22:44:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A41CB2040E for ; Thu, 25 Jul 2013 22:43:59 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 375DB203FB for ; Thu, 25 Jul 2013 22:43:58 +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 1V2UGH-0005gZ-V3; Thu, 25 Jul 2013 22:43:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2UGF-0008Ip-Ms; Thu, 25 Jul 2013 22:43:51 +0000 Received: from hauke-2-pt.tunnel.tserv6.fra1.ipv6.he.net ([2001:470:1f0a:465::2] helo=hauke-m.de) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2UGB-0008Gy-3g for linux-arm-kernel@lists.infradead.org; Thu, 25 Jul 2013 22:43:48 +0000 Received: from localhost (localhost [127.0.0.1]) by hauke-m.de (Postfix) with ESMTP id D9F9B8F61; Fri, 26 Jul 2013 00:43:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hauke-m.de Received: from hauke-m.de ([127.0.0.1]) by localhost (hauke-m.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hGk8Oe9AntMB; Fri, 26 Jul 2013 00:43:26 +0200 (CEST) Received: from hauke-desktop.lan (spit-414.wohnheim.uni-bremen.de [134.102.133.158]) by hauke-m.de (Postfix) with ESMTPSA id E31078F62; Fri, 26 Jul 2013 00:43:18 +0200 (CEST) From: Hauke Mehrtens To: arnd@arndb.de Subject: [PATCH v3 2/3] ARM: BCM5301X: add early debugging support Date: Fri, 26 Jul 2013 00:42:14 +0200 Message-Id: <1374792135-30343-3-git-send-email-hauke@hauke-m.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1374792135-30343-1-git-send-email-hauke@hauke-m.de> References: <1374792135-30343-1-git-send-email-hauke@hauke-m.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130725_184347_611628_C2ADC83B X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: thomas.petazzoni@free-electrons.com, f.fainelli@gmail.com, csd@broadcom.com, Hauke Mehrtens , cavokz@gmail.com, matt.porter@linaro.org, linux-arm-kernel@lists.infradead.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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds support for early debugging of BCM5301X SoC. Signed-off-by: Hauke Mehrtens --- arch/arm/Kconfig.debug | 5 +++++ arch/arm/include/debug/bcm5301x.S | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 arch/arm/include/debug/bcm5301x.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index e401a76..3a3c8fc 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -93,6 +93,10 @@ choice bool "Kernel low-level debugging on BCM2835 PL011 UART" depends on ARCH_BCM2835 + config DEBUG_BCM5301X + bool "Kernel low-level debugging on BCM5301X UART1" + depends on ARCH_BCM5301X + config DEBUG_CLPS711X_UART1 bool "Kernel low-level debugging messages via UART1" depends on ARCH_CLPS711X @@ -762,6 +766,7 @@ endchoice config DEBUG_LL_INCLUDE string default "debug/bcm2835.S" if DEBUG_BCM2835 + default "debug/bcm5301x.S" if DEBUG_BCM5301X default "debug/cns3xxx.S" if DEBUG_CNS3XXX default "debug/exynos.S" if DEBUG_EXYNOS_UART default "debug/highbank.S" if DEBUG_HIGHBANK_UART diff --git a/arch/arm/include/debug/bcm5301x.S b/arch/arm/include/debug/bcm5301x.S new file mode 100644 index 0000000..be16945 --- /dev/null +++ b/arch/arm/include/debug/bcm5301x.S @@ -0,0 +1,19 @@ +/* + * Macros used for EARLY_PRINTK, in low-level UART debug console + * + * Copyright 2013 Hauke Mehrtens + * + * Licensed under the GNU/GPL. See COPYING for details. + */ + +#define BCM5301X_UART1_PHYS 0x18000300 +#define BCM5301X_UART1_VIRT 0xf1000300 +#define BCM5301X_UART1_SH 0 + + .macro addruart, rp, rv, tmp + ldr \rp, =BCM5301X_UART1_PHYS @ MMU off, Physical + ldr \rv, =BCM5301X_UART1_VIRT @ MMU on, Virtual + .endm + +#define UART_SHIFT BCM5301X_UART1_SH +#include