From patchwork Sat Feb 4 21:39:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 9555769 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 18297602B7 for ; Sat, 4 Feb 2017 21:40:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0582C26AE3 for ; Sat, 4 Feb 2017 21:40:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB10E26E3E; Sat, 4 Feb 2017 21:40:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 12C6026AE3 for ; Sat, 4 Feb 2017 21:40:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ca848-0006Uj-I1; Sat, 04 Feb 2017 21:40:16 +0000 Received: from mail-out.m-online.net ([212.18.0.9]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ca843-0005IK-Sb for linux-arm-kernel@lists.infradead.org; Sat, 04 Feb 2017 21:40:14 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3vG6Zm6VBfz3hjm1; Sat, 4 Feb 2017 22:39:44 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3vG6Zm5VM8zvkJ9; Sat, 4 Feb 2017 22:39:44 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id w-VJ1esqjMeg; Sat, 4 Feb 2017 22:39:42 +0100 (CET) X-Auth-Info: 53YezPDDLou3lS04GLJ/CZiTSnqvjKN54w4vxCyWc2w= Received: from chi.lan (unknown [195.140.253.167]) by mail.mnet-online.de (Postfix) with ESMTPA; Sat, 4 Feb 2017 22:39:42 +0100 (CET) From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] serial: imx: Only enable UART DMA on i.MX6Q and i.MX53 Date: Sat, 4 Feb 2017 22:39:31 +0100 Message-Id: <20170204213931.3566-1-marex@denx.de> X-Mailer: git-send-email 2.10.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170204_134012_158642_B0261A44 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Shawn Guo , Kai Ruhnau , "# 4 . 9+" , Martyn Welch MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kai Ruhnau In 1c06bde6 with the introduction of DMA support for the i.MX53 platform, DMA was enabled for all platforms instead. On an i.MX6SX (which is a IMX21_UART), this breaks gpsd talking to an UART module with imx-uart 21f4000.serial: DMA transaction error. This patch makes sure, UART DMA is only activated for i.MX53 and i.MX6Q. Signed-off-by: Kai Ruhnau Reviewed-by: Marek Vasut Fixes: 1c06bde643d0 ("Allowing UART DMA to be configured on i.MX53") Cc: # 4.9+ Cc: Fabio Estevam Cc: Martyn Welch Cc: Shawn Guo --- drivers/tty/serial/imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index a70356d..8e2b5f2 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1269,7 +1269,8 @@ static int imx_startup(struct uart_port *port) writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); /* Can we enable the DMA support? */ - if (!uart_console(port) && !sport->dma_is_inited) + if ((is_imx6q_uart(sport) || is_imx53_uart(sport)) && + !uart_console(port) && !sport->dma_is_inited) imx_uart_dma_init(sport); spin_lock_irqsave(&sport->port.lock, flags);