From patchwork Sat Feb 4 05:31:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumaravel Thiagarajan X-Patchwork-Id: 4941 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp954957wrn; Fri, 3 Feb 2023 09:08:39 -0800 (PST) X-Google-Smtp-Source: AK7set/CI1nNYchLpOlnvEgiUNy7bYhR74GPmJVdVfsA8mZPdJaETwPq2558vysI1g+pXHXPhUrP X-Received: by 2002:a50:f684:0:b0:497:1787:13af with SMTP id d4-20020a50f684000000b00497178713afmr7001171edn.32.1675444119054; Fri, 03 Feb 2023 09:08:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675444119; cv=none; d=google.com; s=arc-20160816; b=dT33f1r3/jO8apBKqO5ZLPNKDJ9Za22NptwygGthhvbAJqPp4fL/jFkXZhWiI5reuU WodreecCIi7pFgG2/u+6zpGOcXM8l+CDm+PHragt6V2h+30Me0aijVf4mqCZaHaXQGfk Rb9D6Wuk5dwNTKLOubrVcV3tMfPH0qXZMiq1iwWSod1+9KBYfbi9HRk4tshxe0V2L9+o SkGwo2oDRp3m2cNIXlDGfzj3O9PRyWXFPyxT10O4AQ8sNrlxCZJt1UnG/pi5qUnQI0Lr 4KvbO3n4zlKayjoKbOm1Z6yxa7vqPYj6PUCbvrJ87VcVf4OjwLuMfAVLuOOke2amJpVu z6Tw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=16wcOZpwOkYQmLW+3h53CwT2iqn+RN2s2ASBeA3FDxU=; b=oe+5rctKkAh4VG7BPKCPFtlUzgmOcWC2TY3SaI9G9aWrKXPc0aC5pqvwH+RMqwdxwb xg1dseDhvxpMujNcQa2t6FOEC0AnIfwK/F65BwGa+2b7pQPuBJQDyQGEDEfGOdESubPV Pl4Z+LBYVnpw/bLkzJpFC0lhEqKnui9ThNzOUDkxg+M1WJ5JjNW3GfuSpGRsgp6UgWho QdReZKoWfWQJtSZDXmEiz2A5xuV74fMJP03EZy6+7X5d8qTegdM7ye0LKcfV16jPTnIi 0qtbnTQjG+UTxyyRckrGuDFaZb56X6xye8gt1ZrnvHB9tt3G1fLx/geE+DpZxHzl/dmA s/9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=E9CGWVVE; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n21-20020aa7c455000000b00497326c9e1csi2904376edr.594.2023.02.03.09.08.15; Fri, 03 Feb 2023 09:08:39 -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=@microchip.com header.s=mchp header.b=E9CGWVVE; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233380AbjBCQ4b (ORCPT + 99 others); Fri, 3 Feb 2023 11:56:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232479AbjBCQ43 (ORCPT ); Fri, 3 Feb 2023 11:56:29 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EC064FADE; Fri, 3 Feb 2023 08:56:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1675443379; x=1706979379; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=xWwEliwH3/2TbdcPq4FPWGC/tiCdnGbtpLGpXFn3YDc=; b=E9CGWVVE3nXW51I9GvJnFqU6NZLAX+r2aiICUw859C1PoDt+Pf3Q4ftK 3Ow6p/KMbsX6NpVJLJ3fu1wMeHYl2OulPwDoGmwWfjLm6CtpC1KwNzrFE 6hEZgVFAC5WdgIiDJYNCzGJwP+e2ZxNMS9/pho9zFMGiXn5zKwFb3fv/4 tnVeae7Q5w7KggNSKcrHYvwMGJlWVOeIRjcCuinX/XD9qhIcRIQLQCssd AZxyoLsYyWaHNauIWPm+0OK6+lJCRPsKkDx1FycuGMqqpvftJAUGK9uNx ANLymy4R7tw1Yz85uKnERcfXnJO+0MDMw89CZdxH8i3evlWvMNRGRue92 g==; X-IronPort-AV: E=Sophos;i="5.97,271,1669100400"; d="scan'208";a="198833319" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 03 Feb 2023 09:56:18 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 3 Feb 2023 09:56:18 -0700 Received: from CHE-LT-UNGSOFTWARE.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Fri, 3 Feb 2023 09:56:12 -0700 From: Kumaravel Thiagarajan To: CC: , , , , , , , , , , , , , , , Subject: [PATCH v11 tty-next 0/4] serial: 8250_pci1xxxx: Add driver for the pci1xxxx's quad-uart function Date: Sat, 4 Feb 2023 11:01:34 +0530 Message-ID: <20230204053138.2520105-1-kumaravel.thiagarajan@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_12_24, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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?1756830492130112785?= X-GMAIL-MSGID: =?utf-8?q?1756830492130112785?= pci1xxxx is a PCIe switch with a multi-function endpoint on one of its downstream ports. Quad-uart is one of the functions in the multi-function endpoint. This patch adds device driver for the quad-uart function and enumerates between 1 to 4 instances of uarts based on the PCIe subsystem device ID. The changes from v1->v2->v3->v4->v5->v6->v7->v8->v9->v10->v11 are mentioned in each patch in the patchset. Thanks to Andy Shevchenko, Ilpo Jarvinen, Chritophe JAILLET, Geert Uytterhoeven, Greg KH, Jiri Slaby for their review comments. Kumaravel Thiagarajan (4): serial: 8250_pci: Add serial8250_pci_setup_port definition in 8250_pcilib.c serial: 8250_pci1xxxx: Add driver for quad-uart support serial: 8250_pci1xxxx: Add RS485 support to quad-uart driver serial: 8250_pci1xxxx: Add power management functions to quad-uart driver MAINTAINERS | 7 + drivers/tty/serial/8250/8250_pci.c | 25 +- drivers/tty/serial/8250/8250_pci1xxxx.c | 494 ++++++++++++++++++++++++ drivers/tty/serial/8250/8250_pcilib.c | 39 ++ drivers/tty/serial/8250/8250_pcilib.h | 15 + drivers/tty/serial/8250/8250_port.c | 8 + drivers/tty/serial/8250/Kconfig | 15 + drivers/tty/serial/8250/Makefile | 2 + include/uapi/linux/serial_core.h | 3 + 9 files changed, 586 insertions(+), 22 deletions(-) create mode 100644 drivers/tty/serial/8250/8250_pci1xxxx.c create mode 100644 drivers/tty/serial/8250/8250_pcilib.c create mode 100644 drivers/tty/serial/8250/8250_pcilib.h