From patchwork Tue Oct 27 12:57:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= X-Patchwork-Id: 7496921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A41259F37F for ; Tue, 27 Oct 2015 13:00:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C755B206FB for ; Tue, 27 Oct 2015 13:00:37 +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 DDEA6206F4 for ; Tue, 27 Oct 2015 13:00:35 +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 1Zr3pp-0004lp-CL; Tue, 27 Oct 2015 12:58:41 +0000 Received: from unicorn.mansr.com ([2001:8b0:ca0d:8d8e::2]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zr3pl-0004ib-Rc for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2015 12:58:38 +0000 Received: by unicorn.mansr.com (Postfix, from userid 51770) id C457C1538A; Tue, 27 Oct 2015 12:58:07 +0000 (GMT) From: Mans Rullgard To: Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RESEND][PATCH] ARM: debug: add support for Palmchip 16550-like UART Date: Tue, 27 Oct 2015 12:57:57 +0000 Message-Id: <1445950678-16097-1-git-send-email-mans@mansr.com> X-Mailer: git-send-email 2.6.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151027_055838_075865_3CDC011D X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. 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: , 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 Some SoCs have a Palmchip UART with a non-standard register layout. This allows the debug console to work with these. Signed-off-by: Mans Rullgard --- arch/arm/Kconfig.debug | 8 ++++++++ arch/arm/include/debug/8250.S | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 0cfd7f9..9039fff 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug @@ -1597,6 +1597,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 variant" + 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/8250.S b/arch/arm/include/debug/8250.S index 7f7446f..2332f40 100644 --- a/arch/arm/include/debug/8250.S +++ b/arch/arm/include/debug/8250.S @@ -9,6 +9,18 @@ */ #include +#ifdef CONFIG_DEBUG_UART_8250_PALMCHIP + +#undef UART_TX +#undef UART_LSR +#undef UART_MSR + +#define UART_TX 1 +#define UART_LSR 7 +#define UART_MSR 8 + +#endif + .macro addruart, rp, rv, tmp ldr \rp, =CONFIG_DEBUG_UART_PHYS ldr \rv, =CONFIG_DEBUG_UART_VIRT