From patchwork Fri Nov 25 13:05:09 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: 26006 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4005763wrr; Fri, 25 Nov 2022 05:12:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf50sQyennxr5qnMOYNpHMCralp8wtYtR/O1CoLylgvv3zjIc70m/3G71afGjCDV3qR0CXFg X-Received: by 2002:a19:ca02:0:b0:4a4:434e:1e07 with SMTP id a2-20020a19ca02000000b004a4434e1e07mr12118516lfg.172.1669381923835; Fri, 25 Nov 2022 05:12:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669381923; cv=none; d=google.com; s=arc-20160816; b=l1LnJKIWRvi4OV8NvFcRGfD53Z4a1+PjcRpEiPqfHoy191X7tWIr5ngySPDpuEUGeO 7DZDoNS993D8wx9Tzx164LrCB1Z1EWfCToJ8CBpId4T7c8ZMvkfjRpzpIYvyqYtc9vvo AzP6Rw1MLgGq1OE/DmZeiwSk7qDMbJc1isAEk1OQIJ4D2b8/C/61v/IOYongKkUxW1ty lO9WwMhMzfwP05ILGLKyI6J7eOw+SwmOPabaKTqhdv1bBW47syjpjDf/7BYaeKJB7dQs oKWJ1t39gk7e6i55VVkAqs5HPrfDUIo5O3NdVOPTXdalOfGr/PVi1a30uLcACb/Uloun KjjQ== 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=hrRL9SXfvLR0hW6N6kDONngXqxVwZuXnECvzqXFYjfuNAQSRGjFGSYbORfO3kyGqtW 2lZ0buI3pIhUaPTkCcvejKWFHyw28reENNZKd2TUScbothBctjqxahNur5izRGNp/Y6u tjCvWIVuSk4+M6N4o8f7wEgnHvi2NCN+Z9gKFLpocfLnVHmdeDXHCANfK6/rxLC/xnl2 FyrXnd9e7QFgoTvxaZzWc2jec4ETWLdHtzqLS3aFVrUrGa6+9FYinF5vsDltpxZL22Ak j6u8vd7uL9L709fQuYYD9FpmM2byxw2WM7H1B1bXnAo3q/CECXZmLX6X8GQODrS+MJCj rqZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SjocPMA3; 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 sg31-20020a170907a41f00b0078d2a84f2f8si3345088ejc.645.2022.11.25.05.11.39; Fri, 25 Nov 2022 05:12:03 -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=SjocPMA3; 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 S229988AbiKYNFx (ORCPT + 99 others); Fri, 25 Nov 2022 08:05:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229838AbiKYNFm (ORCPT ); Fri, 25 Nov 2022 08:05:42 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 869DB4C275; Fri, 25 Nov 2022 05:05:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669381535; x=1700917535; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3xoDJ24ls7xPY5orIQfBql47gNQpE19TZHADmQ5loEY=; b=SjocPMA3y6CguntltyOhfQ+2lxLcKLnh2YCDOAE5gREOyDVddsyUnp5w qB30+JVxErLRppIiAPDv8Ua+TGQMkVy4UfHca5kGV0V8sFvrQVfJbNjfx lWe+jQzh0fXh8YM1LtNKGcG3OdSsBFE35gSXRNKgR6Cd2pHHa4nuWgccG M8OolNua5xKaMJ1DLt2LPkwqB6VrVEDoa9c3Nu/XWzWKyS7mjIAPanYEL H59ETrWNk7FkwpIx+d8PJrWoCj9mtQ1Imj9pJoSfvqK4hcsYjHFTT7AiH wLDYscSq0u9KZqYbcGSisstJ1WBZpiDYc/S9CpzworezDIJDMGA8dyxcA g==; X-IronPort-AV: E=McAfee;i="6500,9779,10541"; a="316300802" X-IronPort-AV: E=Sophos;i="5.96,193,1665471600"; d="scan'208";a="316300802" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2022 05:05:35 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10541"; a="706064050" X-IronPort-AV: E=Sophos;i="5.96,193,1665471600"; d="scan'208";a="706064050" Received: from dpotapen-mobl.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.50.101]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2022 05:05:33 -0800 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH v2 6/6] serial: 8250_early: Convert literals to use defines Date: Fri, 25 Nov 2022 15:05:09 +0200 Message-Id: <20221125130509.8482-7-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221125130509.8482-1-ilpo.jarvinen@linux.intel.com> References: <20221125130509.8482-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1750473819943170918?= X-GMAIL-MSGID: =?utf-8?q?1750473819943170918?= 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);