From patchwork Thu Nov 24 12:59:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 25526 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3391463wrr; Thu, 24 Nov 2022 05:17:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4F4yUAos20Ab/3xv7iBpwo2Pk0mAmXine4434WwtzQf3NBTfrqggWXxeMQfZSoDQ5XGdIf X-Received: by 2002:a17:906:19d2:b0:78e:11ea:8528 with SMTP id h18-20020a17090619d200b0078e11ea8528mr14418432ejd.190.1669295872348; Thu, 24 Nov 2022 05:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669295872; cv=none; d=google.com; s=arc-20160816; b=FxUsF8XbRRVyyFSxpizgNcpr7HohDBQsEXXrd2c7J2SJru17NfgrcKnTPpD/x0I4mS ZdIMObGJIiBCFukfRsxiri2vhFXP/GJLHWaF165tvDaHwgDSEqACn90N7JvXS4Qb2RyE vjs7EMqBZJI8fb+15H5Wtn5wdjLRMLchP8V1NmlZgFgNhxPVDp6etbHFS/ShwZGpmTF9 UQ9BORpNMjJOcpn1DkaE1A0Hs7rcNsf/2b5zU9AZpA5UkfanE0Ua5+Vopw8SA93jg2G4 KOjUqai8AsDqGnwaLwgxJ+Z/uFu9RhBY4bykdyzO6Y1ymLLZIW+hyQH8i1OnMBCLAYHS AgUQ== 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; bh=6fnj3UVmGEOXYNuUqSX0MGfy/RJO0YzOh/+/SROXoVI=; b=ZFLVVfaNKOojVSNBN5Eet+tq6xJLKVp67Q9VQEfCB3HT/3pF4J5wQ+bdGDu2lmcZLn ytSsmJmJq1Uk7Y7jjt0L7tort4+YhRmnBeA3X52fsn2xGdQBI3GtMChTL9C9X7RaqDsV xyr/5EaHvsi4tFcMzrG8MKHWL32bYUJ/2F2JTZ+MPaIRaaql10AHgW4rX5t52CYSaslQ a/BWDQilzqCtdbc1UvvMu9QKfnIwuwHVLqy7FjM156CfSubxQ67V7WVp+SJrCk/Z91gH yAs5BTnK18qnCF01HrdYYYJjwbBA0lUnbA6TYBjWf8J0fPqpc0w24a2Vvp0U/MsNl7K1 p0Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="L8aF/+Cs"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xf4-20020a17090731c400b0078b96722000si850859ejb.608.2022.11.24.05.17.25; Thu, 24 Nov 2022 05:17:52 -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=@intel.com header.s=Intel header.b="L8aF/+Cs"; 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 S230107AbiKXNAh (ORCPT + 99 others); Thu, 24 Nov 2022 08:00:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230001AbiKXNAV (ORCPT ); Thu, 24 Nov 2022 08:00:21 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE35DBE852; Thu, 24 Nov 2022 05:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669294817; x=1700830817; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3xoDJ24ls7xPY5orIQfBql47gNQpE19TZHADmQ5loEY=; b=L8aF/+CskeiJXn+vtG4SarKq/GIC0uST8E8YhW8Dm4OMvrH/1tWMt8d7 yhGg1npnt+Mk6DOUVaKHeFM0A0sL25D7hZCFwGXqM497dLkFU72WIw2Uj KOUcqMJW4epFbQS0o7sp1MbSbjpdofImfDtNcuptzEoVFbmc75130Xa+N zMF6lk2Pjmi7cw7LHp3FR1vFUy9/VwO9n0KjwfK+Ou4FBxHe4PUw/mTMz LtCOt2ZOl4dmOXZj7Se4EPgmBD+Jh6wFqKif44+YMCWzh7xo3Slew1W0g Z1mH9sS0LSCG7iifEab+kPpYIImuI3+Kr83hVfcgfaKaMx96zDQANJbav Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="311932121" X-IronPort-AV: E=Sophos;i="5.96,190,1665471600"; d="scan'208";a="311932121" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2022 05:00:17 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="887367724" X-IronPort-AV: E=Sophos;i="5.96,190,1665471600"; d="scan'208";a="887367724" Received: from msharawy-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.48.147]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2022 05:00:16 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 6/6] serial: 8250_early: Convert literals to use defines Date: Thu, 24 Nov 2022 14:59:48 +0200 Message-Id: <20221124125948.23432-7-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221124125948.23432-1-ilpo.jarvinen@linux.intel.com> References: <20221124125948.23432-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-7.0 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750383588298937176?= X-GMAIL-MSGID: =?utf-8?q?1750383588298937176?= Use existing defines for the serial register values in 8250_early. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/8250/8250_early.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c index f271becfc46c..0ebde0ab8167 100644 --- a/drivers/tty/serial/8250/8250_early.c +++ b/drivers/tty/serial/8250/8250_early.c @@ -136,11 +136,11 @@ static void __init init_port(struct earlycon_device *device) unsigned char c; unsigned int ier; - serial8250_early_out(port, UART_LCR, 0x3); /* 8n1 */ + serial8250_early_out(port, UART_LCR, UART_LCR_WLEN8); /* 8n1 */ ier = serial8250_early_in(port, UART_IER); serial8250_early_out(port, UART_IER, ier & UART_IER_UUE); /* no interrupt */ serial8250_early_out(port, UART_FCR, 0); /* no fifo */ - serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */ + serial8250_early_out(port, UART_MCR, UART_MCR_DTR | UART_MCR_RTS); if (port->uartclk) { divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud);