From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1507C433DB for ; Tue, 29 Dec 2020 09:33:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2788208BA for ; Tue, 29 Dec 2020 09:33:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726160AbgL2JdO (ORCPT ); Tue, 29 Dec 2020 04:33:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:59546 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725866AbgL2JdN (ORCPT ); Tue, 29 Dec 2020 04:33:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B507207D1; Tue, 29 Dec 2020 09:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609234353; bh=LK3HmT4kNURptxv6F4CvJHafEmL+opWIk8yZiiYTdRk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0G1UczJxFCtepc9TqrliOlWah8cpnjjZTsIkUtonornNQuzIUFXDWEfarxzENSUdp C920NIoCfuAYyp562ID251qUGL+6EgSRZb7xShhx5Bwbz1GlNqF0nBYVdTHi93cVpq Qz4l6JjE8rPAwioDUhSS1+1XEOJUsYX5bR3p0oB4= Date: Tue, 29 Dec 2020 10:33:52 +0100 From: Greg KH To: zhangqiumiao1@huawei.com Cc: jirislaby@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tty: make pl011 serial port driver support 485 mode Message-ID: References: <1609232164-26271-1-git-send-email-zhangqiumiao1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1609232164-26271-1-git-send-email-zhangqiumiao1@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 29, 2020 at 04:56:04PM +0800, zhangqiumiao1@huawei.com wrote: > From: zhangqiumiao > > make pl011 serial port support 485 mode full duplex communication > > Signed-off-by: zhangqiumiao Can you please use your "real name" or one you sign documents with? > --- > drivers/tty/serial/amba-pl011.c | 38 +++++++++++++++++++++++++++++++++ > 1 file changed, 38 insertions(+) > > diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c > index c255476cce28..f6a7fe61e699 100644 > --- a/drivers/tty/serial/amba-pl011.c > +++ b/drivers/tty/serial/amba-pl011.c > @@ -44,6 +44,7 @@ > > #include "amba-pl011.h" > > +#define ISEMPTY 1 > #define UART_NR 14 > > #define SERIAL_AMBA_MAJOR 204 > @@ -1284,14 +1285,33 @@ static inline bool pl011_dma_rx_running(struct uart_amba_port *uap) > #define pl011_dma_flush_buffer NULL > #endif > > +static unsigned int pl011_tx_empty(struct uart_port *port); > + > static void pl011_stop_tx(struct uart_port *port) > { > + unsigned int cr; > + unsigned int result; > struct uart_amba_port *uap = > > uap->im &= ~UART011_TXIM; > pl011_write(uap->im, uap, REG_IMSC); > pl011_dma_tx_stop(uap); > + if (port->rs485.flags & SER_RS485_ENABLEED) { > + whiel(1) { You obviously never built this code :(