From patchwork Mon Jan 18 08:27:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Gonzalez X-Patchwork-Id: 8053461 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 319A2BEEE5 for ; Mon, 18 Jan 2016 08:29:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 451C120221 for ; Mon, 18 Jan 2016 08:29:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 005542021B for ; Mon, 18 Jan 2016 08:29:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aL5Ah-0007KQ-DN; Mon, 18 Jan 2016 08:28:19 +0000 Received: from mail1.bemta12.messagelabs.com ([216.82.251.9]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aL5Ad-0007BQ-0C for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2016 08:28:16 +0000 Received: from [216.82.251.38] by server-9.bemta-12.messagelabs.com id E9/07-28900-602AC965; Mon, 18 Jan 2016 08:27:50 +0000 X-Env-Sender: Marc_Gonzalez@sigmadesigns.com X-Msg-Ref: server-3.tower-163.messagelabs.com!1453105669!21885570!1 X-Originating-IP: [195.215.56.170] X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 36923 invoked from network); 18 Jan 2016 08:27:50 -0000 Received: from 195-215-56-170-static.dk.customer.tdc.net (HELO CPH-EX1.SDESIGNS.COM) (195.215.56.170) by server-3.tower-163.messagelabs.com with AES128-SHA encrypted SMTP; 18 Jan 2016 08:27:50 -0000 Received: from [172.27.0.114] (172.27.0.114) by CPH-EX1.sdesigns.com (192.168.10.36) with Microsoft SMTP Server (TLS) id 14.1.339.1; Mon, 18 Jan 2016 09:27:48 +0100 To: arm-soc From: Marc Gonzalez Subject: [RESEND PATCH v2] ARM: debug: add support for Palmchip BK-310x UART Message-ID: <569CA203.6050001@sigmadesigns.com> Date: Mon, 18 Jan 2016 09:27:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 X-Originating-IP: [172.27.0.114] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160118_002815_204692_950FFCCD X-CRM114-Status: GOOD ( 17.04 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sebastian Frias , Mans Rullgard , linux-serial , Linux ARM , Peter Hurley 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 From: Mans Rullgard Some SoCs use a Palmchip BK-310x UART which is mostly 16550 compatible but with a different register layout. While this UART has previously only been supported in MIPS based chips (Alchemy, Ralink), the ARM based SMP87xx series from Sigma Designs also uses it. This patch allows the debug console to work with this type of UART. Signed-off-by: Mans Rullgard Signed-off-by: Marc Gonzalez Acked-by: Kevin Hilman --- Peter, this is the patch I've been using on Tango for earlyprintk support. arm-soc, this is just the Nov 8 patch with my Signed-off-by tag. --- arch/arm/Kconfig.debug | 9 +++++++++ arch/arm/include/debug/palmchip.S | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 arch/arm/include/debug/palmchip.S diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 259c0ca9c99a..708aa9150c00 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1304,6 +1304,7 @@ config DEBUG_SIRFSOC_UART config DEBUG_LL_INCLUDE string default "debug/sa1100.S" if DEBUG_SA1100 + default "debug/palmchip.S" if DEBUG_UART_8250_PALMCHIP default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 default "debug/at91.S" if DEBUG_AT91_UART default "debug/asm9260.S" if DEBUG_ASM9260_UART @@ -1588,6 +1589,14 @@ config DEBUG_UART_8250_WORD DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2 || \ DEBUG_BRCMSTB_UART +config DEBUG_UART_8250_PALMCHIP + bool "8250 UART is Palmchip BK-310x" + depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 + help + Palmchip provides a UART implementation compatible with 16550 + except for having a different register layout. Say Y here if + the debug UART is of this type. + config DEBUG_UART_8250_FLOW_CONTROL bool "Enable flow control for 8250 UART" depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250 diff --git a/arch/arm/include/debug/palmchip.S b/arch/arm/include/debug/palmchip.S new file mode 100644 index 000000000000..6824b2d1c38e --- /dev/null +++ b/arch/arm/include/debug/palmchip.S @@ -0,0 +1,11 @@ +#include + +#undef UART_TX +#undef UART_LSR +#undef UART_MSR + +#define UART_TX 1 +#define UART_LSR 7 +#define UART_MSR 8 + +#include