From patchwork Mon Mar 4 12:27:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1907553 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VRz4MKtc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=patchwork.ozlabs.org) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TpJ2V5fsnz23qH for ; Mon, 4 Mar 2024 23:30:58 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VRz4MKtc; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4TpJ2V237Vz3cp1 for ; Mon, 4 Mar 2024 23:30:58 +1100 (AEDT) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VRz4MKtc; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=192.198.163.12; helo=mgamail.intel.com; envelope-from=andriy.shevchenko@linux.intel.com; receiver=lists.ozlabs.org) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4TpJ2K1Jyjz2ytg for ; Mon, 4 Mar 2024 23:30:47 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709555449; x=1741091449; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=dDFiSzziXJFNdVtCeloj7uM1p/JFexseASaR1J4v3lc=; b=VRz4MKtchFHG8AAZ9HjAx8EVS/vJLynONgzmkyP+nwQQbI0fyax5I8S1 +Au4oL/fYaKvjSYpmibK9KzTw0n20BcKbk2Uo6OQcaJnd+F3wrkYlalrc z73SaFxfYivCbct8O6k5jz5hTnrUTH8XlO8aYFm7eVBOVVMGCtKUygy73 HWG1OwQdZVE4nP6x5HeqKjwBVHk9LB7MA3FbTqXHShvkCUpVSHrd9uOe9 r3+UIU2YcblXVL1e99eGamX6S1+MMS2K92NsddxKQqrTQ8gzb3Lpnb1Hu KtUBVhKRUw6lroTpFt6oR7exMvUOCuBzpSbmeGlsjRG8lIyb+8xh6RgWw Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11002"; a="7815030" X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="7815030" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 04:30:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11002"; a="937040421" X-IronPort-AV: E=Sophos;i="6.06,203,1705392000"; d="scan'208";a="937040421" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 04 Mar 2024 04:30:38 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 29C201D6; Mon, 4 Mar 2024 14:30:37 +0200 (EET) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , Florian Fainelli , 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 Subject: [PATCH v3 00/14] serial: Add a helper to parse device properties and more Date: Mon, 4 Mar 2024 14:27:01 +0200 Message-ID: <20240304123035.758700-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kunihiko Hayashi , Scott Branden , Ray Jui , Al Cooper , Jonathan Hunter , Vladimir Zapolskiy , Paul Cercueil , Thierry Reding , Broadcom internal kernel review list , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Andrew Jeffery , Jiri Slaby , Masami Hiramatsu Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" 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 (clang compiled) and in QEMU for Aspeed configuration (gcc compiled). The rest has been compile tested on x86_64 with clang. In v3: - split the helper to two and export as GPL (Greg) - added tags (Florian, Kunihiko) In v2: - fixed typo (Hugo) - renamed UPIO_UNSET --> UPIO_UNKNOWN (Florian) - fixed 8250_of not working (Andrew) - dropped unused variable in 8250_bcm7271 (LKP) - added tag to 8250_aspeed_vuart (Andrew) Andy Shevchenko (14): serial: core: Move struct uart_port::quirks closer to possible values serial: core: Add UPIO_UNKNOWN constant for unknown 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 | 56 +++----- 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 | 145 ++++++++++++++++++++ include/linux/serial_core.h | 11 +- 13 files changed, 325 insertions(+), 335 deletions(-)