From patchwork Tue Nov 14 09:33:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikanta Guntupalli X-Patchwork-Id: 744409 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 4A894C4332F for ; Tue, 14 Nov 2023 09:33:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232480AbjKNJde (ORCPT ); Tue, 14 Nov 2023 04:33:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232369AbjKNJdd (ORCPT ); Tue, 14 Nov 2023 04:33:33 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B0F111C; Tue, 14 Nov 2023 01:33:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C/A3zqab1tcHeWoVodgha2R7UiV92ITzYucSgSlti8DHP10L4J9txSBNNMMGV02UwQPYawLp/x91nfCpMoFxnTADRlh/qH2fnDguRbLWUi/hBbMpdqaI0EzbgbOeV9DZ20kJ2xdlSAvy3Bxl6W7X8+aKGx7IBl3qNPdSxuUF4vBZPFXA7n4umNt76tRyDxGw9AX4JMOAEkGQ1ZTWvpZ6tMHlNbREfiiwnssi38FqlaYIWiCFGDoYnAZAPOYI0XjIQsqWAWBD7lWSiAe9GK/35ya0XuLGjlMBszJyYNfFau//7PsclIxxTfWa9d+tPPXUD/AsZNYhwW4+OugzfTVlsg== 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=YN+9zIbxJYVwBBnBE59b380ioHPB9hnguz01SImruDQ=; b=Go5O8PMDgBBJmrmDyHSIzEGjGxPJCQgboqDt3WJ3Jq9XBC8YHneSjI5QOo8dn4rW2gMdx9909HxGV6a0auEGArYV2OTJGopxLh34V7wbIw6RJ6bw6VAx9kS9aFoSZk5C2cvahQH/bZ1Jf5ZQSFPPk9vL3QmCUoQV7doFMEWaPkSeSJriHfkxO4G0ff2yLqoY+epXBf9YG8pl6tp60LpzJespklOB1xT3B30VFyB4LC6Lo2wtavrU+l36nWDo2qdyPHoqF0HG5rzlWuV3nXJVVUvQw1JpOkDucqGYAapVZ+Lqtz9EEOfWuS5irkoDN/rlBbi3whsW1a4hgizE5kqP4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sunsite.dk smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YN+9zIbxJYVwBBnBE59b380ioHPB9hnguz01SImruDQ=; b=UQX57LlKig/SG5/fgHsh9hj3ojZcyA/huDTDbTSqvDUWJ3AcoDV19b61AvXzU5BUaySve/M01/rkryL7Qv0L35Im6WzWAeXqzGVw7ZwHvBBtXRfIGTPHUV35lDM6YrNOXZfcoC57MDHoWyAwvhyqtjJlfVVJ33duCb/NUIAGhAo= Received: from CY5PR16CA0021.namprd16.prod.outlook.com (2603:10b6:930:10::27) by DS7PR12MB5862.namprd12.prod.outlook.com (2603:10b6:8:79::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.29; Tue, 14 Nov 2023 09:33:27 +0000 Received: from CY4PEPF0000E9D5.namprd05.prod.outlook.com (2603:10b6:930:10:cafe::9b) by CY5PR16CA0021.outlook.office365.com (2603:10b6:930:10::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.31 via Frontend Transport; Tue, 14 Nov 2023 09:33:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000E9D5.mail.protection.outlook.com (10.167.241.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7002.13 via Frontend Transport; Tue, 14 Nov 2023 09:33:26 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 14 Nov 2023 03:33:25 -0600 Received: from xhdsgoud40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Tue, 14 Nov 2023 03:33:21 -0600 From: Manikanta Guntupalli To: , , , , , , , , , , , , CC: , , , , Manikanta Guntupalli Subject: [PATCH V2 1/2] Documentation: devices.txt: Update ttyUL major number allocation details Date: Tue, 14 Nov 2023 15:03:02 +0530 Message-ID: <20231114093303.2718141-2-manikanta.guntupalli@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231114093303.2718141-1-manikanta.guntupalli@amd.com> References: <20231114093303.2718141-1-manikanta.guntupalli@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D5:EE_|DS7PR12MB5862:EE_ X-MS-Office365-Filtering-Correlation-Id: d856ee46-da42-4f08-55a6-08dbe4f4c13e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TP/QadzqFRra85M48N55Q4YOKmqZSPXfNlv7UT9EV2IVDu4Hl32ZRnug84rUdgA+0q9MjZduhEw0vNmSPkFueZwA+yM8yFiUX0jA/5oR5ilwy4y8hI5qi16jcbiFIXansrmeimqDJRMk4NqP3zYr1Z4XykwK0n/QTvmMznllnVJfWK7jZVHC8vR+cZQUj6GARNmv18siN023CdzKeXJAUcvH9ZmsFVlOIQTTsGKw6xobfOqIJYqKxraXijQSvT8VczohKCA9wdE4v+ZBU44GKSPTa3cUcplkOa/wRBuidd4dwxEEMcSKt5y9b3mhhgzBcAMt1QXlpC++1ypNeNJuX7pssDdwBkU4MemI2CZRFMRMTa4YYamjacnvluYLM9OwN4X5HbIuS4YvEwZBSD+rxQCKMRxcoXaoAPywMTIow2ouxTgsnQJIF3s3el/0Vfhqpq+h97VMkgVdp4BzhHYag2LsDbw7J9mFq47dohGRRTFR5gINYWCstw6E99FQlycTtXqYgk2IApQHaZMfnLhpKYuo2Ctft7emq4j3tvAnCvco7CcqmMSiSz01PC8rLq1at7eClfRyhvP1uNRfLwYCyytC3TopFPKgzbphmPAtv9vY8yngJ0E03jA/Rlzzp/ErdgrXYkOkt0EpdhbpgOvSoJNkybDHDwBj3F7vV6HyfIVitGO9q4/Peuo7wi3CtizP2659+9QcdYxubJdPzOD8AadCKDEhN8Id1k+GkZ4DWLYhOKa+ni+RhTsLaHQXUP88qz1K1DL56LoMixCowHSMU428y/0/L7QJGbgUXi0wf/l0HACx9w26LeycRG63GIdrDLaHyx+MJS62oR69rdZ3CA== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(346002)(396003)(376002)(39860400002)(136003)(230922051799003)(64100799003)(82310400011)(451199024)(1800799009)(186009)(36840700001)(46966006)(40470700004)(54906003)(70206006)(70586007)(316002)(83380400001)(82740400003)(110136005)(8676002)(40480700001)(8936002)(4326008)(478600001)(81166007)(36756003)(6666004)(356005)(44832011)(40460700003)(7416002)(86362001)(5660300002)(2616005)(921008)(4744005)(1076003)(36860700001)(2906002)(26005)(426003)(336012)(47076005)(41300700001)(2101003)(83996005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2023 09:33:26.7204 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d856ee46-da42-4f08-55a6-08dbe4f4c13e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D5.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5862 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Describe when uartlite driver uses static/dynamic allocation for major number based on maximum number of uartlite serial ports. Signed-off-by: Manikanta Guntupalli --- Changes for V2: This patch introduced in V2. --- Documentation/admin-guide/devices.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/admin-guide/devices.txt b/Documentation/admin-guide/devices.txt index 839054923530..d2f2c9f436db 100644 --- a/Documentation/admin-guide/devices.txt +++ b/Documentation/admin-guide/devices.txt @@ -2707,6 +2707,10 @@ 187 = /dev/ttyUL0 Xilinx uartlite - port 0 ... 190 = /dev/ttyUL3 Xilinx uartlite - port 3 + + If maximum number of uartlite serial ports more than 4, then driver uses + dynamic allocation instead of static allocation for major number. + 191 = /dev/xvc0 Xen virtual console - port 0 192 = /dev/ttyPZ0 pmac_zilog - port 0 ... From patchwork Tue Nov 14 09:33:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manikanta Guntupalli X-Patchwork-Id: 743972 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 87CB1C4332F for ; Tue, 14 Nov 2023 09:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232502AbjKNJdo (ORCPT ); Tue, 14 Nov 2023 04:33:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232505AbjKNJdl (ORCPT ); Tue, 14 Nov 2023 04:33:41 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F65A1BE; Tue, 14 Nov 2023 01:33:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dIJzcpP3MqmFMwiE0ghPH5dyD0xwwadjYhLbPXdji0X1QbX378N7Dv6N4yweF5aCHnX0IDkMbGVrCjbnOzUIPyvVszfgAvkRoHBdkpzgTjcVhnaXMi+diD3JK6stJkcB+xjVEPdiJ9fOdLFf+od6Vj2P3BrbzN2IJ71zciJHlQtmOOrJX2ZQXPmOrjXYuz1yJyY5nZzEhGIigNE35d7ynpSN3MVbT/nyNsocu8t++plMzJsLMscDd6O4IKcg7P/9sYxxaFIF9nb+HkIum85wPPNtOMFKw9ZTV104HHmzjkE9J+8/rrx0bCR5ioRC+uUgIgC8qUpcyGR5uZBtzQY8fQ== 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=wf26LuPwMrrCLn4aSWXWgoaHGclFRYNi2o0RKZWR4vE=; b=CyPRwL6IRTzA7wIPBl4dzmMowwOsmrxpKhCW1L9KQF2XEwBXoLrQiqmI201Yi81SamNh22o/SvNqUySi45Rrq/tXvf7QoeqxDPKkhLhmz6FrTktfX+eN6fwkLaNR7/N3VkSxRq02yCMe4Pt8K/2mgsR/wmvMd+x4zZIo4We6xp3UOPdphMi4Xr4/TcKfRUIFBXzOUdLa5fVTOurPsNHUHHdc6mqrS4sGdk5jZo8Nb5jxbfBmnbiJWNmopCVZuQKhddiJ+n0oEiMIhZi8uZsyPHJ5pjCAX/P//zn4ccroX5p1xxga2W76mpXOTjpua2EisGmue+aJLtCLBb4cJ+/iaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=sunsite.dk smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wf26LuPwMrrCLn4aSWXWgoaHGclFRYNi2o0RKZWR4vE=; b=Jp29hjQlybwkC3pH1Cba2+Q/BV+0oZ/wbtJ+JJNS+BV3DBEx8KZ6VU4rrTouoteTNNDgr2GUEQerITBdiYZing7Z0I4dwXXKp0z9E7WT4aIz9qQInkMmXlF3zW4o5E6ngBx4tsjj2bkvySuGU2YuIzyW5uJ4ZA4fh14g0wKEyYc= Received: from CY5P221CA0162.NAMP221.PROD.OUTLOOK.COM (2603:10b6:930:6a::28) by SJ1PR12MB6218.namprd12.prod.outlook.com (2603:10b6:a03:457::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.31; Tue, 14 Nov 2023 09:33:33 +0000 Received: from CY4PEPF0000E9D6.namprd05.prod.outlook.com (2603:10b6:930:6a:cafe::4c) by CY5P221CA0162.outlook.office365.com (2603:10b6:930:6a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.32 via Frontend Transport; Tue, 14 Nov 2023 09:33:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000E9D6.mail.protection.outlook.com (10.167.241.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7002.13 via Frontend Transport; Tue, 14 Nov 2023 09:33:32 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 14 Nov 2023 03:33:32 -0600 Received: from xhdsgoud40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Tue, 14 Nov 2023 03:33:28 -0600 From: Manikanta Guntupalli To: , , , , , , , , , , , , CC: , , , , Manikanta Guntupalli Subject: [PATCH V2 2/2] serial: uartlite: Use dynamic allocation for major number when uart ports > 4 Date: Tue, 14 Nov 2023 15:03:03 +0530 Message-ID: <20231114093303.2718141-3-manikanta.guntupalli@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231114093303.2718141-1-manikanta.guntupalli@amd.com> References: <20231114093303.2718141-1-manikanta.guntupalli@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D6:EE_|SJ1PR12MB6218:EE_ X-MS-Office365-Filtering-Correlation-Id: c7e95a56-c706-4ef3-22aa-08dbe4f4c4de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LBoeoClLeflPZlAX517oUW2rQmcupotq+hXSBMQKWE9JMcSMYdqO4SIM6y/OVoUhGalbGf5loNKgvdzFCwfD/HNenCOhD0rVop2K/1jex4OJXeJlmih/7qSNlBbocIuwGaYt91UJhyhxyUY0bAcZoDqhDxhkX2H+7SBzC/HIjDkx+1Nd2C8MTPKel2yVAuzqwHhvAAZihe5IQgb73hJqHswgIlozi7ZJL9Y3JYLWKZ1k2fvP8qArN0W+xOvF7dTNn1M9iOkhDWAmAoHUsba+SCSoADRPxHZUlG2c1usXrR/L5CYTcv4ZB5/N61iyLGOH8ZneJwyPp3Ad4KuvSFJT0v5q1bidtwudA15ZGT84nK2oncNEbJFpYzgFqmuYQbE7ESc4GmUIUM469hTQbzTD78GFV9UYx65qlPK4KYcu1NU9e3mpevyQkWPbA/JyqwWr5oOmr8wR3IH6CyNbpBYTa+oJikzzugC1zxy/kdvaGHzZx3DNTynoSy3/oxr/AHz95C4IUXuXck7snysQyqF9I9K6ryTrCD/t5Q8kA+BRdyXUJOmkYUh9MqGDwZscbXbcTb2hmR6Y3wlTnTOXe3NvYEk86k/t4vozZIMhJCuYApwmVVUP1nhLJa5vzFi+slEwlwuDMuzaHmfZzOjcw0ijfmXEIiC1wl1ys4vrVd0QQ4QBHZrlvmQTBUknrOQSxfHdPpSbEB7nmhu+jr4/CanbkN4A/umSDELhoLGvUqUTNhNCN4RczNhQuk+zg2RBvain5bxW8RrdOmaYo/pxbAB8+xO6JXv0808qDbJOTuNDXl3509Q+328iKvWQym4oMbM8 X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(396003)(376002)(39860400002)(346002)(136003)(230922051799003)(451199024)(1800799009)(82310400011)(64100799003)(186009)(40470700004)(36840700001)(46966006)(921008)(40480700001)(40460700003)(70206006)(54906003)(110136005)(70586007)(81166007)(82740400003)(356005)(36756003)(86362001)(36860700001)(83380400001)(26005)(426003)(336012)(1076003)(2616005)(6666004)(2906002)(41300700001)(478600001)(966005)(316002)(44832011)(5660300002)(47076005)(8936002)(7416002)(4326008)(8676002)(36900700001)(2101003)(83996005); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2023 09:33:32.8008 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7e95a56-c706-4ef3-22aa-08dbe4f4c4de X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D6.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6218 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Device number 204 has a range of minors on major number. uart_register_driver is failing due to lack of minor numbers when more number of uart ports used. So, to avoid minor number limitation on 204 major number use dynamic major allocation when more than 4 uart ports used otherwise use static major allocation. https://docs.kernel.org/arch/arm/sa1100/serial_uart.html Signed-off-by: Manikanta Guntupalli --- Changes for V2: Update logic to use either static or dynamic major allocation. Update commit description. Update description of SERIAL_UARTLITE_NR_UARTS in Kconfig. --- drivers/tty/serial/Kconfig | 2 ++ drivers/tty/serial/uartlite.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 732c893c8d16..368c63066a86 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -532,6 +532,8 @@ config SERIAL_UARTLITE_NR_UARTS help Set this to the number of uartlites in your system, or the number you think you might implement. + If maximum number of uartlite serial ports more than 4, then driver uses + dynamic allocation instead of static allocation for major number. config SERIAL_SUNCORE bool diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index 404c14acafa5..517f1f34143d 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c @@ -24,8 +24,13 @@ #include #define ULITE_NAME "ttyUL" +#if (CONFIG_SERIAL_UARTLITE_NR_UARTS > 4) +#define ULITE_MAJOR 0 /* use dynamic node allocation */ +#define ULITE_MINOR 0 +#else #define ULITE_MAJOR 204 #define ULITE_MINOR 187 +#endif #define ULITE_NR_UARTS CONFIG_SERIAL_UARTLITE_NR_UARTS /* ---------------------------------------------------------------------