Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1517216pxm; Thu, 24 Feb 2022 04:54:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrm/b1qAJOdcyiQWdoN0YHRtvvSQKnCKvCoQ+SDf7vDkTm0wZ3dYHv5C/T+o+gvWYSKpoj X-Received: by 2002:a17:903:31cd:b0:14d:bb40:2a17 with SMTP id v13-20020a17090331cd00b0014dbb402a17mr2669948ple.1.1645707270806; Thu, 24 Feb 2022 04:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645707270; cv=none; d=google.com; s=arc-20160816; b=meFR6UF0BRv7usoiJnOEj5jnRclFB515ykHACw/tswSAdnkT1GWTSUZmxA/LFHJ5Ki js/2WM1lMqz8ufXqG3y297LeKTPyWB60h32V+9tc5Nm0xrZcfiWLjam7AGKcymsVjdEF lAtPLdnfpIri+xr6i6dglVRJpizQObJHWEI0q6bjDJnMho7t5oiPGFQ1/GyMvqX7D40l KFwtZdZuGJk5PyBJ9wcFswDqCz/dXA3Znh/17SaxnbAlPiaspwetSmo9ccaxCYQlCKfc TYjUG7dS/9rtzUtrUWLpQ2duZR/TaG+qpVs1ASpHuAFfllMg2b0IaWv2j/fZJ/Mr/O2D XK/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=xYvxaPxtmjrawievgZ8Raha0WUh7vamBwY35Qyu7N4c=; b=nyiF4K+2hi4ZO4J9YmlwIifzpCmOtHO4pRw+hrI/9i/cnlXz9dOmAHG/hWVwtutXlB za/AMNAwFtw6cMP6mg7BZYX9dDEGhQnJqzGGCngtu+Tbk3HJq0yJ8b4bhls9BfLOmF/V YXF5h8TAzaRIyK29GPeuMSSwSUMFYL6sNK+X0yAJGLmuN+mF0QaVNyO81xhr3XsQ3DAG 9wLDyVfkSQWlOU+ujx0h8EYKbvtADgt27DnUL0Mo3JYADEMqQcGcdVYlBTcQ8EdxPMnC OCp+gCIrUapfrK2uBbFe3oaHwQnqLKnfUSXeiKWvJKg5UcLQht+u1WPITI63EgBmlBdw 94AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=qSbXQL4u; dkim=neutral (no key) header.i=@suse.cz header.b=m+eKHrWZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6si2248957pgc.134.2022.02.24.04.54.15; Thu, 24 Feb 2022 04:54:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=qSbXQL4u; dkim=neutral (no key) header.i=@suse.cz header.b=m+eKHrWZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233897AbiBXLLU (ORCPT + 99 others); Thu, 24 Feb 2022 06:11:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233847AbiBXLLM (ORCPT ); Thu, 24 Feb 2022 06:11:12 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D5DE2905A8; Thu, 24 Feb 2022 03:10:31 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 4CE5B212B9; Thu, 24 Feb 2022 11:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645701030; 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=xYvxaPxtmjrawievgZ8Raha0WUh7vamBwY35Qyu7N4c=; b=qSbXQL4u2oexw2Z3Dp+u+fai3BkFB00Z7oBpzHmQe9y2qeMsTkrPWkaQzG0N+ezzghFQqz Vz88L7/28/d1aK2FgQexcVlGsAsEZR2ZqTM5/kda4mnAI9mW+CdbPAe6rPK/1J71ZKSa5F BT4HUfPVoEILlja6aAEJAnDHoQzJWu4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645701030; 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=xYvxaPxtmjrawievgZ8Raha0WUh7vamBwY35Qyu7N4c=; b=m+eKHrWZTWz4vtDIdXaXSxWEZSnznk+yiv0piNZ4Ty/N8l3dM2b6OskubXdvh4M99hhsmU YK1WEoz0BHRpZrAQ== 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 1D3EEA3B90; Thu, 24 Feb 2022 11:10:30 +0000 (UTC) From: Jiri Slaby To: gregkh@linuxfoundation.org Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Vladimir Zapolskiy , linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] tty: serial: lpc32xx_hs: use serial_lpc32xx_stop_tx() helper Date: Thu, 24 Feb 2022 12:10:28 +0100 Message-Id: <20220224111028.20917-6-jslaby@suse.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220224111028.20917-1-jslaby@suse.cz> References: <20220224111028.20917-1-jslaby@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Instead of open-coding what serial_lpc32xx_stop_tx() already does, call it in __serial_lpc32xx_tx() directly. Signed-off-by: Jiri Slaby Cc: Vladimir Zapolskiy Cc: linux-arm-kernel@lists.infradead.org --- drivers/tty/serial/lpc32xx_hs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c index b7b489c68c36..93140cac1ca1 100644 --- a/drivers/tty/serial/lpc32xx_hs.c +++ b/drivers/tty/serial/lpc32xx_hs.c @@ -276,10 +276,11 @@ static void __serial_lpc32xx_rx(struct uart_port *port) tty_flip_buffer_push(tport); } +static void serial_lpc32xx_stop_tx(struct uart_port *port); + static void __serial_lpc32xx_tx(struct uart_port *port) { struct circ_buf *xmit = &port->state->xmit; - unsigned int tmp; if (port->x_char) { writel((u32)port->x_char, LPC32XX_HSUART_FIFO(port->membase)); @@ -306,11 +307,8 @@ static void __serial_lpc32xx_tx(struct uart_port *port) uart_write_wakeup(port); exit_tx: - if (uart_circ_empty(xmit)) { - tmp = readl(LPC32XX_HSUART_CTRL(port->membase)); - tmp &= ~LPC32XX_HSU_TX_INT_EN; - writel(tmp, LPC32XX_HSUART_CTRL(port->membase)); - } + if (uart_circ_empty(xmit)) + serial_lpc32xx_stop_tx(port); } static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id) -- 2.35.1