From nobody Fri Jun 19 01:10:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87A52C433F5 for ; Mon, 11 Apr 2022 10:45:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345704AbiDKKrj (ORCPT ); Mon, 11 Apr 2022 06:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345684AbiDKKrZ (ORCPT ); Mon, 11 Apr 2022 06:47:25 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2734E12AF9; Mon, 11 Apr 2022 03:45:12 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id DC90B215FD; Mon, 11 Apr 2022 10:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649673910; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3UaJrwZ35b5PfLiZGtmO7k6+jGdgy3u8eolCyPOX7Bk=; b=WAn0BHpI1gjrWAB2lZTv6/O863lJPaj+fkkxp9elG+Y23v1HIpKZkN39HG4HC5YyUIq+x/ 5oZkQJ1pheh0Cyo/6dub+XCm+DB5ayJ0ukYDaMujhVQx2Ds1+He5rMDGreZkwRWuN5Jfj1 d4v9Zp8IgppQQ0kF0vMpHEEOeIjNxis= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649673910; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3UaJrwZ35b5PfLiZGtmO7k6+jGdgy3u8eolCyPOX7Bk=; b=V8KzJC8CDfB1m4EVRw7Zzz+GDlgn2EueI8gPP6kCEUDh6GmZcZrUqLNZUejFmaSJ6CLH5B 4x7OHYwFBFpAh6CQ== Received: from localhost.localdomain (unknown [10.100.208.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A985DA3B89; Mon, 11 Apr 2022 10:45:10 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH 1/3] tty: serial: mpc52xx_uart: remove double ifdeffery Date: Mon, 11 Apr 2022 12:45:04 +0200 Message-Id: <20220411104506.8990-2-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411104506.8990-1-jslaby@suse.cz> References: <20220411104506.8990-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The code now contains: #ifdef CONFIG_PPC_MPC512x ... #endif #ifdef CONFIG_PPC_MPC512x ... #endif So remove the endif+ifdef from the middle, provided it's about the same define. Signed-off-by: Jiri Slaby --- drivers/tty/serial/mpc52xx_uart.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx= _uart.c index 3acc0f185762..c4b590dd6f23 100644 --- a/drivers/tty/serial/mpc52xx_uart.c +++ b/drivers/tty/serial/mpc52xx_uart.c @@ -754,9 +754,6 @@ static void mpc512x_psc_get_irq(struct uart_port *port,= struct device_node *np) port->irqflags =3D IRQF_SHARED; port->irq =3D psc_fifoc_irq; } -#endif - -#ifdef CONFIG_PPC_MPC512x =20 #define PSC_5125(port) ((struct mpc5125_psc __iomem *)((port)->membase)) #define FIFO_5125(port) ((struct mpc512x_psc_fifo __iomem *)(PSC_5125(port= )+1)) --=20 2.35.1 From nobody Fri Jun 19 01:10:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 646A9C433F5 for ; Mon, 11 Apr 2022 10:45:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345711AbiDKKrr (ORCPT ); Mon, 11 Apr 2022 06:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345691AbiDKKr1 (ORCPT ); Mon, 11 Apr 2022 06:47:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D396713CC0; Mon, 11 Apr 2022 03:45:12 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 3AE7C1F7AC; Mon, 11 Apr 2022 10:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649673911; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J3RMh1ta9pkL0HZrKYbi40EKlPk0T3CptWqGzuRzVL4=; b=V3vIkbMwYXRnyG7bQhw5MRr6dqI32sTJgXVeynKRwA6tVloBKZAf3oWnanHw0bDJ4BlgAF /XLxgirNx+fAvAPRGbU3abNLRH4hNQd8WnsXrBmOOWRV0MbWGCmq/k0eX2drG4ybce+yVk OuvAO9jv/Qv1C1vM6RX2WzjRjE6mc5Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649673911; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J3RMh1ta9pkL0HZrKYbi40EKlPk0T3CptWqGzuRzVL4=; b=295d77y1YRFTeS1bcObwziNPOrrhs9BWLpoAMHTe7b//+4PAneLe5E4FlDk8xOt1DHWck7 FvlvKGioNyYBimAQ== Received: from localhost.localdomain (unknown [10.100.208.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id EEA70A3B93; Mon, 11 Apr 2022 10:45:10 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Manivannan Sadhasivam Subject: [PATCH 2/3] tty: serial: owl-uart, send x_char even if stopped Date: Mon, 11 Apr 2022 12:45:05 +0200 Message-Id: <20220411104506.8990-3-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411104506.8990-1-jslaby@suse.cz> References: <20220411104506.8990-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Flow control characters should be sent even if the TX is stopped. So fix owl-uart to behave the same as other drivers. This unification also allows the use of the TX helper in the future. Cc: "Andreas F=C3=A4rber" Cc: Manivannan Sadhasivam Signed-off-by: Jiri Slaby --- drivers/tty/serial/owl-uart.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl-uart.c index 5250bd7d390a..5ff7c89aeb06 100644 --- a/drivers/tty/serial/owl-uart.c +++ b/drivers/tty/serial/owl-uart.c @@ -184,9 +184,6 @@ static void owl_uart_send_chars(struct uart_port *port) struct circ_buf *xmit =3D &port->state->xmit; unsigned int ch; =20 - if (uart_tx_stopped(port)) - return; - if (port->x_char) { while (!(owl_uart_read(port, OWL_UART_STAT) & OWL_UART_STAT_TFFU)) cpu_relax(); @@ -195,6 +192,9 @@ static void owl_uart_send_chars(struct uart_port *port) port->x_char =3D 0; } =20 + if (uart_tx_stopped(port)) + return; + while (!(owl_uart_read(port, OWL_UART_STAT) & OWL_UART_STAT_TFFU)) { if (uart_circ_empty(xmit)) break; --=20 2.35.1 From nobody Fri Jun 19 01:10:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3383C433EF for ; Mon, 11 Apr 2022 10:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345712AbiDKKrn (ORCPT ); Mon, 11 Apr 2022 06:47:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345690AbiDKKr1 (ORCPT ); Mon, 11 Apr 2022 06:47:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3A9413CC3; Mon, 11 Apr 2022 03:45:12 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 8CA3C1F864; Mon, 11 Apr 2022 10:45:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1649673911; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zGE3QD6z+mw6oVDHzRqdqpWGIUM4LnUnXOrLoFmEk7o=; b=Lh+SCQtDUeJKJSpxBy4Gy/KSBUKznVcw3tchP02SlruZA+o5DZ9lRCfwPuazcOFWAnt044 oQLlePmyhB4oXPXmCfbgdiluWhNmXtNz8QxvesMqV8lN6d/8ORX+6qZrzKEevGja8EPelm SUDQr16mUnEgrGFcuxrCimDf6IDwQqo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1649673911; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zGE3QD6z+mw6oVDHzRqdqpWGIUM4LnUnXOrLoFmEk7o=; b=OvMO7talElJztTKB6xkPxpPfl0t2e4YQ1Nxe9LQ/McMpE2MooOn4yjh+KX04NU01P7lK+Z MhYyC5HN/8RIGjAg== Received: from localhost.localdomain (unknown [10.100.208.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 4EE0BA3B96; Mon, 11 Apr 2022 10:45:11 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Tobias Klauser Subject: [PATCH 3/3] tty: serial: altera: use altera_jtaguart_stop_tx() Date: Mon, 11 Apr 2022 12:45:06 +0200 Message-Id: <20220411104506.8990-4-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411104506.8990-1-jslaby@suse.cz> References: <20220411104506.8990-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" altera_jtaguart_tx_chars() duplicates what altera_jtaguart_stop_tx() already does. So instead of the duplication, call the helper instead. Not only it makes the code cleaner, but it also says what the "if" really does. Cc: Tobias Klauser Signed-off-by: Jiri Slaby Acked-by: Tobias Klauser --- drivers/tty/serial/altera_jtaguart.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/alte= ra_jtaguart.c index 1c16345d0a1f..cb791c5149a3 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c @@ -168,10 +168,8 @@ static void altera_jtaguart_tx_chars(struct altera_jta= guart *pp) } } =20 - if (pending =3D=3D 0) { - pp->imr &=3D ~ALTERA_JTAGUART_CONTROL_WE_MSK; - writel(pp->imr, port->membase + ALTERA_JTAGUART_CONTROL_REG); - } + if (pending =3D=3D 0) + altera_jtaguart_stop_tx(port); } =20 static irqreturn_t altera_jtaguart_interrupt(int irq, void *data) --=20 2.35.1