Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp677380ybh; Tue, 10 Mar 2020 06:19:06 -0700 (PDT) X-Google-Smtp-Source: ADFU+vursQ5xedJqvSf1Xr3o6Sovhb8y+45Qr4G0UT+j3qe7i61Z1YdikXU76r+eIw5f5ZK1FjWI X-Received: by 2002:a9d:5a09:: with SMTP id v9mr16282063oth.214.1583846345651; Tue, 10 Mar 2020 06:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583846345; cv=none; d=google.com; s=arc-20160816; b=iq8nVCnm3rGx63iylbwS1N67cjQH4k93GoofbXnYL+m4H9jld8Qgc2YyJSTI+uYjRd sJRRVqufJczJGqN86L4xVlBJQtbBNsgZdNIbvX/80/MebkeESFj+bM4vL+/CuMJpSvZi SYxMYde7d5DxChr5TjGDnpjvP2WV6eydfyB0KhLefmJw0l7SzE+FdXzWDG86Nf/afyA6 9GLMXc2m5a2/D0y4OYkPksUSlGxPb/BSMffS0NBu2mzkG1181pJsKRw8nSEHZni9bCmw GZvOYlJ6AMaVcZGlWG68peptoHjz5LrG8rLOcRKLEBCKRxJvpZuOiFFrzLeE++SAc/l2 xKEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Fjdxsem7D2a4v4CwsyrgAdOtL3tso4YxCDtkGtEdHDY=; b=WMaz1A2O9LLckvp0GdB53/LVof3z1l2tJfSjiFGexpohXA4vFyCJjlWCNyOBYybPPE eHbA1CR1tIfYOdTYiA6RIkK/Pd66c+pFTsnPQxbtXGgwugcGG6SDaYR7GDdOGxLyfl2f Tthb1mhafrPwvQExxapgygw5RzhwDUGyzwBXL3XxRBLBqcdZ1K/69M6Na4k4Lt2XtE8N xqWt/o08ZYPo5D0+YaklohZzXxDbwmlr2NKAQ1LyxIAVS7K+8JLEQFfb8iDqELOIeuxv XXvrG0UVEE2IV85uW2zNthx7rxBxuUn2gxzWpl/X2DRpJckBanwKSAcTL/aSCCCNw1/q gj8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tH34B4Oi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si4950149oix.239.2020.03.10.06.18.53; Tue, 10 Mar 2020 06:19:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tH34B4Oi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731539AbgCJNMR (ORCPT + 99 others); Tue, 10 Mar 2020 09:12:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:34368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731246AbgCJNMP (ORCPT ); Tue, 10 Mar 2020 09:12:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5456120409; Tue, 10 Mar 2020 13:12:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583845934; bh=YKfdWWef2XAP+GCkkOxxFSr7TtbFVlNDiZybrdw5O7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tH34B4OiG/i0HiatTSzNQfGwTmCbzhHDwmHQRPgz3Jg05V80sHVbyFsu2wIkO79OQ r8iuv03Q7ylex74RkQXhbQlRLgdsDmK9bFwwgcYyLkH1LArPCbF0Esfum/fLPyzx/o LI6nq0i+cj6AFxUh2VUtbRW9/lYOowTvq09CKraI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuanhong Guo , Daniel Golle , Sasha Levin Subject: [PATCH 4.19 08/86] serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE Date: Tue, 10 Mar 2020 13:44:32 +0100 Message-Id: <20200310124531.251694738@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310124530.808338541@linuxfoundation.org> References: <20200310124530.808338541@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Golle [ Upstream commit 87c5cbf71ecbb9e289d60a2df22eb686c70bf196 ] On AR934x this UART is usually not initialized by the bootloader as it is only used as a secondary serial port while the primary UART is a newly introduced NS16550-compatible. In order to make use of the ar933x-uart on AR934x without RTS/CTS hardware flow control, one needs to set the UART_CS_{RX,TX}_READY_ORIDE bits as other than on AR933x where this UART is used as primary/console, the bootloader on AR934x typically doesn't set those bits. Setting them explicitely on AR933x should not do any harm, so just set them unconditionally. Tested-by: Chuanhong Guo Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/20200207095335.GA179836@makrotopia.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/ar933x_uart.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/tty/serial/ar933x_uart.c b/drivers/tty/serial/ar933x_uart.c index 3bdd56a1021b2..ea12f10610b64 100644 --- a/drivers/tty/serial/ar933x_uart.c +++ b/drivers/tty/serial/ar933x_uart.c @@ -286,6 +286,10 @@ static void ar933x_uart_set_termios(struct uart_port *port, ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, AR933X_UART_CS_HOST_INT_EN); + /* enable RX and TX ready overide */ + ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, + AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); + /* reenable the UART */ ar933x_uart_rmw(up, AR933X_UART_CS_REG, AR933X_UART_CS_IF_MODE_M << AR933X_UART_CS_IF_MODE_S, @@ -418,6 +422,10 @@ static int ar933x_uart_startup(struct uart_port *port) ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, AR933X_UART_CS_HOST_INT_EN); + /* enable RX and TX ready overide */ + ar933x_uart_rmw_set(up, AR933X_UART_CS_REG, + AR933X_UART_CS_TX_READY_ORIDE | AR933X_UART_CS_RX_READY_ORIDE); + /* Enable RX interrupts */ up->ier = AR933X_UART_INT_RX_VALID; ar933x_uart_write(up, AR933X_UART_INT_EN_REG, up->ier); -- 2.20.1