From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 103E4D49C9B for ; Fri, 30 Jan 2026 11:02:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=FS2VuhaGkJ44LEE2DPjToA/T9BjsUReY2WTeDZbcbR4=; b=cRCzdSFt6hf+9HzZTl2VW0bz+5 D2t/AQp2zWF3q02iJ+cK+1A6nO5LSlcnG6iFdqa895FyaQrtIeCmoHyE3XslM5LrUGpqSPALBrXGz izywhUfquiJmkyKTCuBzxJtFgEJi+N4xwlS9+/SIKBp7WB4E+3W2NdOnELIGyDWrxWFfPGWebF7Vy jPWabCHUqb5QXe6+YoGEfUuE4YV8XqqrmrFdNmb7y4cqY1MAG3N9D8WsxPNGkDSTiQi5HKXvAsoC3 qW83dov1i4DpStWcWi/5lI77RcNl+ViVeSUpZ5iJAW6r8HOPExoYZ610BmpRAbLeloQUZz4L/wTPb e7Co+61g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vlmGm-00000001MuC-3emv; Fri, 30 Jan 2026 11:02:32 +0000 Received: from mail-westus3azon11012043.outbound.protection.outlook.com ([40.107.209.43] helo=PH8PR06CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vlmGj-00000001Mti-1fIg for linux-arm-kernel@lists.infradead.org; Fri, 30 Jan 2026 11:02:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=P54izOkfa9fqZPzAI+OV5Tumvmekg3EBWsPcadzZZ30d23dI4ChMLtyoeoK94ViAacqcTqdPQwRTHC572y7Ic+tXHmuHKxwnPKPGwM4hWpYdOtOngrPl2a0HSYqnhWsUVY50AEs9HskS1/resOdUxLWoAjdcgfitPX3VlEydvU0WWAxH/ohqO4f4I6hhdIRofMLom0owE7B9CUiNc4fBsIpjbkBi0t3sQi5paI8Q5q7OjoGX42+tAICQHYyfoc5HHqQPfnEtGNoUvQnOBkRyW+F1gn/PppmOAsXtdaKvUQRrYTbB1RaZdcwhiEV+6rcST/qtQAY90U/iFyglWOZrRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=FS2VuhaGkJ44LEE2DPjToA/T9BjsUReY2WTeDZbcbR4=; b=eZU0r0PCQkNfO8iCZNnLdsrz32G0Kb5AJ6ma2PcdMAcwPMfWJNhptxVsCgRqlgO4nVx9PNeJMDi+GU51KGlj+lzQGczt01IJYxEkztWim7ssitqhHJ4zKogz3DUai/6BuqoKZnwTRhFmu2hEcMvEm/IyauftAhvllbqpu5+QpyFbR3JlvmbH336d2ZDJ99RHA+z3HQj0J2b85+hnMKysVWGyOVmDJ/uyRf+dShVvqeu/hNPV8RI17cfd95Vl+a2cq7w2Odgq0ZzmL/YA5sxXip9VNzUqyhjw8CKnyFZSYMBX80vxX9BkuM+9xrVQaJt7RZvpmJa0BaXfj+/gcs4qSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.194) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FS2VuhaGkJ44LEE2DPjToA/T9BjsUReY2WTeDZbcbR4=; b=W//95De6rR+71INP2CZcvLJnsBpUY647tYeKlAUbk7yUBzALvMZMKajufH8hgWmdMKvl0w2sWU0Aof7UXkOd+7+PUX5weWOgwbPqIe6adLEgmmNuLGggGOYD9JdyqdOvHzNfUgkF0iLFWQHyHOPo5FLyemwWgch1P2B3LKYK3Io= Received: from PH7P220CA0135.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:327::35) by DM6PR10MB4234.namprd10.prod.outlook.com (2603:10b6:5:21f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.10; Fri, 30 Jan 2026 11:02:24 +0000 Received: from SN1PEPF0002BA4D.namprd03.prod.outlook.com (2603:10b6:510:327:cafe::91) by PH7P220CA0135.outlook.office365.com (2603:10b6:510:327::35) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9564.13 via Frontend Transport; Fri, 30 Jan 2026 11:02:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.194; helo=lewvzet200.ext.ti.com; pr=C Received: from lewvzet200.ext.ti.com (198.47.23.194) by SN1PEPF0002BA4D.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9564.3 via Frontend Transport; Fri, 30 Jan 2026 11:02:23 +0000 Received: from DLEE212.ent.ti.com (157.170.170.114) by lewvzet200.ext.ti.com (10.4.14.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Fri, 30 Jan 2026 05:02:22 -0600 Received: from DLEE202.ent.ti.com (157.170.170.77) by DLEE212.ent.ti.com (157.170.170.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Fri, 30 Jan 2026 05:02:22 -0600 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE202.ent.ti.com (157.170.170.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Fri, 30 Jan 2026 05:02:22 -0600 Received: from uda0498651.dhcp.ti.com (uda0498651.dhcp.ti.com [172.24.233.239]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 60UB2HBd1204392; Fri, 30 Jan 2026 05:02:18 -0600 From: Sai Sree Kartheek Adivi To: , , , , , , , , , , , , CC: , Subject: [PATCH v4 00/19] dmaengine: ti: Add support for BCDMA v2 and PKTDMA v2 Date: Fri, 30 Jan 2026 16:31:40 +0530 Message-ID: <20260130110159.359501-1-s-adivi@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4D:EE_|DM6PR10MB4234:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c6f5870-52ea-49e9-b826-08de5fef0c2b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|82310400026|36860700013|1800799024|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?TnQmLa+sEqqZJ7G6l95ZgxfXP7MAVk6gYT9QmTotrTMt9mQ0/frEihlVKKRv?= =?us-ascii?Q?+b5UNLiMIxtzC49MmUz0iDYyLVqWDD+hw/16Jdbl2b3EK3d+9UVIgoG09Dvw?= =?us-ascii?Q?DoH4VFYls88N8ZLFey3/UvpVW2SMlBy0TnortRmUzjFA8rmEekvQbNUqN/t1?= =?us-ascii?Q?amwpQYVlE/cPl+kDUHK93ItD9wWdKvwEX7HSi26J1pNmeoiHdChYxg22yH1G?= =?us-ascii?Q?/ac0Y9he20qaWM3aVx7KjKYNLuxz123e46WdsqPGlSxypSTAnE3UPMTjqwHR?= =?us-ascii?Q?Sdn6Sm9jAes+QPEr4xbIhK42/iSRIPWNnH3kTQ3oNoa3OWffYPZ5WqfkInt1?= =?us-ascii?Q?l/CA1diukLo1kCoOJSkfJEIyt45MVk2ch/A3UfV1T5s2Hh9A6lP5xANSW8KW?= =?us-ascii?Q?FvBNPqNvVpNzzMppAjiP7xYLtFGwu58WGUaEMFHwaZfySGjAmGMkWNp/HXyi?= =?us-ascii?Q?rGsbSAMjyLmPh769B2llhgkoGAMh3cjuFf4eLMhTQuNfo34nHRkn1CZ3kIxe?= =?us-ascii?Q?bNRxUwUu2sY5lvuf1jzJScIzEh3wOiTGEfVSLbkbZ6F4jqMEbt+RzV3MVBx+?= =?us-ascii?Q?kfUBkmz/JWlxLQ+hCBPNk7Q/bmO/JnzgV2oBEPCgPDXoacawpmUoTdGZ1DZQ?= =?us-ascii?Q?FcpnCqY8HU2F0O2WApitUFYh7+HjVZ6mUro5cE/7II1F5y1+achlgJtvgUEn?= =?us-ascii?Q?Wsd8ff5fwNnVt6PRiVeVe+9vLT/CK/YuQ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J1x/z14bweQ70dXy7bPyArmvN7FePXLOXLL2JRfJJz/uFLH4E1?= =?us-ascii?Q?/+D5DSt3IwMRYHs7cQ175boCEGE=3D?= X-Forefront-Antispam-Report: CIP:198.47.23.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet200.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(7416014)(82310400026)(36860700013)(1800799024)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /LRyfkXQfs/9mZ9bmzOSg9UAc8aBoNWddbuKrqk26d7js6XRYz6i4ZBxRipKrsHMM6y2Ygx4Jevk1mXUEHokjjxHXjm2eZbO0gbr7hIdxRC3TFjlDVC+a3tfKNOdR7R9J+Eoyxvzvaj9SLtMDDX5/1GaOWze8QrEmacnE4URJtEwOnjciAkIobvLxLmLqIDQqMMDsibhmrdiiu1pVb5CZIycrdQK5pNSJn0cxvuej4DOb3U2bffkthglJ+NYSJE6pH4v8TGp3TTP66ht9paOglJAE+ZLX9g6OEA9AKPRRyDVU6GqThtiJ2Fbsxs2YlG7fzWMPLbSMxZBT1ip3ea+UKCW+A4LRtqQDcwQz9I3EcZmpugaIWHmS9Ms4Y1volhbRQaY6QgNoa0Pp3E0cKrujdOfim0nXCzaaT0/GvNbbfXptjsmxbzlAlrDydqP5qWp X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2026 11:02:23.8577 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c6f5870-52ea-49e9-b826-08de5fef0c2b X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.194];Helo=[lewvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA4D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4234 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260130_030229_437858_21AC0D2F X-CRM114-Status: GOOD ( 20.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds support for the BCDMA_V2 and PKTDMA_V2 which is introduced in AM62L. The key differences between the existing DMA and DMA V2 are: - Absence of TISCI: Instead of configuring via TISCI calls, direct register writes are required. - Autopair: There is no longer a need for PSIL pair and instead AUTOPAIR bit needs to set in the RT_CTL register. - Static channel mapping: Each channel is mapped to a single peripheral. - Direct IRQs: There is no INT-A and interrupt lines from DMA are directly connected to GIC. - Remote side configuration handled by DMA. So no need to write to PEER registers to START / STOP / PAUSE / TEARDOWN. Changes from v3 to v4: - Rename the dt-binding files to add "ti," prefix. - Update cell description in dt-bindings and add client examples. - Update k3_ring_intr_regs reg names - Rename soc specific data to bcdma_v2_data and pktdma_v2_data to bcdma_v2_am62l_data and pktdma_v2_am62l_data. - Add a new patch [18/19] to fix a null pointer dereference issue when trying to reserve a channel id that is out of bounds in udma_reserve_##res macro. Also fix logging issues in this macro. - Add a new patch [19/19] to switch to synchronous descriptor freeing to avoid running out of memory during stress tests. - Fix checkpatch warnings. link to v3: https://lore.kernel.org/linux-arm-kernel/20250623053716.1493974-1-s-adivi@ti.com Changes from v2 to v3: - Fix checkpatch errors & spellings. link to v2: https://lore.kernel.org/linux-arm-kernel/20250612071521.3116831-1-s-adivi@ti.com Changes from v1 to v2: - Split refactoring of k3-udma driver into multiple commits - Fix bcdma v2 and pktdma v2 dt-binding examples - Fix compatibles in k3-udma-v2.c - move udma_is_desc_really_done to k3-udma-common.c as the difference between k3-udma and k3-udma-v2 implementation is minor. - remove udma_ prefix to function pointers in udma_dev - reorder the commits to first refactor the existing code completely and then introduce k3-udma-v2 related commits. - remove redundant includes in k3-udma-common.c - remove ti_sci_ dependency for k3_ringacc in Kconfig - refactor setup_resources functions to remove ti_sci_ code from common logic. link to v1: https://lore.kernel.org/linux-arm-kernel/20250428072032.946008-1-s-adivi@ti.com Sai Sree Kartheek Adivi (19): dmaengine: ti: k3-udma: move macros to header file dmaengine: ti: k3-udma: move structs and enums to header file dmaengine: ti: k3-udma: move static inline helper functions to header file dmaengine: ti: k3-udma: move descriptor management to k3-udma-common.c dmaengine: ti: k3-udma: move ring management functions to k3-udma-common.c dmaengine: ti: k3-udma: Add variant-specific function pointers to udma_dev dmaengine: ti: k3-udma: move udma utility functions to k3-udma-common.c dmaengine: ti: k3-udma: move resource management functions to k3-udma-common.c dmaengine: ti: k3-udma: refactor resource setup functions dmaengine: ti: k3-udma: move inclusion of k3-udma-private.c to k3-udma-common.c drivers: soc: ti: k3-ringacc: handle absence of tisci dt-bindings: dma: ti: Add K3 BCDMA V2 dt-bindings: dma: ti: Add K3 PKTDMA V2 dmaengine: ti: k3-psil-am62l: Add AM62Lx PSIL and PDMA data dmaengine: ti: k3-udma-v2: New driver for K3 BCDMA_V2 dmaengine: ti: k3-udma-v2: Add support for PKTDMA V2 dmaengine: ti: k3-udma-v2: Update glue layer to support PKTDMA V2 dmaengine: ti: k3-udma: Validate resource ID and fix logging in reservation dmaengine: ti: k3-udma: switch to synchronous descriptor freeing .../bindings/dma/ti/ti,k3-bcdma-v2.yaml | 116 + .../bindings/dma/ti/ti,k3-pktdma-v2.yaml | 90 + drivers/dma/ti/Kconfig | 21 +- drivers/dma/ti/Makefile | 5 +- drivers/dma/ti/k3-psil-am62l.c | 132 + drivers/dma/ti/k3-psil-priv.h | 1 + drivers/dma/ti/k3-psil.c | 1 + drivers/dma/ti/k3-udma-common.c | 2577 ++++++++++++++ drivers/dma/ti/k3-udma-glue.c | 91 +- drivers/dma/ti/k3-udma-private.c | 48 +- drivers/dma/ti/k3-udma-v2.c | 1472 ++++++++ drivers/dma/ti/k3-udma.c | 3095 +---------------- drivers/dma/ti/k3-udma.h | 583 ++++ drivers/soc/ti/Kconfig | 1 - drivers/soc/ti/k3-ringacc.c | 188 +- include/linux/soc/ti/k3-ringacc.h | 20 + 16 files changed, 5402 insertions(+), 3039 deletions(-) create mode 100644 Documentation/devicetree/bindings/dma/ti/ti,k3-bcdma-v2.yaml create mode 100644 Documentation/devicetree/bindings/dma/ti/ti,k3-pktdma-v2.yaml create mode 100644 drivers/dma/ti/k3-psil-am62l.c create mode 100644 drivers/dma/ti/k3-udma-common.c create mode 100644 drivers/dma/ti/k3-udma-v2.c -- 2.34.1