From patchwork Wed Dec 7 23:53:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kumaravel Thiagarajan X-Patchwork-Id: 2716 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp121240wrr; Wed, 7 Dec 2022 03:24:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ZGK3rgYO61LeeKCCVXHE1/Eew6yD7V+v5kc9rud4T26owgrC2RF4HpqoukJWqSzV4PjRS X-Received: by 2002:a05:6402:a41:b0:462:273b:6b5c with SMTP id bt1-20020a0564020a4100b00462273b6b5cmr79019200edb.57.1670412293908; Wed, 07 Dec 2022 03:24:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670412293; cv=none; d=google.com; s=arc-20160816; b=pTrFFUzgXzUA8770kljDlsBORdhR/GbIzDgZDKvqTj04PLFlMbM0+p0S0PUT0vvB2c hd/hZZJYD1ypR8oeXTHOoeULEGn+/j/dPwVoz8uLulAR8lWaAIVs3tzACGpGI/ydlJuT PJTn42rmQm2fIB4GIlJm59j+tSnk7rP+UOKpB4hgvxRvzAx/23dJYzv2ZEjZxr5x2wFL RtQIkFSj9QtAhqkiqTYQiSVMmYqbBJLgLSPGxwV9lUHHJiK3O213TQJtcKJC/cBpdDbs EYqGD0BLgDSJ7dGKuclLUqi2T8C1EDiASEywDrA7MyeNOMYMSWg9EEjk1WGTyvsZYvcX gADw== 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=TGW2WYXvUIXwF4pWNhxCGV3iI3/1keUR2sKrHtFkVRM=; b=t6pHHtbBM87w37ivsc+PHlF/lCXU5ajNs5x50RG/1EsKOWyB/AUnjGkqaU8wzAJSn+ /z8PnLMakD9WxCb54J+A+v6EKBOclM1ClNOYGUYDsyIvczn49W2rmxksS/ffiDRcoeUt Qdt1RC2upQEwkrbMqBDlSk+Y+ZkM3mE2Ya6uqFz9V/BHB3Ctm1R6mrBCHU1XStyKz/zi Poqbj2XdW45uTABxjNGSI0EKv9M9hRZntNBhHMagrwuk02Dy5fztzblxSORqWssKnobx OgqcKbnyDLKVTjcf04+R81XKkN5UwtNxXw5qVSEsqsrwtAUwY+AsFkBHUgzpXFh1WR4T fwgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=rezprXoI; 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 sh12-20020a1709076e8c00b007bb92113ca1si14638117ejc.67.2022.12.07.03.24.30; Wed, 07 Dec 2022 03:24: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=rezprXoI; 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 S229727AbiLGLS2 (ORCPT + 99 others); Wed, 7 Dec 2022 06:18:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbiLGLS0 (ORCPT ); Wed, 7 Dec 2022 06:18:26 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E884824F3D; Wed, 7 Dec 2022 03:18:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1670411904; x=1701947904; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ufDcSX1fYp/NtPKfcxTUrkRkXxaEqnJzgpfplvRfLUQ=; b=rezprXoIAwN5Rw6TFv8Vx4hU4XlvK4oLF0lCkHw7ATu0bMSdZwolbi2d 6Ax362oMTco1/kCm0UjsJWl0p/jQf7Im1HIyNykMED+e9iC5q7OsRD3Jq 9fApDVsUlVzC2Yn7dnhLDLk6gZDCYFp+TQUDVOZuYbWC2IPIZlnDZZTjO NHWuASUHsmaTz6vNGIHE8znbdhyFj7OOQioV3NVwZWpfRe4SzW/ZyiY0y Hw6mP0lB0wAr/YdZlBky2YTsFADTg5evj6V/jKI1Raz0iWZ6GkKouCaZM xn9gHLrfoWXygBFnpNeqjzt1puXggJ97ypsUJ/Y9cC7H0OtnFVAOkLTXW w==; X-IronPort-AV: E=Sophos;i="5.96,225,1665471600"; d="scan'208";a="192048440" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 07 Dec 2022 04:18:23 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Wed, 7 Dec 2022 04:18:21 -0700 Received: from CHE-LT-UNGSOFTWARE.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Wed, 7 Dec 2022 04:18:16 -0700 From: Kumaravel Thiagarajan To: CC: , , , , , , , , , , , , , , , Subject: [PATCH v7 tty-next 0/4] serial: 8250_pci1xxxx: Add driver for the pci1xxxx's quad-uart function Date: Thu, 8 Dec 2022 05:23:01 +0530 Message-ID: <20221207235305.695541-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?1751554241642062621?= X-GMAIL-MSGID: =?utf-8?q?1751554241642062621?= 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 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 | 468 ++++++++++++++++++++++++ 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, 559 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