From patchwork Tue Sep 17 21:59:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Daudt X-Patchwork-Id: 2904001 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 148C3BFF05 for ; Tue, 17 Sep 2013 22:00:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01F5A20109 for ; Tue, 17 Sep 2013 22:00:40 +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 8ED0320256 for ; Tue, 17 Sep 2013 22:00:38 +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 1VM3Jz-0007E3-Ne; Tue, 17 Sep 2013 22:00: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 1VM3Jx-0001TC-K1; Tue, 17 Sep 2013 22:00:33 +0000 Received: from mms1.broadcom.com ([216.31.210.17]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VM3Jv-0001SL-BC for linux-arm-kernel@lists.infradead.org; Tue, 17 Sep 2013 22:00:31 +0000 Received: from [10.9.208.57] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Tue, 17 Sep 2013 14:55:56 -0700 X-Server-Uuid: 06151B78-6688-425E-9DE2-57CB27892261 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 17 Sep 2013 14:59:54 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.1.438.0; Tue, 17 Sep 2013 14:59:54 -0700 Received: from mothra.ric.broadcom.com (test-csd10.ric.broadcom.com [10.136.18.149]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id B75571A46; Tue, 17 Sep 2013 14:59:53 -0700 (PDT) From: "Christian Daudt" To: "Russell King" , "Olof Johansson" , "Stephen Warren" Subject: [PATCH] ARM: bcm: Add DEBUG_LL console support Date: Tue, 17 Sep 2013 14:59:47 -0700 Message-ID: <1379455187-5812-1-git-send-email-csd@broadcom.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-WSS-ID: 7E2610660UO8260549-01-01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130917_180031_560414_E135F374 X-CRM114-Status: GOOD ( 13.14 ) X-Spam-Score: -4.8 (----) Cc: Christian Daudt , Chris Ball , bcm@fixthebug.org, linux-kernel@vger.kernel.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: , 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.9 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 patch adds low level debug uart support to Broadcom mobile based SOCs. Signed-off-by: Christian Daudt Reviewed-by: James King diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 583f4a0..a69d62a 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -93,6 +93,16 @@ choice bool "Kernel low-level debugging on BCM2835 PL011 UART" depends on ARCH_BCM2835 + config DEBUG_BCM_KONA_UART + bool "Kernel low-level debugging messages via BCM KONA UART" + depends on ARCH_BCM + help + Say Y here if you want kernel low-level debugging support + on Broadcom SoC platforms. + This low level debug works for Broadcom + mobile SoCs in the Kona family of chips (e.g. bcm28155, + bcm11351, etc...) + config DEBUG_CLPS711X_UART1 bool "Kernel low-level debugging messages via UART1" depends on ARCH_CLPS711X @@ -761,6 +771,7 @@ endchoice config DEBUG_LL_INCLUDE string + default "debug/bcm_kona.S" if DEBUG_BCM_KONA_UART default "debug/bcm2835.S" if DEBUG_BCM2835 default "debug/cns3xxx.S" if DEBUG_CNS3XXX default "debug/exynos.S" if DEBUG_EXYNOS_UART diff --git a/arch/arm/configs/bcm_defconfig b/arch/arm/configs/bcm_defconfig index 65edf6d..ace92e4 100644 --- a/arch/arm/configs/bcm_defconfig +++ b/arch/arm/configs/bcm_defconfig @@ -30,6 +30,8 @@ CONFIG_ARCH_BCM=y CONFIG_ARM_THUMBEE=y CONFIG_ARM_ERRATA_743622=y CONFIG_PREEMPT=y +CONFIG_DEBUG_LL=y +CONFIG_DEBUG_BCM_KONA_UART=y CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set # CONFIG_COMPACTION is not set diff --git a/arch/arm/include/debug/bcm_kona.S b/arch/arm/include/debug/bcm_kona.S new file mode 100644 index 0000000..5e22032 --- /dev/null +++ b/arch/arm/include/debug/bcm_kona.S @@ -0,0 +1,20 @@ +/* + * 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. + * + * Modified by Broadcom for Kona chipsets + */ +#define UARTB_PHYS_BASE 0x3e000000 +#define UART_SHIFT 2 + + .macro addruart, rp, rv, tmp + mov \rp, #UARTB_PHYS_BASE @ physical base address of UART + mov \rv, #0x0e300000 @ virtual base address of UART + orr \rv, \rv, #0xf0000000 + .endm + +#include "8250_32.S"