From patchwork Fri Sep 22 14:20:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Howell X-Patchwork-Id: 725829 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D030EE6FE38 for ; Fri, 22 Sep 2023 14:20:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234204AbjIVOUf (ORCPT ); Fri, 22 Sep 2023 10:20:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234186AbjIVOUe (ORCPT ); Fri, 22 Sep 2023 10:20:34 -0400 Received: from DM4PR02CU002.outbound.protection.outlook.com (mail-centralusazon11013012.outbound.protection.outlook.com [52.101.64.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48BD2AB for ; Fri, 22 Sep 2023 07:20:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I6xZ0O+DApOGmQqX7LP2WV6KnSEAqnXh7IE23K1/UNW3N3KrgQbYdHwLuBBEaktn2HmoTZUGUHNl5wTGMqb+II/KHdGpdDQ/QL9Y21nS6up172NoOb2SyUT4rD+TxriOeCZjxVO7c3Dsq+dHTplPeWCiWjzexU/zKnSHk66QkTQgyv0CXpK4CA7MjjuWBR5cJ/fBMPMleNbFIg0aV1kKso6IY6l+NHdx6wYoxeo6iQObBTpdDl455QKVj+ydOWnGbWupJym4skqru51Njr91bS+XAntEvW5xugEqNuy0w5k/fDUpaf4RZVgfl4GptWtO5bwy87MIXhgykFuTb3G47w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Hojaf7ce4SPrEbqpoOjQQQwLpo6IgEWi/w596gXtFgM=; b=i8yaH7cggBAZfSz3z1S2ADYUT5rtEiKciNaGAw5Zb/+/hrlCbSTAxEnQF5okzlF8RlHuxkHP6uCzogYb3DWgobbz9b1lLJUEgfgl/xJ/UkPsIkE6Kr3EKEGmeVma5gcLh26+gGx0EEsoHeZbuQdUCQiwtchbdVoVxEEE2kI1OqlLDGtPwJEZ0c/sSTI9aN+GSgHpYBHG+xdgcJPUgoJ0Zz7wz/4UzUPK+QpIm9jjv0Hvpq4u2YTT0NRbcNSEGvStBUueMfnSkJpArPdinjIlvL9sxQR3bFC6hziGu+E1VcWmb/sjk5d1wA4V1cetqi34Tg/K42IBvkMjXOLkZGKvGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sealevel.com; dmarc=pass action=none header.from=sealevel.com; dkim=pass header.d=sealevel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sealevel.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hojaf7ce4SPrEbqpoOjQQQwLpo6IgEWi/w596gXtFgM=; b=WStTtqg/x+5jFZENpFaX7rRnBsHkijlv38YaGLV4CuDrVLWH2uOS+H4exVjaNGIkfcZe6WW/sErccInPZSnSUI0r1OZ45TSS2k6icV8Hr/bM/CJSDOWId+N2vVEUDjBRA3Wm3O1eA5fJzfegyV16y2lEvaBdEdgw76Llb/PO8nzFThre1ZNTSFdRMpfE25uwhirkweqcPVhBJZ76lSbYH/wRygfgoXeKOKuYcvY8ndjORXG9Nj9dqXeC5dKFZZm2pM/I+EvbnAlstk90X6OI6ucwNXAGmgJQaC8JFxg6Jau1A1xr8XGh1T/QbRafaJ3v/sncNcfPdX/0y907m7acJw== Received: from BY3PR05MB8419.namprd05.prod.outlook.com (2603:10b6:a03:3c6::10) by CO6PR05MB7713.namprd05.prod.outlook.com (2603:10b6:5:34a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Fri, 22 Sep 2023 14:20:24 +0000 Received: from BY3PR05MB8419.namprd05.prod.outlook.com ([fe80::f4e4:1bc5:23f6:c9d4]) by BY3PR05MB8419.namprd05.prod.outlook.com ([fe80::f4e4:1bc5:23f6:c9d4%3]) with mapi id 15.20.6813.017; Fri, 22 Sep 2023 14:20:23 +0000 From: Matthew Howell To: "gregkh@linuxfoundation.org" CC: Darren Beeson , "andriy.shevchenko@intel.com" , "ilpo.jarvinen@linux.intel.com" , Jeff Baldwin , "linux-serial@vger.kernel.org" , Ryan Wenglarz , Matthew Howell , James Olson Subject: [PATCH V8 1/2] serial: exar: Revert "serial: exar: Add support for Sealevel 7xxxC serial cards" Thread-Topic: [PATCH V8 1/2] serial: exar: Revert "serial: exar: Add support for Sealevel 7xxxC serial cards" Thread-Index: AQHZ7V/tlJUc5zv3CE6HU1a3mrR9mg== Date: Fri, 22 Sep 2023 14:20:23 +0000 Message-ID: <7f7016dbad5eb0770bf4653dcc87ae0f8963bf44.camel@sealevel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.44.4-0ubuntu2 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=sealevel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY3PR05MB8419:EE_|CO6PR05MB7713:EE_ x-ms-office365-filtering-correlation-id: 50945d31-a25c-4777-1781-08dbbb770f83 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vwX8BVyrW/6OOnDq6TYhwUQG4kq2NI+wGzLn+JvKvcfJJIneCCPaAEACIUqGxxxna/gKmlCTM/i1BnbkdBAl4yQEI9+q0P88n0sbasCpYhM4IF+pSsXZ3Z2gYpTuouQ8DwkKZAG7sBRi5eR4eU/SlTvAz4ap9nfIBTtgoNxgLVZxuPyQjVL1e2oj2dd1Mjd312AtbPPvJSjlJHf8bDT2wB31q3J6WLa+pSaX0YAhagFzcyy7USWsvKmlTVEwvDqt+ZPm5kPpjsgp/QsDIe1l4KlUnhx4KfpQq/3Srwv5ol4q6Tt8VGvq5nimyKQNAt/+m51QpAWBl6hE5f3aDAQErNWacp3v8kCuSSFsxM2rQ8BZZHA0cqm4cw4b10cu1oJBQQQ0jmq/xWVOHxkcKpdJka5fMUqxWbcO5JnjwalsMP7VLHXzUCGvJH6XM5q7XgmBu4SYq4rVcMjDDdkvPNYp69J9FURAaGcb6GFSHWqaCf5Pc05aCjalt9rOEC7pgqYrTTRre9/8wXDanXcbSUzJdxzcD9EkmUabRNhjezIKBeQOlYTvUnDs8bUdA1CwVuxOH8jhU4wk27t/kjw+zBpZV8fYQJ03cIYqchgJHVlOA3v79jQmEy/wpx32RbaTa9ir5V4MIL6TLWe3w1J8PeM9MzLvdwyaG/7f9C5nfL6Wk1U= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY3PR05MB8419.namprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(366004)(39840400004)(136003)(376002)(346002)(186009)(1800799009)(451199024)(76116006)(66946007)(86362001)(6916009)(6486002)(66476007)(71200400001)(54906003)(26005)(91956017)(66446008)(316002)(2616005)(8676002)(66556008)(2906002)(8936002)(6512007)(4326008)(44832011)(41300700001)(38070700005)(5660300002)(38100700002)(122000001)(6506007)(36756003)(478600001)(64756008)(107886003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?YRFWw3XbufIMguLOOVZ+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b1R?= =?utf-8?q?KUa5kvz84zqr3PLq9SKUE7TXK00jZXFH0jsT0u5lsu0U2Jsquoxik+G3nM/ABPTea?= =?utf-8?q?9KHanjxU2e0G5fXXTLngSJXm7EBa1T4g4Q1kq9CRizVy4YcGAzoh/DlAdZ4G3qUP8?= =?utf-8?q?lcY4V1XEB5J1eYecxfRuZ3VdGMIUhyc6AVjKPQkMeeUMfMpxmzIIJu2QjCNEkwiTA?= =?utf-8?q?TfB7qyy15FqxaLh7aYKN8u1rRnCk00y4xDAMCnGqi5j8muahMDNEkAPxDpZtA1G3b?= =?utf-8?q?c8yejWqjx+yqXnHWB3u7x+IxItAAztohXy5nrMFTWiF9TudDCU3W9N5M/z0fu/DKA?= =?utf-8?q?bfUwjxllub5glhABGwdAnxPv6A/mJTWsO+Rg9lRbRC8tFxWN4a1PuI9B1pKMQPgV+?= =?utf-8?q?QC3XnQ0yyXF80o9Ppk7qlQqJGdrwN1pTMsOKoAw14znOhMAug2YgYd14Kuu5zhfc2?= =?utf-8?q?2iTJ+dytGR24NBqbOtYofyD8MiUo7UZZzCkBYVqiXap5xI3siZFipsvthpTRFGTZE?= =?utf-8?q?N2dskkPxmrn3kHeCWKxXZ/ebRYfHm3ITYhfTat3J2y4TorYpjucd0drEGuegyiu+B?= =?utf-8?q?z2kJG3STqfp9cz5Q16WfHIJmjCHu9njgp0sLBJh/RWcupcvWMcRzIc+FBR/ndQdWx?= =?utf-8?q?o9bTqi+PbGXp6wR2qa8++eJHLmcCHYIL0g=3D=3D?= Content-ID: <71F1A82149BC2F41B790F330ABE4CD8F@namprd05.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: sealevel.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY3PR05MB8419.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50945d31-a25c-4777-1781-08dbbb770f83 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2023 14:20:23.8335 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e34c5615-b4e3-481c-abc8-602581f2e735 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: z81XoSsppfXFiEaqgXvrBcOlgy7GF6FBrXWc/n1VYRK3g49TV4a7xzx6gQCQb4ENel1ZSad9JLqrnObUUenaJinWck8kcMUkqtk59lIbP9E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR05MB7713 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Matthew Howell Hardware ID of Sealevel 7xxxC cards changed prior to release. This has rendered 14ee78d5932a redundant. Revert "serial: exar: Add support for Sealevel 7xxxC serial cards" This reverts commit 14ee78d5932afeb710c8305196a676a715bfdea8. Fixes: 14ee78d5932a ("Add support for Sealevel 7xxxC serial cards") Signed-off-by: Matthew Howell Reviewed-by: Andy Shevchenko diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 077c3ba3539e..3886f78ecbbf 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -47,12 +47,6 @@ #define PCI_SUBDEVICE_ID_USR_2980 0x0128 #define PCI_SUBDEVICE_ID_USR_2981 0x0129 -#define PCI_DEVICE_ID_SEALEVEL_710xC 0x1001 -#define PCI_DEVICE_ID_SEALEVEL_720xC 0x1002 -#define PCI_DEVICE_ID_SEALEVEL_740xC 0x1004 -#define PCI_DEVICE_ID_SEALEVEL_780xC 0x1008 -#define PCI_DEVICE_ID_SEALEVEL_716xC 0x1010 - #define UART_EXAR_INT0 0x80 #define UART_EXAR_8XMODE 0x88 /* 8X sampling rate select */ #define UART_EXAR_SLEEP 0x8b /* Sleep mode */ @@ -652,8 +646,6 @@ exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) nr_ports = BIT(((pcidev->device & 0x38) >> 3) - 1); else if (board->num_ports) nr_ports = board->num_ports; - else if (pcidev->vendor == PCI_VENDOR_ID_SEALEVEL) - nr_ports = pcidev->device & 0xff; else nr_ports = pcidev->device & 0x0f; @@ -893,12 +885,6 @@ static const struct pci_device_id exar_pci_tbl[] = { EXAR_DEVICE(COMMTECH, 4224PCI335, pbn_fastcom335_4), EXAR_DEVICE(COMMTECH, 2324PCI335, pbn_fastcom335_4), EXAR_DEVICE(COMMTECH, 2328PCI335, pbn_fastcom335_8), - - EXAR_DEVICE(SEALEVEL, 710xC, pbn_exar_XR17V35x), - EXAR_DEVICE(SEALEVEL, 720xC, pbn_exar_XR17V35x), - EXAR_DEVICE(SEALEVEL, 740xC, pbn_exar_XR17V35x), - EXAR_DEVICE(SEALEVEL, 780xC, pbn_exar_XR17V35x), - EXAR_DEVICE(SEALEVEL, 716xC, pbn_exar_XR17V35x), { 0, } }; MODULE_DEVICE_TABLE(pci, exar_pci_tbl); From patchwork Fri Sep 22 14:22:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Howell X-Patchwork-Id: 725566 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6355E6FE36 for ; Fri, 22 Sep 2023 14:22:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234195AbjIVOWY (ORCPT ); Fri, 22 Sep 2023 10:22:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233368AbjIVOWX (ORCPT ); Fri, 22 Sep 2023 10:22:23 -0400 Received: from CY4PR02CU008.outbound.protection.outlook.com (mail-westcentralusazon11012008.outbound.protection.outlook.com [40.93.200.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA594AB for ; Fri, 22 Sep 2023 07:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fT0Fmg1rdq/viz6XdmKmgODboZx4RxbKDhbUlRmBlT2DBUREU+MYaLnwWdShe/qBQJFq99K/6W7Pk4bv9l/MwrFpSg5AFt7Oqvq35+DWJcOmuDR6Oy7IuhRRrZQwzF3I46GKbvIm+RsDZwW9MDQr/7F5l/Jni1hrNnW92+MkHO2R4VuKjf5IV8E7EYGnsMODLqAQOtq8yt1PGWyvNXiwZcfXMzXwrpZb9R0kaOJjU2DHTyNiQ1JixIdYr2atHfj7DyLELFWpT/7sSqDnMy/SeWwFC3TDg8SDQZfbmcEiGZDk23jEhHbEde6vXpyyZujHhQr+p+zNHW2oJATxlZdNog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cfzMNb1Zroy+Y+aS/m2yi3bww5l6csoQDSoguqiXWR0=; b=YFAxkhN0eOlz+TjjmW5EzBmSiSlxh/rKxutHFuZGh9UYopccc9LQ+A1VFEAxhlWyf5z068aEuoBOxJVlo7qJKLYcq3eBzsFRltx6rtGMYs33cXvaO7Jo7hX+dhLAW3uH6xrxjPg+VE5y9wVLWDFEEzeQLiKrslihc48tVYoZVvRxp8JUrKIO0VhO+AThy0/VufSqIWsJDxhtMWm855cV9UR02yhAaHkozS0I6nIIJtUK+wrYNHljm5TbqmQ7I4zMDbdDV4keC34ya5V8aC1MZGaq6MrHYDAxyIHMVNpBXx1KOoX8wA1Axz95meH91n4ztRFPKGVAf19Vm3hANnRVJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sealevel.com; dmarc=pass action=none header.from=sealevel.com; dkim=pass header.d=sealevel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sealevel.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cfzMNb1Zroy+Y+aS/m2yi3bww5l6csoQDSoguqiXWR0=; b=JLPG7QTUWVYD4YxDgVFcGKEAZf+UmTIT/g7m5uKEuV77BwDie7urdwojprxAwsYFgqNUwE7mSGggEGHzZDUVaw+eTOq4IVw6ddGnPLkSsdofSTiBe4wABVcXcqcElKpoU9PSwaoqU0pXXpWaaStQkOcFvIBAWGrPc2tdG90/WVfLOUavIm4aV4r8g9OvJaHQCyHGHS9FPF0F5ztLharTl4I6KqxqlyGjHznDrIXpupTysP4m2uQOWFGj3UMCmyWxqO3JN2hc6Q5yzmXiARTyq6KqRzprqYlvCnqn8jGyjvNujEjstAdaRHpuAKz0J6M4xs3j0uKGCJVem/YfL05BVQ== Received: from BY3PR05MB8419.namprd05.prod.outlook.com (2603:10b6:a03:3c6::10) by BL3PR05MB9236.namprd05.prod.outlook.com (2603:10b6:208:38c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.20; Fri, 22 Sep 2023 14:22:13 +0000 Received: from BY3PR05MB8419.namprd05.prod.outlook.com ([fe80::f4e4:1bc5:23f6:c9d4]) by BY3PR05MB8419.namprd05.prod.outlook.com ([fe80::f4e4:1bc5:23f6:c9d4%3]) with mapi id 15.20.6813.017; Fri, 22 Sep 2023 14:22:11 +0000 From: Matthew Howell To: "gregkh@linuxfoundation.org" CC: "linux-serial@vger.kernel.org" , Darren Beeson , "andriy.shevchenko@intel.com" , Jeff Baldwin , "ilpo.jarvinen@linux.intel.com" , Ryan Wenglarz , James Olson Subject: [PATCH V8 2/2] serial: exar: Add RS-485 support for Sealevel XR17V35X based cards Thread-Topic: [PATCH V8 2/2] serial: exar: Add RS-485 support for Sealevel XR17V35X based cards Thread-Index: AQHZ7WAtWot3rpLtukS7TUxTtMVPmQ== Date: Fri, 22 Sep 2023 14:22:11 +0000 Message-ID: <4c6c4e3212a929822ec6a8ba09691b465541f648.camel@sealevel.com> References: <7f7016dbad5eb0770bf4653dcc87ae0f8963bf44.camel@sealevel.com> In-Reply-To: <7f7016dbad5eb0770bf4653dcc87ae0f8963bf44.camel@sealevel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.44.4-0ubuntu2 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=sealevel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BY3PR05MB8419:EE_|BL3PR05MB9236:EE_ x-ms-office365-filtering-correlation-id: c56ed071-3996-44a7-ff9f-08dbbb774fe1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Vp+sdaHFgl6lAl8GwWYuAxpMupFTS/edu5k6KALrIT2wODGueGmmNHRHn5xP6gTOe6cttdQjHQE0HlNN7J9t9MsKg7rVugXP61DL04L50fsZaF872cVx8WOxM/fH7QPZJxB8kxfOaE9s1w5HDyvBd49U8W/1p6Hwg3/VaLQ66gwS/iwLlQBlSIXCPe4bSb9D0Qr5m8Xth/w4V2b1GMTsY2k/6TS3Lp4m3wF+Ot9jycIVsG0FoC2seiao8JlIK6fq8E/4i6gQjLsvQUURaydQqeADUSH6dmaFQHKwK478t8OkS8X9s8+zzDA8iNFPvzCbdsMM1RhfcVRPvshvFcZ7+hZr3xm0WAv7WJSEvlXrnTbUdcAG21raNlnVPfP4XpBGvO1muYQKxoxzbuNrCTl9feVDAcgX44Ch4YA8I3KRJAd2PHsFLco81veLTmG40+tB5qwmMRunn/l21vhO3IdRZUNFdEz6XcFBEDmAZlkw3xtnyxOY42gE3LAjJfTLrWnxxPp2FjzWw/FZFON17eeIYNoQh3A3JjXU0Ju62PmQgA0P4FkYNU7wWUDpzlW8yo3omUdydb5PrAUdzKfSD+8iZCIfm8AHeOZ5qdEGwqi5gseWX0bio5UHKGWCI5/kPNmE85hxnFkACVUXysElLEEThE8P45T9LyVJ0AxC3F8kp6U= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY3PR05MB8419.namprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(376002)(366004)(396003)(346002)(136003)(1800799009)(186009)(451199024)(2906002)(38100700002)(83380400001)(38070700005)(6512007)(107886003)(6486002)(36756003)(86362001)(2616005)(71200400001)(478600001)(26005)(6506007)(8936002)(4326008)(8676002)(41300700001)(5660300002)(44832011)(66476007)(316002)(122000001)(6916009)(76116006)(66946007)(66556008)(54906003)(66446008)(64756008)(91956017); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?QkMFUaeLMYKaAfStcuRoWCwfem1I?= =?utf-8?q?YXXIxRq6qMPQLcXrngUx4nStkBVbmY5hTrjw9RFWfCSs29H87m420zn0QbWyqBw0U?= =?utf-8?q?KGn38Owhy46yaohDXvOrtjkpXJMA2lzpcEqb2gabZx31ZYFNciJ5we6tdftV7suA4?= =?utf-8?q?68rRe/YopKmquZF9VBG7A5C7VVZCj12+i0sTdyDejday6up2biA4kE4KxuoTFsOHN?= =?utf-8?q?PRzK6uRRtAJbJsllDTNWVAOFMzyFWlU4aCCjEdDWm6bUbGrU7MF2oAfsHIQUFpGT/?= =?utf-8?q?LN07lAte/1vFDu5JlGbdjExnu9qFtY0JyhzS6RruxLKyRh795xa4BO6HvCWwtvE63?= =?utf-8?q?zjYUNV8XLmAyvKvY7jniJZBNxp+lBLfadTVZG093Bl1uCVJCaw8zBGgl3hmdaW8rI?= =?utf-8?q?qYfxIg6ZtXSQjGwgcO0aJBB+LODV2txG+qlv3ruTV2LJqVzBp93HS7JTg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?= =?utf-8?q?CWrRGMcOEM5G7kqzRiDkPQNJ22sKpic0KjylaQM/gcDJH3OhmvgPfhYA67gfVxapC?= =?utf-8?q?HPEA/tzCNB9sJ+9uI40/T2X5DlgWae4OWqq4Bd/PMwXYuexXi3kegVwTMmQ9Fant1?= =?utf-8?q?CsjjQqnDkbg+sTjBhDNX9w75QwWm+kGbvqg050JJMPFmcoxeKgtcjKPE7bxreyOFU?= =?utf-8?q?w29/eGEFaXrvC42ohRGDw0tRUvm0RrZjAw=3D=3D?= Content-ID: <2491154DCFFF0943B68811CE3589D8F0@namprd05.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: sealevel.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY3PR05MB8419.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c56ed071-3996-44a7-ff9f-08dbbb774fe1 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2023 14:22:11.8662 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: e34c5615-b4e3-481c-abc8-602581f2e735 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vluasZKFcMmuisWSB5JWlqq7qfzDjGN2LM0JdJu+eRRvCRRZDjMtSKLApGSqrXSP00NFcxQKVWqdWngUVIqtBu07XwJ8Vu/2xzkGwUjyuJ4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR05MB9236 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Matthew Howell Sealevel XR17V35X based cards utilize DTR to control RS-485 Enable, but the current implementation of 8250_exar uses RTS for the auto-RS485-Enable mode of the XR17V35X UARTs. This patch implements DTR Auto-RS485 on Sealevel cards. Signed-off-by: Matthew Howell Reviewed-by: Andy Shevchenko --- V7->V8 Added space to align text in sealevel_rs485_config() Removed unneeded empty line. Switched email clients. New client was adding the in-reply-to header in testing so hopefully threading actually works this time. diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 3886f78ecbbf..8ab80447fe8c 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -78,6 +78,9 @@ #define UART_EXAR_RS485_DLY(x) ((x) << 4) +#define UART_EXAR_DLD 0x02 /* Divisor Fractional */ +#define UART_EXAR_DLD_485_POLARITY 0x80 /* RS-485 Enable Signal Polarity */ + /* * IOT2040 MPIO wiring semantics: * @@ -439,6 +442,44 @@ static int generic_rs485_config(struct uart_port *port, struct ktermios *termios return 0; } +static int sealevel_rs485_config(struct uart_port *port, struct ktermios *termios, + struct serial_rs485 *rs485) +{ + u8 __iomem *p = port->membase; + u8 old_lcr; + u8 efr; + u8 dld; + int ret; + + ret = generic_rs485_config(port, termios, rs485); + if (ret) + return ret; + + if (rs485->flags & SER_RS485_ENABLED) { + old_lcr = readb(p + UART_LCR); + + /* Set EFR[4]=1 to enable enhanced feature registers */ + efr = readb(p + UART_XR_EFR); + efr |= UART_EFR_ECB; + writeb(efr, p + UART_XR_EFR); + + /* Set MCR to use DTR as Auto-RS485 Enable signal */ + writeb(UART_MCR_OUT1, p + UART_MCR); + + /* Set LCR[7]=1 to enable access to DLD register */ + writeb(old_lcr | UART_LCR_DLAB, p + UART_LCR); + + /* Set DLD[7]=1 for inverted RS485 Enable logic */ + dld = readb(p + UART_EXAR_DLD); + dld |= UART_EXAR_DLD_485_POLARITY; + writeb(dld, p + UART_EXAR_DLD); + + writeb(old_lcr, p + UART_LCR); + } + + return 0; +} + static const struct serial_rs485 generic_rs485_supported = { .flags = SER_RS485_ENABLED, }; @@ -744,6 +785,20 @@ static int __maybe_unused exar_resume(struct device *dev) return 0; } +static int pci_sealevel_setup(struct exar8250 *priv, struct pci_dev *pcidev, + struct uart_8250_port *port, int idx) +{ + int ret; + + ret = pci_xr17v35x_setup(priv, pcidev, port, idx); + if (ret) + return ret; + + port->port.rs485_config = sealevel_rs485_config; + + return 0; +} + static SIMPLE_DEV_PM_OPS(exar_pci_pm, exar_suspend, exar_resume); static const struct exar8250_board pbn_fastcom335_2 = { @@ -809,6 +864,17 @@ static const struct exar8250_board pbn_exar_XR17V8358 = { .exit = pci_xr17v35x_exit, }; +static const struct exar8250_board pbn_sealevel = { + .setup = pci_sealevel_setup, + .exit = pci_xr17v35x_exit, +}; + +static const struct exar8250_board pbn_sealevel_16 = { + .num_ports = 16, + .setup = pci_sealevel_setup, + .exit = pci_xr17v35x_exit, +}; + #define CONNECT_DEVICE(devid, sdevid, bd) { \ PCI_DEVICE_SUB( \ PCI_VENDOR_ID_EXAR, \ @@ -838,6 +904,15 @@ static const struct exar8250_board pbn_exar_XR17V8358 = { (kernel_ulong_t)&bd \ } +#define SEALEVEL_DEVICE(devid, bd) { \ + PCI_DEVICE_SUB( \ + PCI_VENDOR_ID_EXAR, \ + PCI_DEVICE_ID_EXAR_##devid, \ + PCI_VENDOR_ID_SEALEVEL, \ + PCI_ANY_ID), 0, 0, \ + (kernel_ulong_t)&bd \ + } + static const struct pci_device_id exar_pci_tbl[] = { EXAR_DEVICE(ACCESSIO, COM_2S, pbn_exar_XR17C15x), EXAR_DEVICE(ACCESSIO, COM_4S, pbn_exar_XR17C15x), @@ -860,6 +935,12 @@ static const struct pci_device_id exar_pci_tbl[] = { CONNECT_DEVICE(XR17C154, UART_4_485, pbn_connect), CONNECT_DEVICE(XR17C158, UART_8_485, pbn_connect), + SEALEVEL_DEVICE(XR17V352, pbn_sealevel), + SEALEVEL_DEVICE(XR17V354, pbn_sealevel), + SEALEVEL_DEVICE(XR17V358, pbn_sealevel), + SEALEVEL_DEVICE(XR17V4358, pbn_sealevel_16), + SEALEVEL_DEVICE(XR17V8358, pbn_sealevel_16), + IBM_DEVICE(XR17C152, SATURN_SERIAL_ONE_PORT, pbn_exar_ibm_saturn), /* USRobotics USR298x-OEM PCI Modems */