Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3989766iog; Tue, 28 Jun 2022 06:59:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1veWw3SiwnC+k7oRFMLrQW0XNuDUl/cNT6pwANPQaSLN8bO6NhkXtesqt9pFgec8xJuHykx X-Received: by 2002:a17:90b:1d84:b0:1ed:5918:74e3 with SMTP id pf4-20020a17090b1d8400b001ed591874e3mr15512155pjb.173.1656424741350; Tue, 28 Jun 2022 06:59:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656424741; cv=none; d=google.com; s=arc-20160816; b=yhRQRdTAUpMOUs5MMdt4BLtTx8MLy2T6rvOilAs769xBmwRQK+TBb7w/aXAvm29d4S Oa77uVStlF0mgfxJ1LaTxU3Iffvs2LoQgLZyNYi98Zu6NcvYqBKc3acodOQr/8rd8Az5 Tkp87gL1A7JqwPVSEjMypfE5PY64W00bg7L2PWFBDKK7CN3sj2b1Ic4rwSuHqwgZgFlJ psNWkHlftZu7vDgIaZ3IUHYhcI0Pnhfl13AzbAFp0Tho025YP6f4hFlsW7oiJvvLWM81 tVFZHIHfm+QzM2X7FQpYsouTLX5N3UD+4EjE0lLiVrRtlBa2Hp3ZJwkPfNTnCwNK6Xea PW5A== 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:to:from :dkim-signature; bh=QkGbkBcbQ4dmjvLe6zZrqtbmh8zVXvUaiQe8EzssY2M=; b=n7TUGIT8cRFgbl8cksXNYGGx19tJa0fbQCmexgz3W1tI4I4hvCY/kxpclJRSGbzr1C yNs+mlG67YSon+Ovu8hcXcTXB9VM0aAATKBE06J/MTT3P3rrr4r1Re3dUCbBNKACU9uV HKCZXgYDBW4MuZTCv3cT95zU4KuulZgXCK+cV7tsPzFueTYjrEs7MbRQ0zgM4vDRDyIp vqa0hniSatYiQzRSXfIkI+PNw5KKg4lsRqrO40H8n3RTTgSJ67Q7D3GS5r5egGQRhRus AtZ+JP8jjS1QUHGUxd788RRShl3BEAOTHpBWYw4FyhMujmQPzetwEcIK6SOT6uyuo12e sEgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hzc6XVIR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020a63e512000000b003fe3b8c6ff1si18569286pgh.154.2022.06.28.06.58.46; Tue, 28 Jun 2022 06:59:01 -0700 (PDT) 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=@intel.com header.s=Intel header.b=hzc6XVIR; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346819AbiF1Nmv (ORCPT + 99 others); Tue, 28 Jun 2022 09:42:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346761AbiF1Nmu (ORCPT ); Tue, 28 Jun 2022 09:42:50 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE13827CD0; Tue, 28 Jun 2022 06:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656423768; x=1687959768; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=50gRAoZGM9NF7c6C4HXrCkF3YdGjg4EaBCk9JFs1D5Y=; b=hzc6XVIRkLT5CoaZMDxKoWL2bskRBmYwJUStbeMRDjVd4zkQbNV2981j AOI8dDc04/Jtk0eHjufI1oqrjAFDkhog/3uDsVZa1Wx3FckESn7/2IDc1 +P7o2T2Q+413oOattK6iMQRwvnxgw65lF1zbu+GwfB47aoyBia3pooTFD vUM3Seu4hpZKZNtUYKJUlC5H1ar72gcbvqSrk+gwmJvQsSf3VlRRV17mi WS7vGaQlnrIyGdDy8s6u0Pl7qVFqGfwhcHb3wwJEd4kKiQ+79m3eYyi18 OrjLlWM1lh8ltify0mI+QgniniDgsqFpcG6XcuK6S7gbkA2bRC907hLD8 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10391"; a="281780633" X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="281780633" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 06:42:48 -0700 X-IronPort-AV: E=Sophos;i="5.92,227,1650956400"; d="scan'208";a="646918016" Received: from iannetti-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.251.216.215]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 06:42:46 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Andy Shevchenko , linux-kernel@vger.kernel.org Subject: [PATCH 1/4] serial: 8250_dw: Use dw8250_serial_out() in dw8250_serial_out38x() Date: Tue, 28 Jun 2022 16:42:31 +0300 Message-Id: <20220628134234.53771-2-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220628134234.53771-1-ilpo.jarvinen@linux.intel.com> References: <20220628134234.53771-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,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 Place dw8250_serial_out() before dw8250_serial_out38x() so that it can be called from dw8250_serial_out38x() to do the actual write. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/8250/8250_dw.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 167a691c7b19..41bf063396e4 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -143,29 +143,23 @@ static void dw8250_tx_wait_empty(struct uart_port *p) } } -static void dw8250_serial_out38x(struct uart_port *p, int offset, int value) +static void dw8250_serial_out(struct uart_port *p, int offset, int value) { struct dw8250_data *d = to_dw8250_data(p->private_data); - /* Allow the TX to drain before we reconfigure */ - if (offset == UART_LCR) - dw8250_tx_wait_empty(p); - writeb(value, p->membase + (offset << p->regshift)); if (offset == UART_LCR && !d->uart_16550_compatible) dw8250_check_lcr(p, value); } - -static void dw8250_serial_out(struct uart_port *p, int offset, int value) +static void dw8250_serial_out38x(struct uart_port *p, int offset, int value) { - struct dw8250_data *d = to_dw8250_data(p->private_data); - - writeb(value, p->membase + (offset << p->regshift)); + /* Allow the TX to drain before we reconfigure */ + if (offset == UART_LCR) + dw8250_tx_wait_empty(p); - if (offset == UART_LCR && !d->uart_16550_compatible) - dw8250_check_lcr(p, value); + dw8250_serial_out(p, offset, value); } static unsigned int dw8250_serial_in(struct uart_port *p, int offset) -- 2.30.2