From patchwork Wed Feb 21 18:31:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13566109 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB08EC48BEB for ; Wed, 21 Feb 2024 18:35:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ciuceadPCCUaACGDoPgqQgTUoB3xeEZfSSL8xMK5yA0=; b=cEVeVzYKC/4Ek6 +dRdjBJtGPw8Mc4H29/ix/MMm3ze+MGMhJJqp79DcxtigCuFj45ewNb1Ru7oYFTbGz8ZP0UkDy4Iu v2f+Sy9/8NE7WF1J5EMCR+DB9TWH9AHIhbSMAYgvobpJbXw8SZAlQLKjQlUaiFBGF6RnhPDZAJmU6 e8q2qN/vSfOsFcBay07cy05ZBRNCPoXX//v6VSZbl8KbuaDYqe8Zag5ARrjrG+/e/DRBMVUBr3YeJ LM6r3Znwl/0d+lRRN+Ltx5DFwRKqFlK8ZoFxInsW4YYNQdbGI75Ty/plT1yK3cq+rfYA1VYKoiyWl wsjLniNc4ifo/Sey+gRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcrR6-0000000282h-1Nbz; Wed, 21 Feb 2024 18:35:18 +0000 Received: from mgamail.intel.com ([192.198.163.7]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcrQm-000000027xY-1wj1; Wed, 21 Feb 2024 18:35:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708540496; x=1740076496; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=SXh9o6lcdXir6m04bi7g64vXsMqCpE0OVYelVUUwvJE=; b=Hm8Ta5AvbyPfws3ExSEsD4tx48RydUqtvKZ0z7Qgojt0Rk0bF7Xv869o 6X2ALCdlnJWaBt6n4vP2i4dYlPm20sdlaJjEvkO79RfAscYjJLVxrQxca B868aFyJ7cklN2lo1sAxSJjuDCcj527uZ2t2u1261AVxQMWqDX0IF40jZ EimihVwygUSRteB6f62iUkE0H6n1YDLZodpx2UI/j/2bu7RELfSvBuq0w qa8s3YOdTOLaEfRwnafxEaGpbRW2FBRiRoSv3wKZzZi8MyRxPN4eIbZtc bKAK/Mto/BswmibRUDplkE5W6oV25UA7hCB5mQLQnJS3CJSqnSlIOvgf3 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10991"; a="28164667" X-IronPort-AV: E=Sophos;i="6.06,176,1705392000"; d="scan'208";a="28164667" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2024 10:34:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10991"; a="936684737" X-IronPort-AV: E=Sophos;i="6.06,176,1705392000"; d="scan'208";a="936684737" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 21 Feb 2024 10:34:47 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id A7CB11FD; Wed, 21 Feb 2024 20:34:46 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-rpi-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Jiri Slaby , Joel Stanley , Andrew Jeffery , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Al Cooper , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Paul Cercueil , Vladimir Zapolskiy , Thierry Reding , Jonathan Hunter , Kunihiko Hayashi , Masami Hiramatsu Subject: [rft, PATCH v1 00/14] serial: Add a helper to parse device properties and more Date: Wed, 21 Feb 2024 20:31:16 +0200 Message-ID: <20240221183442.4124354-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240221_103456_565434_B53B66BC X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org I have noticed that many drivers are using the subset of the common properties and IRQ retrieval code. With the moving it to one place we have got a common parser one for many. Tested on Intel Apollo Lake with DesingWare 8250 UARTs. The rest has been compile tested on x86_64 with clang. Andy Shevchenko (14): serial: core: Move struct uart_port::quirks closer to possible values serial: core: Add UPIO_UNSET constant for unset port type serial: port: Introduce a common helper to read properties serial: 8250_aspeed_vuart: Switch to use uart_read_port_properties() serial: 8250_bcm2835aux: Switch to use uart_read_port_properties() serial: 8250_bcm7271: Switch to use uart_read_port_properties() serial: 8250_dw: Switch to use uart_read_port_properties() serial: 8250_ingenic: Switch to use uart_read_port_properties() serial: 8250_lpc18xx: Switch to use uart_read_port_properties() serial: 8250_of: Switch to use uart_read_port_properties() serial: 8250_omap: Switch to use uart_read_port_properties() serial: 8250_pxa: Switch to use uart_read_port_properties() serial: 8250_tegra: Switch to use uart_read_port_properties() serial: 8250_uniphier: Switch to use uart_read_port_properties() drivers/tty/serial/8250/8250_aspeed_vuart.c | 50 +++----- drivers/tty/serial/8250/8250_bcm2835aux.c | 92 ++++++------- drivers/tty/serial/8250/8250_bcm7271.c | 53 +++----- drivers/tty/serial/8250/8250_dw.c | 67 ++++------ drivers/tty/serial/8250/8250_ingenic.c | 20 +-- drivers/tty/serial/8250/8250_lpc18xx.c | 20 ++- drivers/tty/serial/8250/8250_of.c | 105 ++++----------- drivers/tty/serial/8250/8250_omap.c | 29 ++--- drivers/tty/serial/8250/8250_pxa.c | 22 ++-- drivers/tty/serial/8250/8250_tegra.c | 26 ++-- drivers/tty/serial/8250/8250_uniphier.c | 17 +-- drivers/tty/serial/serial_port.c | 135 ++++++++++++++++++++ include/linux/serial_core.h | 10 +- 13 files changed, 313 insertions(+), 333 deletions(-)