From patchwork Sun Dec 11 01:47:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumaravel Thiagarajan X-Patchwork-Id: 2846 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1306842wrr; Sat, 10 Dec 2022 05:14:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf5gzy33leFeHnch2FmIVPg0KBK0NvbS00hNqsMEYJrdgD2OIXlKceW9M8+q5RKGic5iT765 X-Received: by 2002:a05:6402:194a:b0:464:4604:f9d4 with SMTP id f10-20020a056402194a00b004644604f9d4mr294483edz.24.1670678094020; Sat, 10 Dec 2022 05:14:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670678093; cv=none; d=google.com; s=arc-20160816; b=YLuwl7NfLN7VQlsJc91tdLkyrDAAb+cr57YOUqSzw6vmjSomSk3rY+Pg3XCd7iH/hP 3JVnNPb9IMzzSNxF9QVF26eaSNRzYSIq26qnucx5QarZOpvPcIopqSu9lcuhegiyzZJb xwKQkxX/3wIy9m77fZtbf4OTsBojGQgVcQbX206vNAItug1ZRebehTp2xzb9iw9ej+bn dsE9yQIAcloh2ws7ihWeKG8OUt8CjKET3JwODZu415iV1VoJV7V1GzHzsIjf2vknWPJb XiPWkXi0uogvB+nF/K81UyAEPjXAMDK9syRT3qBpY5MX/GhgZCN8XXOl8DnqIH0Ad9SJ yQzA== 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=d3nPVW2YKjTgKskaMX8MgXQUMzoIv2wahdpPp8jk2K8=; b=gUPgIbK/YvHGdPayOHk3I+MpSXjDNE5C6zhSDOeuRASaChIO2t0umu3vDT5vPg2n+y 8q0cK4eTh5smjGCpmnQl3kr6RVM7kcGyCpCPrVnR6CnTHSKRJqCIyWtGUw7irELqitUc mjeishF6boSpl0uFqh1BQayAR+mZtgvK+yuHGhfaJIIRqVztC/4DRouW5N2XsMqyHnB2 kLK1iVx7Y+3nGtQBwizbzzBcu/6jzkTL1PiXlxejvGcXfzuUNPoR0Zbf9b64hyThaMml 4YTn45X1U0Q8ymdDyQ8lbP3kp3VuN916W1qWiC8F4T+911Bxvx3K/GjY41LvoKa1iRI5 75pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="t95mb9/q"; 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 b8-20020a056402350800b0046382109edbsi4212905edd.395.2022.12.10.05.14.30; Sat, 10 Dec 2022 05:14:53 -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="t95mb9/q"; 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 S229691AbiLJNMw (ORCPT + 99 others); Sat, 10 Dec 2022 08:12:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbiLJNMt (ORCPT ); Sat, 10 Dec 2022 08:12:49 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE1E6448; Sat, 10 Dec 2022 05:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1670677966; x=1702213966; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GEalOp6rlimq1PfGWGifvvxzEdgr1fsj4093Cy8b6u4=; b=t95mb9/qU93ATfIqPY2R4eRFwuzdGCca/hvC2AKVcHl+gL4AElaeUqrs l1/2Zp1OQZ+f93s9N/EEAo8In4ztxr4+2x4lIItyFpMmSHZwVf+81hLes NyelIvhT+H0rNWaUUN0HLqEBJGStx8Qcl3TNolDx8wUoTvhExovzmvNIi 2JyAy6Ou5omsMam4VC0bCF0uIUVOWYyTleVt6+nHTOM+OCHnWUaXHQVW8 PqG/zdHRIP//Kx2meJLNUqJF93L7+xZgf23HDkCCuuw710s2pC2DtPymg pgrsXhXsRpCjWjGz+eLyGoVQxYqyfot7lBU4G9jjntBz4pxrgzUJDBQfW Q==; X-IronPort-AV: E=Sophos;i="5.96,234,1665471600"; d="scan'208";a="127478436" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 10 Dec 2022 06:12:44 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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.12; Sat, 10 Dec 2022 06:12:45 -0700 Received: from CHE-LT-UNGSOFTWARE.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Sat, 10 Dec 2022 06:12:39 -0700 From: Kumaravel Thiagarajan To: CC: , , , , , , , , , , , , , , , , Subject: [PATCH v8 tty-next 0/4] serial: 8250_pci1xxxx: Add driver for the pci1xxxx's quad-uart function Date: Sun, 11 Dec 2022 07:17:26 +0530 Message-ID: <20221211014730.1233272-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,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?1751832953185386849?= X-GMAIL-MSGID: =?utf-8?q?1751832953185386849?= 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 are mentioned in each patch in the patchset. Thanks to Andy Shevchenko, Ilpo Jarvinen, Chritophe JAILLET, Geert Uytterhoeven, Greg KH 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 | 502 ++++++++++++++++++++++++ drivers/tty/serial/8250/8250_pcilib.c | 38 ++ 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, 593 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