From patchwork Thu Dec 19 09:18:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larisa Ileana Grigore X-Patchwork-Id: 13914870 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F12EC222571 for ; Thu, 19 Dec 2024 09:20:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600061; cv=fail; b=FZBevQ/QVKNDWwAiBlFgKRIxC1hT0ee/P6dQWgtL1k+sYtyh1e/7/EpLYVHR7h/v7lEMGQZLHoBCHXdcFSzt1g/dHD3ScbvlM/mD+zwAXIumKGwFnDj5DfRofmA1BLOaugx1H6d6s1JcCnJ2Cl4sh8zjJ+GsPITxHbn+738JvAI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600061; c=relaxed/simple; bh=8BhD0/fjnNlsUFzT3o5yEf/BMFJaWaTfKPf3WYocHFg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=lNblDoGf8B5oe9MtOIkrTLQRs8f9Kpc3JNwdFcFY9UT2zCb1wjeOiMdMiaY6TYQ4mbGra1PgRYWk3tDOnqNRiXwN5rBGg576uBYmJ8Pg9Ay5YQf7eDR24cyx5bnxcsHSmGcaT5xjouVE/0K8WF5SUZ1awph5x5eNsR6TX8P86xg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=YZ/Ro2XS; arc=fail smtp.client-ip=40.107.20.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="YZ/Ro2XS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v+TZt0CCdpjMYkofz/Ro164cSFZWN6lmzTPqTkpuJWuaHz9zixQDZW29irI2IODj0+ZaIGUVZNZRfJyj+wpp13RPvn6xXGTIKp1f89fEJWLxwhlMpp2gu87BwFNWPvRwN0KSG+fK0kSUDhPFpfxkHVwifGYUDfLmCL/VzJaiwSXtVI0BbQI7f5YgL9ZwDUHPU+MRy1SuHoZ6NICxCOROWtlcYxEopxZ1UgzNGV7lIBAIpw8Ct39XDKF6o1uvNC0RKdCajoy9y2lIQ+MzcmVzgR5gnpR81frVZ6PwxB9EdofJ34u0CGXzGKTtql8lrvWx+u8Q3DDoLkESOCici8K7cg== 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=vLIJ+7nBBLog/Fi2pEuYSaG/9xdVGhxe8g8HDmS8MA0=; b=YdNFLPuGIBy9+fPlAy+JqBDPDcEK9UJbJL9RpYAvrY1S3iRrhk7bSxLUO5Ed/gIW+5pk231WhP8R3U+u7+Htyd/u7WwOELpfVnCStfa79AO5ttl2CZRxFRlcbaq0UepITaiPJInwTsO7dw/6qjoLTcRicQA8pz0sr56xvUL0KQyRs8XhhLrgr7wGSWwd4+9AuWUFiaTuYZqlaiHgbdunfEUTHSOlaapQhckIFplghN8YKIzcEQgzCTKNTA649VHjM8OZYdmrCjHfisGpbwOHgcy2xwTLwa2WibRSClIAEvIlT94wWTqBo6jawXtA1eYAE+FmEJSZSJRMVJnuS7Lk3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vLIJ+7nBBLog/Fi2pEuYSaG/9xdVGhxe8g8HDmS8MA0=; b=YZ/Ro2XSWvj7r+NQptlesdcC0Yol9B5q5DnOol+tsL6kRZQpdGoSLxt0MKjj0zPg7B7hwVJk+vx0x98f3W3cH8jXkfDcjRqTv8cW0S7LNFutn5/mZ4Lbt6FaRl3PpzmMYxmU1+d7eGhiDF5u9/aYg+ECuI7xCabY7whnqg8TyKff6+By1GRFXGEXjVdcsMnXJKgJ4kLCdGCJy7IckYhA4qUvZNEKhY4TQfh3+s17lTbYD9El/5k5N9dJr85DUPKtJ3wzVIb3/oRgNcYnRCJU2YdWU0kqxS5Dfr1j/fVFNVwTe8GmxFBFMbj+IuSG9lu/TAZN5odVQ8xACALpgL9YJA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) by VI1PR04MB9834.eurprd04.prod.outlook.com (2603:10a6:800:1d8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Thu, 19 Dec 2024 09:20:53 +0000 Received: from AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7]) by AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7%6]) with mapi id 15.20.8251.015; Thu, 19 Dec 2024 09:20:53 +0000 From: Larisa Grigore To: Frank Li , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH v2 1/6] dmaengine: fsl-edma: select of_dma_xlate based on the dmamuxs presence Date: Thu, 19 Dec 2024 11:18:41 +0200 Message-ID: <20241219092045.1161182-2-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> References: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0208.eurprd02.prod.outlook.com (2603:10a6:20b:28f::15) To AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9550:EE_|VI1PR04MB9834:EE_ X-MS-Office365-Filtering-Correlation-Id: 2832f585-ca06-46ce-f385-08dd200e6feb X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?rTpJGRqCCSC9gt/QgAa/xvcyFkasXTK?= =?utf-8?q?S38tId7QczlO29jgPwcVIS1Oq4QPMI4Xmz9pz29XhO7esfZphDbVF5rqeN4Cy5AFE?= =?utf-8?q?sq0Ikq8gD0tFEUQCE0ywvHvOfd2lVavAucrOmqlaegT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AM7y/Gp?= =?utf-8?q?bEGtkeSLBOOvnWZ7JsNu7vv06NhZcbgAAH+uUw/ALkiVCAqfcl2Lonse5RmtUG5E5?= =?utf-8?q?EsSWpBE8xmnrd+q+OK5U5TWJRgmc5pY8AN0xZCv6rgbABODWYOAUe0cvn/rKrE26w?= =?utf-8?q?W3ZiC1d6AXsIRtakb4gGclSbXkSJ+nj5zgNd0KrI96rztn2CKllpfC/TxxNVDA5Cl?= =?utf-8?q?TlkAQbg1IQuGUbUW2TXLxLdxMmqrnLEQwqeeX3kXJBT1bLI9VKkzqDIO/P6+1JvoX?= =?utf-8?q?4i1hMJWVN+V80/NT09wI0zFovv52fK7rLRP+5vpD448VZotujFTwUVKP0HxpQUbdb?= =?utf-8?q?IfWEtPqbWA2/?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9550.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0bA7v4TcJlqRy+CbBNXJxWo9NPKF?= =?utf-8?q?S0ICk1yAjrSslKHvzdMjknYwpyHuZq6U6bbGgCcO/CkIstDd2OAIcJL8lCZ8MShLo?= =?utf-8?q?jUY+0aBb7QYbxTcnc8azdsmRsNXC5U0r3Al18hn17PwFe89/7Hquic10NdhOjbtBI?= =?utf-8?q?dwb869jKwRxtZAdUmpb/BEUcY5MBktwRNKrl5QVvLfTqvwnJ1/B4qunTns+JEelzC?= =?utf-8?q?jSMZ6krX95rCrnD9VNOQmlNEZJaV8MzgsuxxBnKjFLUB59aVNHvGQ0pXlb2VUbYoB?= =?utf-8?q?MR8dnJMzv98VbKrrKIOah2CxahskSiOx1hVIY/JrPQYvN8fPTN53iTh/dAYTepSFW?= =?utf-8?q?i+LvoG/My9jJ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bSO4k0X8y0ad1+xrv/XCpYZ7/AHn3ZiDYH9Pc+tx+ZUFxbiAx?= =?utf-8?q?aD34Xe1DIaEkVLTVkhrxmJQpZEhkONdD05S4BCOdiax/0eUorAgAjF5I6IGH3pDg5?= =?utf-8?q?GHi72GpukxB9Z4aQ82ug77ld6P1EGmMnG1CGvxZLBd+vaWZUq+8lTRoE60QKP1kSc?= =?utf-8?q?bWQoINOIF8tkjGk+ik5nSHFI8It+eMBF+FWiMdoIdJeLYLNgsQQAm1pXD0w4xaODu?= =?utf-8?q?cDDvWA05Gt1WmFUhYNau7qjUxLvDBXMVKYzzKaVgSn06kqQI/HqTBD3hQRk8qnVBr?= =?utf-8?q?nIx5MHrlI8Zw?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2832f585-ca06-46ce-f385-08dd200e6feb X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 09:20:53.8180 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: m4oi/wVB/bLGfsWrVXtHXrZWNaXMf3h7Cc2KH87T+vt1HCQiY3gbNZv0M6+K3LyMBlIKJVRcJPXW7W0eMNVIRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9834 Select the of_dma_xlate function based on the dmamuxs definition rather than the FSL_EDMA_DRV_SPLIT_REG flag, which pertains to the eDMA3 layout. This change is a prerequisite for the S32G platforms, which integrate both eDMAv3 and DMAMUX. Existing platforms with FSL_EDMA_DRV_SPLIT_REG will not be impacted, as they all have dmamuxs set to zero. Signed-off-by: Larisa Grigore Reviewed-by: Frank Li --- drivers/dma/fsl-edma-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 60de1003193a..2a7d19f51287 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -646,7 +646,7 @@ static int fsl_edma_probe(struct platform_device *pdev) } ret = of_dma_controller_register(np, - drvdata->flags & FSL_EDMA_DRV_SPLIT_REG ? fsl_edma3_xlate : fsl_edma_xlate, + drvdata->dmamuxs ? fsl_edma_xlate : fsl_edma3_xlate, fsl_edma); if (ret) { dev_err(&pdev->dev, From patchwork Thu Dec 19 09:18:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larisa Ileana Grigore X-Patchwork-Id: 13914871 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41F36222571 for ; Thu, 19 Dec 2024 09:21:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600064; cv=fail; b=k36DZX1/t13T1QHxTOMHa5W5sFfANznS+BY6rFqKrqUTeauEhvJE1NHdMTvkKHzkqejdvAl7MFvm5Heh5VwswOi6xnTonM7XA2FF+NClcl7r4fKs74Vez/3hVC8eDf11avvzg1Uwehbs4xKke0Lnv94FaJz+1Czo6mA7IhqRQao= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600064; c=relaxed/simple; bh=98XY1a7JJVwiXnOcAyieAc4D9SnwiEirbyAuDC/CiBM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Za3WIGP5QRwqqLq02gAEkDvdkJpbHW2fUr7P/kOPmw6SS4W9BrDfphx2vD+/5V6tCizTIaovUfpATgNB9q1QU0k5dFb9zuLGL+g+qAh107Fn41wt8+xKRvMDEqxWfEYDceIngc1xXZM83f+XoUb7zdCMAPhWjv28NagmLyYzpKo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=b3HT/8LD; arc=fail smtp.client-ip=40.107.20.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="b3HT/8LD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CKfRgk3oeG7G9cmgCsImTtkuENHpWDjGqF9JIVZ4bnRGBXRS2jPQnRnIw8RjKOUnOlIrejiFmuA/ucERbUfDt2gzMOtTp+CzgSdw2aRkGbEggD65WOOWMm33Zyjg+8cwyl4jkjzGVqZvIrC2OxDThRe1qcwdT2iRtLTcqxx2XgF45iatxnVOHwf8FKR8mb13WQ26LvG8Z67vOARaKdIX5GLRsB1d1Qq7nN9vgFiGwM1mhrTcbIh499IJs9D5Qa0QHngcHNOw6Qady3iK8jm/UwoQK8+aQcLqk2wvxsFDFWDC8eThGtAKx7NOuFBpJwubwQ+FxLWIAm7CsVTS2xCS6Q== 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=9CmmJJtzZ4GKvoSl5NZeQ2TTqc2zau2UVovMX1/ogI0=; b=W/w3FxJ4StDjAo0D+Hqa88IuJ2mQGm002uFvBjeEnQ8mtkbLsNn4uoIMlVLkrlUZHzurOrBoIosp0OkpmgSXltVagkuaBu+BpnoSWyHtKJUd6AtRGAYzYiB5UI1XzA6wnCB4y6PdkQmpsFxAyJ65vLcC74K5EzazlX7WKwR1ar2JhyEVr6D6YV7t44C3VEuzeURZYR6QSerlnVTS48ZCDyRp9PBbd4qVtIc+xe+t/LfcNBVfXRNqxuAVDKO6ejo/m4cinjYQXG/qfn7R02rft9bsx0NSnYLEVbOV0diLcjKSFpzXYr7CkbZeqelvJi+OWMKc8AZVSJcfosGLm9FBvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9CmmJJtzZ4GKvoSl5NZeQ2TTqc2zau2UVovMX1/ogI0=; b=b3HT/8LD8xmvXnyYl8/jV9M8A5w7nTvwG8qp/MY6pMs1uS6xcpv9jzVGGHJl1FejQ+GMiEezzEZ7m0jLmIe6zamaMat4LKdBPMuTjne3daS3LKGgZye4U1voci4W25cJyOjwU6U2Cxtkk6bdWrKlarPhnTMN9RtuBerngEyADHyUkcmKOy0MclGzJ9AGwtyPNoN7hZ9hVeAbP0IjrT0RU1fhjrml6aAEyGlNrLuMFbqwvTh1YAZSG7QtRUAQwLKJH5M0s3jKKkVl+hXNWYhOlrTZcVthwOPSQE+nudhpwUMOsAlwCq/H+5EBYwVHBFQ7td7tJYR2Y2CQEN1s/G02RQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) by VI1PR04MB9834.eurprd04.prod.outlook.com (2603:10a6:800:1d8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Thu, 19 Dec 2024 09:20:55 +0000 Received: from AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7]) by AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7%6]) with mapi id 15.20.8251.015; Thu, 19 Dec 2024 09:20:55 +0000 From: Larisa Grigore To: Frank Li , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH v2 2/6] dmaengine: fsl-edma: remove FSL_EDMA_DRV_SPLIT_REG check when parsing muxbase Date: Thu, 19 Dec 2024 11:18:42 +0200 Message-ID: <20241219092045.1161182-3-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> References: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0212.eurprd02.prod.outlook.com (2603:10a6:20b:28f::19) To AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9550:EE_|VI1PR04MB9834:EE_ X-MS-Office365-Filtering-Correlation-Id: d2e6194e-e954-4e3b-f61c-08dd200e70ea X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?PUTAKUJOnHn59TWKeZJZjHPnus7lO7J?= =?utf-8?q?QZMsFzOFm6YUtik1+m3OTapoHRK3US6VVr+n1yao04RqMuCRqw2rHa2zHO7rM1H88?= =?utf-8?q?DAD3l7SJLhbHgJ1VQd44tMFYDpmgs1W8ftqM9cR1k1nM/oxCnBNDC8xJDi3j84gUi?= =?utf-8?q?j3E3m/SY8MAIH5ipGJSNYEldWDe7Jy3w4PtAGGyqeFMdNxd+LvteTggFMucPXx6WK?= =?utf-8?q?SigfZrW2nIGhZH9DFY5Es5IQ1NzM47gXy2BNgOkHUg/UWZs1HL3g0WcPpyIt+LRbS?= =?utf-8?q?7KN2kvjzZB0Qt5aiqxxlI1D7U+gibdvj4i7lSLfzYJBVQbaIDrGfZsEa0Id8XO1PB?= =?utf-8?q?5Q2SsbB+pbhRmI/q/ZXpcKd6DS0xGUE7wGegOdbBYDo5au+RfMUCvOGoBeCRyLLxa?= =?utf-8?q?4+Ak2eQUA7hpDQ27mydj1pilNNi91NXNcTkdBdJ6js1xzObBYS8LYkgUxrE5EWqdk?= =?utf-8?q?1qZ/OqvmaCavOC5P+U6L7Ojnhp514NYP3iV5d9I2ED1DpY8boszigAH6ovueaNvgd?= =?utf-8?q?bZL2fRnbE0KtzBaH2+qVG3iTYCpZKthSNiPNi7VJU3Yaa1x/yBdKIVXbxNm+Oark0?= =?utf-8?q?Z+JU5GQd8f8sKXOshDrFIMhNvf4zqy0D8MwobGzgT49pzMhrNmw889CL3JNRX4Ewg?= =?utf-8?q?3KSIuxL96RZujb++wsmfGGJ9AZBxJzoJBqD+48Sg8s+J9lyU4ydjjD0ZL8Sp5s1Ch?= =?utf-8?q?w/fmhfdc//kVbXL+maW+scWCf18oD4+zLWxB7ppRTXbfDd1wj0Jlga9RPCltDRGJx?= =?utf-8?q?k/voIuIzlKWKEtyXmMHVPU4Wv0PwDNbRWPoOJJrDkb0/m5LRh+CuYV2O6GpgGuPdB?= =?utf-8?q?YAoHAkjn1pke7++lZLKo6P/YNSCPWtwrHSR6Y0yAgfPRriZH/KTh0/sBIe1UuQugP?= =?utf-8?q?w46lzb6CaQQQLDlhPQi2zdHl4c/8eKhQwDJB5TReYSoTPJ3GEyInmiPEMWn209mMr?= =?utf-8?q?+s4VDpPD+8/caR7+qEwiOS+lakwXMUu833AFwgjQacp0D+NEWdwGvh8ZcLn9rDLfz?= =?utf-8?q?oSOng27Wi0TnMeEgUnWiswSCUpLcYBlEUvqeuliMngyRzd4qEmeNHIqRw0EUCekRf?= =?utf-8?q?XN3ZMiWtGxB72Xd0GXMTBkUmj1J+/J32DbfVwza8wALxz+TUGcdX0NOsi5u2k5GTY?= =?utf-8?q?KvtFKz7KNWVxC9EPYT+JbqjWONHQ2NaAUM6kVUf2oWz+yXtanJKb9Kt0d6w7iJ0jH?= =?utf-8?q?0kidesgHFobb1OKRyIuvIRYSBrQh8Dx1DJSML7d82s71jvnaeL5yJtyUkZML201Ds?= =?utf-8?q?hy7oQO61szsz+kZBCLVkLYORI8uUcGxI2Ytifw4CS/xYW2f9hi2V6P3fIP1Y9ew04?= =?utf-8?q?IyboPnKMVlcG?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9550.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ETy64Nwr1iMa5oCS4IaEhqa9LF5v?= =?utf-8?q?GRaxYSOZlxHrRFWZIQcB6tJ34AbZ7GnK+8gbXAMvZZfFDo+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yEs?= =?utf-8?q?EUkrDkqd+s+K5fE2gV9fo4+35ExRtpN1hBIg0XLfue4/9TB4GL2V2iqTxBi4EESPG?= =?utf-8?q?2+jLWk37yFfTYBioCpIuuztjf4blnpggxmIJ5XD7zWM9xcj23fuztqzD1V2297Epz?= =?utf-8?q?ZKnnqP5s+t6Vfrnd4fjDT2yxQPc5RSdoIy3EpYG4x8LgFAkEvVeFCxjf7faXXNyCe?= =?utf-8?q?NznzIym/PfvTLBm3ckcTKcauVX9+59jBXXgoB+htocatxGfvWXvUy9iTZRF8kyDct?= =?utf-8?q?09XFOXVHxVJpX6hClp3bzqad9FUEEIhcX18f5icUfmTefY5ccXnlU+zU+Zecv3tKh?= =?utf-8?q?1ccKlnNxoNeoDoL9hHv30L500rxXFaQZoopVJYlp5+9hC1cuvHd8N0mBZlf3n0WT5?= =?utf-8?q?9t/W1EKaGAAHEQ6YdvIBB6FAbh1Vl2G5q3fJ9Jx/D0aock9hkpRK8Fk7NHwaEO7us?= =?utf-8?q?0xqmZYuM48c3CCHDGYyWrHddWLMUN+yB+aMiEKXDP9YdTltCpk7QfxDKH/e1jie0M?= =?utf-8?q?o9IP3BR2T3zveOdhXFaAVnj0Zjmlzfxxzh4gbcVe+78EZrnmzb6Xc8noAdkrdxoLN?= =?utf-8?q?HjPPfR+Jk4S+?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2e6194e-e954-4e3b-f61c-08dd200e70ea X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 09:20:55.4900 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Pbm5icRLRnRSVBOROSKaM8l3LDv9biFxA0sjEMaF+p6iYq9QuXHnDi2iQdqV1KNGkdscdxkfLRPt3fQsykN1gA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9834 Clean up dead code. dmamuxs is always 0 when FSL_EDMA_DRV_SPLIT_REG set. So it is redundant to check FSL_EDMA_DRV_SPLIT_REG again in the for loop because it will never enter for loop. Signed-off-by: Larisa Grigore Reviewed-by: Frank Li --- drivers/dma/fsl-edma-main.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 2a7d19f51287..9873cce00c68 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -517,10 +517,6 @@ static int fsl_edma_probe(struct platform_device *pdev) for (i = 0; i < fsl_edma->drvdata->dmamuxs; i++) { char clkname[32]; - /* eDMAv3 mux register move to TCD area if ch_mux exist */ - if (drvdata->flags & FSL_EDMA_DRV_SPLIT_REG) - break; - fsl_edma->muxbase[i] = devm_platform_ioremap_resource(pdev, 1 + i); if (IS_ERR(fsl_edma->muxbase[i])) { From patchwork Thu Dec 19 09:18:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larisa Ileana Grigore X-Patchwork-Id: 13914872 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07752223326 for ; Thu, 19 Dec 2024 09:21:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600067; cv=fail; b=carOTK1OwclpCFyvacTsUsa9xOIWjMlG/aUB/TUdgyuZBbvuXAxJ4R1SLa0eXbTouddiNBgUzS5kUnF4rkiTp2vAPZyU760Pe77qf55SlWYhglioXLf3HPyx4tn+xjH8+PFvFafTrHrWEJ6rg7AbjlnFT1kHVWuxlzpL66DvtiQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600067; c=relaxed/simple; bh=WsjL2uE4Orn3phprwnKiCUlkr6URGo8bzo7MVbUmtbo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Q7huwcCHuqoG0KcNjN4yyocEOAA04iznR+BDgszq375fHwdOWIeojIzg2LmE/UCbhvnWVglJt84/2ho+TLRFXv7iyMFeoxt1cduFQ3Ls1c3jBEm47bjkLRalA1nK5QmvB8m5D34Mk1HUIpoAjBHgObwWpJovUAKhQEuA4zoUJCM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=FBbsCSOT; arc=fail smtp.client-ip=40.107.20.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="FBbsCSOT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bRfYF3009lpPW0f+3oGEI760f1/o/u0ox730oMVi0ddKzU5FEVUNsFsSiAXKlQb99xuvWCkOx2OLMV9Rcf4qhRXDITTaRV5aIYgAT3HRYqhRLcdLvm2PV7RL8dgwjjqD7NaMeQPPB3F32b7Qy9Q3EjwUYmje30cjuF/QjGL2IW0K0O923r62iW6ZEO1jMeId39IsqU0dbLtqhbgZ/ZwVec5yOsu54beOulq7McUUr3y8o8MSs8gL6dtI4Z5lovcxDEl4nw+7KzQ9u9EsY+mljMkLa0tHM54IoTsyK/zdEwJc6givxwTaeeuUd5z192y2u5o/IzUzKRLKuYCLZwYOJg== 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=UOYniJli5Pkhka8qYxssSA4O6lfU0+qc3aDbK4L90oE=; b=octGXhkHP6Yuqz2/KSFGVR3bLOgm/uwLvn1GQUYIN82DvQKLwDjSU+ZVJSHcMONwkcAYXdCefGxvvt329X5nNXONr2PlyJlvLeTlHm2fEWMDbk3RU7EKWdiIR3J60sv74G9CooJDglYcdSB6+BIqyUA+AgI+2FaX+EkKOoDkrFRWbYnr6SY+T7UMK+gp+mHQa9DVXMTb6NSymDv7fcbwLlav8sU6VN9f/jpmcxXTY7mck5KTIkTVfcy3WcLKr5hiqHCkcufkJUTwcQWorNJxEF6jUmG9BwrKg3dIWUDlQr7WHvlSc2zDUqtxT+d0MXLqMN9ibwP4EQ+ozzF/6pV7Xw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UOYniJli5Pkhka8qYxssSA4O6lfU0+qc3aDbK4L90oE=; b=FBbsCSOT61MJxJOoTGcH1Ek0+R93CrolAcD2FRJyGi0EkMzN8xAiev/82nXv5Zj1gkdSqoklhK0YT693gjVJTeysqedgYddoMpwJUuSKKqSuzQi3cDi+EC/6amsK9uC9x1TqrzFPD2KacuTCyFkSGYXypC0bSkZjXfJek6Xo7MzDIqTsB6G5B0VTz8MNj9ZgByhuAhh+g8GECINF7A9qriDJRX1V12Uf6OhwdVUbkKIFsEdSN0G9rltoIou1aO6WeEsaXrgW6DxBYKa8khgBMDfOLJ3K+t2ZWZGGj5XRqkBzN+LPry4vcwOm10Tk6ql4mSl2Eiqo9e7ga8mDlb77Fw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) by VI1PR04MB9834.eurprd04.prod.outlook.com (2603:10a6:800:1d8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Thu, 19 Dec 2024 09:20:58 +0000 Received: from AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7]) by AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7%6]) with mapi id 15.20.8251.015; Thu, 19 Dec 2024 09:20:58 +0000 From: Larisa Grigore To: Frank Li , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH v2 3/6] dt-bindings: dma: fsl-edma: add nxp,s32g2-edma compatible string Date: Thu, 19 Dec 2024 11:18:43 +0200 Message-ID: <20241219092045.1161182-4-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> References: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0216.eurprd02.prod.outlook.com (2603:10a6:20b:28f::23) To AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9550:EE_|VI1PR04MB9834:EE_ X-MS-Office365-Filtering-Correlation-Id: 74fc706e-0118-4015-3f05-08dd200e71fa X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?b23IYyFjFx4gsQjZEDZPihOCVzHk+hi?= =?utf-8?q?aMdQfK12iKchxd1jOMyDnCRLgD7yhIJkCDxF3jZpFZRQnZCqMqGblaYkJXQaVfwe0?= =?utf-8?q?Q1tVX6/X/B96ZjeCetIFrU4MpDVez010c1zyx/fWFm5gAv8LW6NsMNrTtbHwgwpSH?= =?utf-8?q?jfqPqeNQavl9xA6XSvVYkcOQrjlfs9vIodWGBcooBXQ5tHdfs7KCK0kwIzUyLVsNU?= =?utf-8?q?fJf+Hs+tUY7sktH9kEg2x4vR57Wk2Q/RhtV0xjxbomqF4d+tQqxvfvoGzpE+8C3El?= =?utf-8?q?y6f3Q9LZvszMMlcnEZRJnQdRyEvoiXQC703bQpaUoHnGg5SU/3Tq1Hh9Ywl3EHz7I?= =?utf-8?q?11nu12XmdoHpNjV5+1ttwlivQesQPyTzyFED1jQdHa+qJ8S88OYG2+5mZzM6qzn5x?= =?utf-8?q?QRQjEYwRnaWeimwvCr6tc0n7nJhZS+JZ78sa8YB9SQ9Xqs6mvaBqDzMjD9T8wlAhQ?= =?utf-8?q?DUKyT9r+vOVKDBzS4Pfz6khr9i9gEQDY7saDGtxmbzRCPTJSh6TlgMaQcxhFDXkS3?= =?utf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V:NSPM;H:AS4PR04MB9550.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?f6tE8R/y5lDYi2SEXXd2bnzds7PV?= =?utf-8?q?jwRpfIqHGj1nN5DHpTjK+fb7juJ6A9SMdoQMb1sIlrqQuC1lPnYJs5hoKFDXUJNkn?= =?utf-8?q?z/xABMweT2Tp6MmSp43RR1vIZBRylRu0dWON7ipPLiAGqH3mz9B9N7W6G00WTMCtU?= =?utf-8?q?7ln7oZXVujGzy6RXdimo4PTNBkXDpRts022Bm2fCHL3T4HvwuWO1Dug8dnBi6a449?= =?utf-8?q?ef4b8KUMqFMS26hX7uSpjq/mQzzUd5FiGoUt96lZXBEyp+NeS+Tm/6nmY07mUFB22?= =?utf-8?q?s3PJv29KW8EVbCwQ7BGSvkqdIsvyFAcIxOAe5N8OAq+hi1hDd9BaJVlRauj/SxeQd?= =?utf-8?q?bs3Z1Eatkvn+rZEVG3McMgLkL+qVycLW/vv4n9nGtsxNpMCrmC1w5cwS7PqbFhhiv?= =?utf-8?q?y1dGYGWwrrJIYO5hnPJVJR88fRdcWO+FyJp6kIo4mgmgUAI2F88Oyf8tqbbMQmJK7?= =?utf-8?q?yg5vxpbD5XUzKVYsZ3tT26s+7WwoPis5yjeXjoBNqF8qA6pF3pBWCOF90qzOpDiFx?= =?utf-8?q?hXJ9LkhIccNLjWO9tsjVmMaZecKxyMVYB1k5H08I7felcB4o8SaGf68e+4tk7gYhu?= =?utf-8?q?Em/QUfVBig0OiMPlgFGay33cEwTZa6jqCRec8d7luLi4sDUssDqVa8gewLga9XB47?= =?utf-8?q?MxVGVL1YdK1WB7DpuHHw9mwWU14kFwtf3KE7o9ulEoqEQE4dyReI3AGDwy00lVd8x?= =?utf-8?q?IYVURIsz7K97Y95ZWP2ccgSmATgR0TnPNXsVqARy/Kf1rU7bP8AaEkTP6Eqn90j1y?= =?utf-8?q?qvVWBuoSOjom4341R7Ktusx8+pa4W08+mvqaEI6QyCzPB6cIKzOroXgw3EbAufdBB?= =?utf-8?q?9WsjNfCjb0sGUKIfb8U/zBcXG5kcklVc6JxxSMGB3VpNo4CnVn84b81jMWdLjgHuy?= =?utf-8?q?HZmhppSXHwH4MrlD6vN7FRd/+qREffrD/6GBDJWRJ8OOL6HlMYKLzyfnjEBLfwUHh?= =?utf-8?q?Hp0+QP83c3xd4kWxhC86kXMzJbLu8phPOuKz9uz4p7qCipReADsIlc8HFc8E2tSph?= =?utf-8?q?SCFTyUyKzGdifX9SiiTO/kcqqhfU4Npuatt5AmnUzNZzp+4H6+hQ14XB6mI/H7mBB?= =?utf-8?q?r5dv/NOk9bSA1tGnXHHXPkw9p8TTrw6WYVR7EimRJtLdt9wtFfwbiLMCecoVEDlqw?= =?utf-8?q?rIxvyStr4ReYh/Or0yy0N0sE7EWekOPeq7HVSMBNYV9V1kMOVtjrJnbuJgVsrIEoX?= =?utf-8?q?5Qk9dEFv0Jg2WQxEFn0mJWM+KaoIaWBWneZi5EZbly653b3AwHzmgE6P/e5IGZuvO?= =?utf-8?q?NdDJLM+Hez0Hn3FYr2Gl4Ja9FMPhsAeh5rFNa3D7xuTptkV8dGUafEKTj8zxlkTRT?= =?utf-8?q?tAOIrh77G8ZZJ2WAN7EHQT4MExohjdswVC7T3sUq0nKz1C5rGHK2YiGNMgT5T6hal?= =?utf-8?q?yVW9DOusuwK3BtD26Jyy8vmaJ/3mT9czvN5guEBbiB3bkq98yU6jsomzFnVO5/gf/?= =?utf-8?q?MstSXXtYWOtGoxBlAIaZoKk9jH3Iqz0CpJw7JHQNqnXIx82qgylJqgDLDTQyZ/2c6?= =?utf-8?q?a8idbeROKzPU?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74fc706e-0118-4015-3f05-08dd200e71fa X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 09:20:58.2748 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ytloR+1KeQkUlPafCdyGSLEvapYKANTIgg0PQzi4A7cbr3wa6hQEprFNcTNA4GcK97Uv981WS7rq/VsMZQOqxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9834 Introduce the compatible strings 'nxp,s32g2-edma' and 'nxp,s32g3-edma' to enable the support for the eDMAv3 present on S32G2/S32G3 platforms. The S32G2/S32G3 eDMA architecture features 32 DMA channels. Each of the two eDMA instances is integrated with two DMAMUX blocks. Another particularity of these SoCs is that the interrupts are shared between channels in the following way: - DMA Channels 0-15 share the 'tx-0-15' interrupt - DMA Channels 16-31 share the 'tx-16-31' interrupt - all channels share the 'err' interrupt Signed-off-by: Larisa Grigore Reviewed-by: Frank Li --- .../devicetree/bindings/dma/fsl,edma.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml index d54140f18d34..4f925469533e 100644 --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml @@ -26,9 +26,13 @@ properties: - fsl,imx93-edma3 - fsl,imx93-edma4 - fsl,imx95-edma5 + - nxp,s32g2-edma - items: - const: fsl,ls1028a-edma - const: fsl,vf610-edma + - items: + - const: nxp,s32g3-edma + - const: nxp,s32g2-edma reg: minItems: 1 @@ -221,6 +225,36 @@ allOf: properties: power-domains: false + - if: + properties: + compatible: + contains: + const: nxp,s32g2-edma + then: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + items: + - const: dmamux0 + - const: dmamux1 + interrupts: + minItems: 3 + maxItems: 3 + interrupt-names: + items: + - const: tx-0-15 + - const: tx-16-31 + - const: err + reg: + minItems: 3 + maxItems: 3 + "#dma-cells": + const: 2 + dma-channels: + const: 32 + unevaluatedProperties: false examples: From patchwork Thu Dec 19 09:18:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larisa Ileana Grigore X-Patchwork-Id: 13914873 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 511E3223326 for ; Thu, 19 Dec 2024 09:21:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600069; cv=fail; b=sEHjy8DjCYVddVnY0L1LHu6SZkp03baqHfxXoJ+bdfClqZHMMj2SR61a+dnQSh0P3ksyLcSmR36ijcp0qjXOQoK2oWhXx/c1xX00jV6OlMMm3cNaM9ihe3spnT1f1o5xePESCkaam+FH5uhMQPCvUnW7sl/O+GinTMyvFUnmgXI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600069; c=relaxed/simple; bh=HmGCBiXoSrLxJwMM4N4YHRHB1wg19cbqt0DXJEaz1TQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=FeOGi8Ks4GnNUZbQuwh34+e7Qv5pEOjkdYxNlMHg+9Cjoz/QPHPE0qTTmVBPlv7bN9iNN2j9f7Jh1oA5AKMz9sM7vBZyar7b67U/5cZQwtpeCQgRwoNTekdFZu/ThX6/WVanSXYQh1AUmlgqd3MjIUExPi4Grm5eq2r2m/J1B+E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=s0mWOSwi; arc=fail smtp.client-ip=40.107.20.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="s0mWOSwi" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WsN3tEoaj+pAxZAcSiV/xm1vT9/7FxP3rOl4Kp/M+5P4pEiWNbt5XHicd2O4fZEZiDzQp4+Th+QL7dPeGLsml5yR3lynoszhcqdebePTu4Ply0VA3fP/KPzwaghr/KaMOAzNCfEGoxUf8/y0tybSpI0YE7O72QEF26MrwMJe4JB1xSCIHcUbwbBJFXdwGx0G+N4eO+hkY8C688QCnISf1gl6WlGpDWxY4jSqg4fr4bJ2OTYlo3mDv90lpBkm+eJClKK5kklOpx0avxQBgEFGTpkxdGWv3EjuO8BccWID/WHUq5APMllpUVYchkEh4EMFD58sV4Gs8QwWqu/Ty1i9JA== 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=Mc/TtVZP9h6Q5W2GpYNktrmwxyrCTzOZfm5JA7UiZkg=; b=SKRfYFfq4S1nidjF4yvtfYBQBEmIhiGmGDFkG+cJuqA6/wvOXkn4lg/YgltLPrzyrra7bMdd7L48FF/43CJIw5vGGE/dK134Gb8bhHV7Vi06L3sR3sifGYqAZgVFINWfEypjuGrDBEuX4ETeBKbZO1Q15Kl7A9I+WtfUCHhUPr3LyO4uLJPG0Sz5Qy6MQBCvqpN9i40d4pn1u/jJqo+BY/WM5wfAOZLUWNCsp9hGJNr4CbQknDTqt3hnbLFoMACUl/xFpzxOF3IblSEi/mV/2Yr+X7p8hcZE+LhLj9/B1bh/Bucf6vSTutzX1K8W30l3z2FnEgJcMLz94W8A0gxG4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Mc/TtVZP9h6Q5W2GpYNktrmwxyrCTzOZfm5JA7UiZkg=; b=s0mWOSwikFlMkLwCF+/bXt3OXRm95O5ViObneGw58OwXSJPf8eyovmbmlBeGDGki8hPF71Yo0BifAa0uVSka1YuT2jEeJrpHgAs8egdmKwsPy/3b5v3BF9s2cvOEUw/L2l3CcohblzrgU/YikgKILx2KxMxiFef6aZPcu+J6R4peF4ZpVuNWfbQKPta4Tn9PHL+VP6BUYoMHO2N6aw9WijkS+wi2lFU26dCd4CBHX/6cN903UeHDOEOiZddKLjNZuHN2jCx9og+C1TUKkoMvPHZb9GtkoJS579V8+t0Al03lzQ32yLCp/fvjonYLsZn8Z9NQ2ycIG8RuC6MBgAPP3g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) by VI1PR04MB9834.eurprd04.prod.outlook.com (2603:10a6:800:1d8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Thu, 19 Dec 2024 09:21:00 +0000 Received: from AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7]) by AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7%6]) with mapi id 15.20.8251.015; Thu, 19 Dec 2024 09:21:00 +0000 From: Larisa Grigore To: Frank Li , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore , Ciprian Marian Costea Subject: [PATCH v2 4/6] dmaengine: fsl-edma: add support for S32G based platforms Date: Thu, 19 Dec 2024 11:18:44 +0200 Message-ID: <20241219092045.1161182-5-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> References: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0200.eurprd02.prod.outlook.com (2603:10a6:20b:28f::7) To AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9550:EE_|VI1PR04MB9834:EE_ X-MS-Office365-Filtering-Correlation-Id: 96e79252-d310-4aaf-9f19-08dd200e73fe X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: =?utf-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fibN64HYVgR6KSvBBzt+CKfNm?= =?utf-8?q?m5M2v2ZFJtYb8m9sPMcJF37CLcNVJjbLXm11kfN4LSWyzOEwZ9snX0hHjYYk8qWzA?= =?utf-8?q?lotWfbwcK8KE6Vl0Ph3VSm4mTrwEewI3j3MhZ51EXRmp/3/+mY3y8G+2WrEhGALFU?= =?utf-8?q?VcIxUUkLbuxVxkH4g4Chpo6Kj1YAN70xEoYNGNHqYLPL2YtjnVdLyBhEnKqNXtD3V?= =?utf-8?q?aXGsQjaFLg1UnHslK1pyuDfFy0haOp9rw7D3gqc5VlGoTWxNPu2mhVgJRmkBP8E93?= =?utf-8?q?h83OdsROm4mHo8eMtMnJPvBY8K0A1L0NFPuq7jyhn4n5MQ+9vNsrV9sajPSxFS48U?= =?utf-8?q?HJ4n7m968MIRFb79a3demtg981fBvt1EwKA4FZoFlF8cWahndn8PH0iPIi/Epl8oh?= =?utf-8?q?RvmNHdOLh0EMMsNPHzjY3EBOFbxrX+TDaRPMarbZUcKHJabIIdzRobQrpRzxP+PVn?= =?utf-8?q?qWzwShIk9t9f?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9550.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nrVS/wwG7o0fg6a/UIDtjojqfGlK?= =?utf-8?q?7r3BBQ4Bij//Jnu4omHCx+lSj2b9WcBHUB4aHdW0qYgEZZrlW7ZFatGC4qWktp1PA?= =?utf-8?q?kqhlugatg5HpBsGmBGM90zu4eu8OmtdS9AoZzzpSSs0DU+tHGrReJ6QNOCMK4+rU1?= =?utf-8?q?O44zAAPvG59Pei6F/R3PVtfo3/3Zp7U3maGgxpODh/SAfgqTiP5Ti1mUz3++cJtIC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iV5HNDmI37o6onKhq2SwY6GN1rieO3Jmq8A+dYDIQGux74XaTrpDtLqBcyl2Oef?= =?utf-8?q?Ft+m+CfD5GH0SzhmHKimX7rKjX+3e5GgbNF4Fy3aSP4zA1fxe/4Pyi8wwW4ZxQsZ3?= =?utf-8?q?ZykE94a7kE3Cw2WgA+olmz46LDwn5AV7FXs6Gx+qdomyW71JuRvt34kkO8WkCv0KG?= =?utf-8?q?NB9C6TETPq2AE4CQ9gT/uy+xzVljgmPvvE7E0OHJK8VJAHcEnUxpEYEfRUlpXk3o3?= =?utf-8?q?9fI51ZoeeZu+vytWHKr3r9+pa8lNpZQXRHfLabaDow3NEKJMZoNdKrqoAy8NUAAPB?= =?utf-8?q?avSoeZtst/9Z5l2L/m+7wfu1Id/M2JjjiLZYkfLjIr2l33lmps3+dbsIAHZg7CL0e?= =?utf-8?q?O03BXs8xMaUUCpe0PF0fCzTNhhIKbITimsrKV7L6mrCNk/1rixHSVw+grk5Dwarl6?= =?utf-8?q?URGb9IxrGsIr?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96e79252-d310-4aaf-9f19-08dd200e73fe X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 09:21:00.5320 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /uoFSXx5Tq/qnyrmwlfjKMV17i4JXntRA4cjor6qFY97SlSk2b1b5MGkDuBzwJEV3QF58QDCMXCjALGfhwbEsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9834 S32G2/S32G3 includes two system eDMA instances based on v3 version, each of them integrated with two DMAMUX blocks. Another particularity of these SoCs is that the interrupts are shared between channels as follows: - DMA Channels 0-15 share the 'tx-0-15' interrupt - DMA Channels 16-31 share the 'tx-16-31' interrupt - all channels share the 'err' interrupt Signed-off-by: Larisa Grigore Co-developed-by: Ciprian Marian Costea Signed-off-by: Ciprian Marian Costea Reviewed-by: Frank Li --- drivers/dma/fsl-edma-common.h | 3 + drivers/dma/fsl-edma-main.c | 109 +++++++++++++++++++++++++++++++++- 2 files changed, 111 insertions(+), 1 deletion(-) diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index ce37e1ee9c46..707fea4139b6 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -68,6 +68,8 @@ #define EDMA_V3_CH_CSR_EEI BIT(2) #define EDMA_V3_CH_CSR_DONE BIT(30) #define EDMA_V3_CH_CSR_ACTIVE BIT(31) +#define EDMA_V3_CH_ES_ERR BIT(31) +#define EDMA_V3_MP_ES_VLD BIT(31) enum fsl_edma_pm_state { RUNNING = 0, @@ -240,6 +242,7 @@ struct fsl_edma_engine { const struct fsl_edma_drvdata *drvdata; u32 n_chans; int txirq; + int txirq_16_31; int errirq; bool big_endian; struct edma_regs regs; diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 9873cce00c68..c9e3252d0da0 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -3,10 +3,11 @@ * drivers/dma/fsl-edma.c * * Copyright 2013-2014 Freescale Semiconductor, Inc. + * Copyright 2024 NXP * * Driver for the Freescale eDMA engine with flexible channel multiplexing * capability for DMA request sources. The eDMA block can be found on some - * Vybrid and Layerscape SoCs. + * Vybrid, Layerscape and S32G SoCs. */ #include @@ -72,6 +73,60 @@ static irqreturn_t fsl_edma2_tx_handler(int irq, void *devi_id) return fsl_edma_tx_handler(irq, fsl_chan->edma); } +static irqreturn_t fsl_edma3_or_tx_handler(int irq, void *dev_id, + u8 start, u8 end) +{ + struct fsl_edma_engine *fsl_edma = dev_id; + struct fsl_edma_chan *chan; + int i; + + end = min(end, fsl_edma->n_chans); + + for (i = start; i < end; i++) { + chan = &fsl_edma->chans[i]; + + fsl_edma3_tx_handler(irq, chan); + } + + return IRQ_HANDLED; +} + +static irqreturn_t fsl_edma3_tx_0_15_handler(int irq, void *dev_id) +{ + return fsl_edma3_or_tx_handler(irq, dev_id, 0, 16); +} + +static irqreturn_t fsl_edma3_tx_16_31_handler(int irq, void *dev_id) +{ + return fsl_edma3_or_tx_handler(irq, dev_id, 16, 32); +} + +static irqreturn_t fsl_edma3_or_err_handler(int irq, void *dev_id) +{ + struct fsl_edma_engine *fsl_edma = dev_id; + struct edma_regs *regs = &fsl_edma->regs; + unsigned int err, ch, ch_es; + struct fsl_edma_chan *chan; + + err = edma_readl(fsl_edma, regs->es); + if (!(err & EDMA_V3_MP_ES_VLD)) + return IRQ_NONE; + + for (ch = 0; ch < fsl_edma->n_chans; ch++) { + chan = &fsl_edma->chans[ch]; + + ch_es = edma_readl_chreg(chan, ch_es); + if (!(ch_es & EDMA_V3_CH_ES_ERR)) + continue; + + edma_writel_chreg(chan, EDMA_V3_CH_ES_ERR, ch_es); + fsl_edma_disable_request(chan); + fsl_edma->chans[ch].status = DMA_ERROR; + } + + return IRQ_HANDLED; +} + static irqreturn_t fsl_edma_err_handler(int irq, void *dev_id) { struct fsl_edma_engine *fsl_edma = dev_id; @@ -274,6 +329,49 @@ static int fsl_edma3_irq_init(struct platform_device *pdev, struct fsl_edma_engi return 0; } +static int fsl_edma3_or_irq_init(struct platform_device *pdev, + struct fsl_edma_engine *fsl_edma) +{ + int ret; + + fsl_edma->txirq = platform_get_irq_byname(pdev, "tx-0-15"); + if (fsl_edma->txirq < 0) + return fsl_edma->txirq; + + fsl_edma->txirq_16_31 = platform_get_irq_byname(pdev, "tx-16-31"); + if (fsl_edma->txirq_16_31 < 0) + return fsl_edma->txirq_16_31; + + fsl_edma->errirq = platform_get_irq_byname(pdev, "err"); + if (fsl_edma->errirq < 0) + return fsl_edma->errirq; + + ret = devm_request_irq(&pdev->dev, fsl_edma->txirq, + fsl_edma3_tx_0_15_handler, 0, "eDMA tx0_15", + fsl_edma); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "Can't register eDMA tx0_15 IRQ.\n"); + + if (fsl_edma->n_chans > 16) { + ret = devm_request_irq(&pdev->dev, fsl_edma->txirq_16_31, + fsl_edma3_tx_16_31_handler, 0, + "eDMA tx16_31", fsl_edma); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "Can't register eDMA tx16_31 IRQ.\n"); + } + + ret = devm_request_irq(&pdev->dev, fsl_edma->errirq, + fsl_edma3_or_err_handler, 0, "eDMA err", + fsl_edma); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "Can't register eDMA err IRQ.\n"); + + return 0; +} + static int fsl_edma2_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma) @@ -404,6 +502,14 @@ static struct fsl_edma_drvdata imx95_data5 = { .setup_irq = fsl_edma3_irq_init, }; +static const struct fsl_edma_drvdata s32g2_data = { + .dmamuxs = DMAMUX_NR, + .chreg_space_sz = EDMA_TCD, + .chreg_off = 0x4000, + .flags = FSL_EDMA_DRV_EDMA3 | FSL_EDMA_DRV_MUX_SWAP, + .setup_irq = fsl_edma3_or_irq_init, +}; + static const struct of_device_id fsl_edma_dt_ids[] = { { .compatible = "fsl,vf610-edma", .data = &vf610_data}, { .compatible = "fsl,ls1028a-edma", .data = &ls1028a_data}, @@ -413,6 +519,7 @@ static const struct of_device_id fsl_edma_dt_ids[] = { { .compatible = "fsl,imx93-edma3", .data = &imx93_data3}, { .compatible = "fsl,imx93-edma4", .data = &imx93_data4}, { .compatible = "fsl,imx95-edma5", .data = &imx95_data5}, + { .compatible = "nxp,s32g2-edma", .data = &s32g2_data}, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, fsl_edma_dt_ids); From patchwork Thu Dec 19 09:18:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larisa Ileana Grigore X-Patchwork-Id: 13914874 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C1EB223326 for ; Thu, 19 Dec 2024 09:21:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600071; cv=fail; b=WpLEhlYUN3cBRimODjXkF08ljfCPEKduFodkzyOFhR/DVqnbowfr/YfSTL/CPdv0MGS5FaLPESbv7y6nIkSPQdxakCsA/FZIgzFe59G/eQPXuuyEDsB7Ea5fD6Z7LI20sdJQNGQXszkYmyLa03eexn2P7Ktvro+yGZSNuNTaIhQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600071; c=relaxed/simple; bh=+EQjfRbS6pUksXCoo1RLf9J4Wu9HOahBDCktosA7hy0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=SvZ9tHp0mNcG7UHjdnKJSKr1DbsZ3/V0jazDwtU+sLXNlxPH9t+c6h9jt8bHO3Ow2Q1o6vLtG3FkvkGPnjUW4k5PbhuafB0i2kSKMuG73m9kMvUhuHhpOn9V0H8FOoWa5PxGjRPJUlf5EwRxyqcPXQi6fNIHdH4FX8l7urxDX+U= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=GrJFfMg6; arc=fail smtp.client-ip=40.107.20.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="GrJFfMg6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ldpCLxh54JxCuu4ptsTYQdoHoG2mOtLriPLMcHHhp7clOP5IUVSxOzRg/RFPV2tsnSZ0UdctYichqD4GJY7Fv+DHG793JOHTBNmKdJIjzSwlW7j0ztfakHbJb+Brn0YJScXKaQ4Pb338E/s02WqHnDFkaJ4WnNlFd3ijea08drIHgf8k8XihRwWOgZmBdd63pm9kUsHZN+zfosvM2V7oAR9WMpdVCmB+9/FL3fZU8b6cem5HqctiZhTfkULAo4j7PLDRh8VvtQYoJwTGK/WWHd1KcO/+HYhPUcTwSMaFMZf/6vYX2wmaiNSMhqcKMvf7DHHOpsmfaslNhnuGPgJavQ== 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=Pfq1ciCyrr52NINz2DKlSeJUJzmw6YcZSgtL8D3O6LI=; b=AQzsHZvRlU7AojBpFX9ZFf5FvkA7Cf8Pp/XT8jdZ30/WquwdY4V8Ywr2lA9vrG+4AX18gYyET5X0DdjQhMYAJu/+06nW2MXqRJDU9aCeKJNsTrKk2SIRV9tbtFymw7RIX9+uVkNs+3s2rNS/QhfWFx/4f8mJ2ugYWYhYR/g8lBr1qtt5ittGNqrSCbPxWs/+9nvyEChraZeMjXr5aItu0J66V+PUEQ6pV94WFnRlJ9uzAaOs1gEwkYqUh6DBAztgknT0dCQhQo40oo8CZNQWje8opjmJNnAXxaLGysCez6Cn1rtE3sKG/Jkkph1iQPXEblNF3RI7oOVFBacuiFWgkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Pfq1ciCyrr52NINz2DKlSeJUJzmw6YcZSgtL8D3O6LI=; b=GrJFfMg6jwZRFvhzRROukKyY1qgZhL2fZAgHGgFxrDkfL3p7pa6j71fTHJ8+ZtBIPR5/JWcnkE74OzKVLTjbHZBLGBhqG7H3kk6+KiBLxNL9cMDQClIWlfeDa1kRZXBcAfhpqVZ2GOl+GWPO8uKtzcHaayBWbIJGyF3I9JjYheaXjYFGs6MEhbqS1LT5NLbuU1opO80S/pzjyn9KbTviEP1IbCr+bfGmNOCYZIN/m/+JEikVZbdTWjBiNDw+mE3jD3wPWNpoOSDyfzs45pQFS+Sji5/s+Ij4iOh5sdDO+QRKGrU62AGkPa50g1xB3asNUB5/Oa/9sdyVYzyUnUOtxQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) by VI1PR04MB9834.eurprd04.prod.outlook.com (2603:10a6:800:1d8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Thu, 19 Dec 2024 09:21:02 +0000 Received: from AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7]) by AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7%6]) with mapi id 15.20.8251.015; Thu, 19 Dec 2024 09:21:02 +0000 From: Larisa Grigore To: Frank Li , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore , Alexandru-Catalin Ionita Subject: [PATCH v2 5/6] dmaengine: fsl-edma: read/write multiple registers in cyclic transactions Date: Thu, 19 Dec 2024 11:18:45 +0200 Message-ID: <20241219092045.1161182-6-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> References: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0225.eurprd02.prod.outlook.com (2603:10a6:20b:28f::32) To AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9550:EE_|VI1PR04MB9834:EE_ X-MS-Office365-Filtering-Correlation-Id: 54ac90d9-32ae-430e-1472-08dd200e74fd X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?R5uEmSzeoY1QPSKR0rh/AuPfMiwqvJt?= =?utf-8?q?nDw6DmzX0svG9u+jRZGdQhh1cux/zp9VZhTAgH9N2ZRJgKl7aCz4cdOs049Y+9pSp?= =?utf-8?q?BMa5BBzf/qxy2oT0vB0o4uhxFEzTx03eWZlLJn/+N/OCWyWQ86re0XNnySFXESX3c?= =?utf-8?q?Bl6n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GuxZ1uDL+JNleF97jA72PMQGlGbZ0iM9xrA8q4hWqOhHenAEFCAP0V?= =?utf-8?q?qyGo+rAUl4ZS9ox61n2izvhprE48Ky8cCx8Gn0t1nN7d2G62iW57NXA5l7uyz8TNk?= =?utf-8?q?z34Gy7ihtHoptKfvByOMc5WQPPVaFGeQf6zRi8lmRY8mR5TAFA2GoA0GFRaf1Sh+o?= =?utf-8?q?vmdhtwuq3Du1hdPuBYBuhgMRgKqv7aq9kXWAvzo5LngENcPdmA0gM/TL10poKRaa7?= =?utf-8?q?+uSdOUv1HOwDQCFHhgcL65zXG64IWILyU3LmVy+l7pNqm7rv5eXDnUvC9BdANCmGf?= =?utf-8?q?D1y/T4SdyNWN?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9550.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?orN0qf5fWNCcQHfF+zeAu+AfhM3N?= =?utf-8?q?AKHcVikWrRA8FffmkNjD4EEV86rquCtDzsZFfCikXriM+GQYvQAZcwzSX6FKij8mu?= =?utf-8?q?9bOhuBvn048/tZz8kn9pnlk83Tyfeb8yi+U3+0K80cR4VP7k7a6pQjLNmEgoL4Ami?= =?utf-8?q?V0bbor3/PnBDLBrPZ00I+UdBnDoqcj7MWBbjC+iiKGiv+lJL36wplYkNdZdlo2tSy?= =?utf-8?q?0wbJ3lDDAAtH/vwnKioECaofNZ+5UZBFN25cIJs+IH/1JvDdlMf4EvhksWwGApXxl?= =?utf-8?q?hczJD73WY3u2SRGYQsIUEVaWrbXYVyCt0WiEQXSlgg3MfEvbPwBxzsXh0FQ2IZGcs?= =?utf-8?q?yUpzPPtzfoDCur6eu5WHZi73el0P8a/BO9SmB4whLizN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XAO3ExYjjOj4QfnJPQQldS?= =?utf-8?q?55n0cY3jrAw/RW3t1Sq9wRf8o+3gS0JmeTk6ravNXP6WvHw+QZys9dnu1Dnz28EBv?= =?utf-8?q?qAcFaFrWzPbmZC6lW1BukwcmUPaS9kYzhfNJEXv6dql+9+590JCGjRxIQT+Wm+Poj?= =?utf-8?q?OCJHWj81qOD28YW6u8N7SBm6SQ7uHghGOf33m4t3ADVKtXqkkbgs0kGTFEatHTwz3?= =?utf-8?q?o4A9F5HnPcPc+VWyPUp65aFzJOcNNv5Payeq3DnvrE2SUoU3PMgz2fizFMbsALcEb?= =?utf-8?q?Yy3gq0WPa6It?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54ac90d9-32ae-430e-1472-08dd200e74fd X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 09:21:02.3034 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w24pyLzG8/GG1arIup8M3lnECbA2U1FWVmJIg/65G+YpMkcnuljKJZJkRdEPoolaavQl4MtCn8VADU14SA19oQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9834 Add support for reading multiple registers in DEV_TO_MEM transactions and for writing multiple registers in MEM_TO_DEV transactions. Signed-off-by: Frank Li Co-developed-by: Alexandru-Catalin Ionita Signed-off-by: Alexandru-Catalin Ionita Signed-off-by: Larisa Grigore --- drivers/dma/fsl-edma-common.c | 36 ++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index b7f15ab96855..443b2430466c 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -480,8 +480,8 @@ void fsl_edma_fill_tcd(struct fsl_edma_chan *fsl_chan, bool disable_req, bool enable_sg) { struct dma_slave_config *cfg = &fsl_chan->cfg; + u32 burst = 0; u16 csr = 0; - u32 burst; /* * eDMA hardware SGs require the TCDs to be stored in little @@ -496,16 +496,30 @@ void fsl_edma_fill_tcd(struct fsl_edma_chan *fsl_chan, fsl_edma_set_tcd_to_le(fsl_chan, tcd, soff, soff); - if (fsl_chan->is_multi_fifo) { - /* set mloff to support multiple fifo */ - burst = cfg->direction == DMA_DEV_TO_MEM ? - cfg->src_maxburst : cfg->dst_maxburst; - nbytes |= EDMA_V3_TCD_NBYTES_MLOFF(-(burst * 4)); - /* enable DMLOE/SMLOE */ - if (cfg->direction == DMA_MEM_TO_DEV) { + /* If we expect to have either multi_fifo or a port window size, + * we will use minor loop offset, meaning bits 29-10 will be used for + * address offset, while bits 9-0 will be used to tell DMA how much + * data to read from addr. + * If we don't have either of those, will use a major loop reading from addr + * nbytes (29bits). + */ + if (cfg->direction == DMA_MEM_TO_DEV) { + if (fsl_chan->is_multi_fifo) + burst = cfg->dst_maxburst * 4; + if (cfg->dst_port_window_size) + burst = cfg->dst_port_window_size * cfg->dst_addr_width; + if (burst) { + nbytes |= EDMA_V3_TCD_NBYTES_MLOFF(-burst); nbytes |= EDMA_V3_TCD_NBYTES_DMLOE; nbytes &= ~EDMA_V3_TCD_NBYTES_SMLOE; - } else { + } + } else { + if (fsl_chan->is_multi_fifo) + burst = cfg->src_maxburst * 4; + if (cfg->src_port_window_size) + burst = cfg->src_port_window_size * cfg->src_addr_width; + if (burst) { + nbytes |= EDMA_V3_TCD_NBYTES_MLOFF(-burst); nbytes |= EDMA_V3_TCD_NBYTES_SMLOE; nbytes &= ~EDMA_V3_TCD_NBYTES_DMLOE; } @@ -623,11 +637,15 @@ struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( dst_addr = fsl_chan->dma_dev_addr; soff = fsl_chan->cfg.dst_addr_width; doff = fsl_chan->is_multi_fifo ? 4 : 0; + if (fsl_chan->cfg.dst_port_window_size) + doff = fsl_chan->cfg.dst_addr_width; } else if (direction == DMA_DEV_TO_MEM) { src_addr = fsl_chan->dma_dev_addr; dst_addr = dma_buf_next; soff = fsl_chan->is_multi_fifo ? 4 : 0; doff = fsl_chan->cfg.src_addr_width; + if (fsl_chan->cfg.src_port_window_size) + soff = fsl_chan->cfg.src_addr_width; } else { /* DMA_DEV_TO_DEV */ src_addr = fsl_chan->cfg.src_addr; From patchwork Thu Dec 19 09:18:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Larisa Ileana Grigore X-Patchwork-Id: 13914875 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17EE9222598 for ; Thu, 19 Dec 2024 09:21:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600075; cv=fail; b=cYjmvtauqO3kKEq+5xI/Yf+MZkNdogTHz86R2fjK40b9pKJD29MkWKk1o4a1Sj0mJh3rWwhA5V04qhT7nMV2toM7UkWmFWy8G+gCsMHYg68scxaFjp2kapdG0zHV6xkBhpU/pFp1TlU41V+OwEd3NFmVCIEyvldN/QUjlWTN8uU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734600075; c=relaxed/simple; bh=gd955cPBU4pwf1eVp6/vmCnKqyPWYRTXzE0sft6hoVI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=pv9E1joAJqeu5ymBw69S9oWsE7NjoPGLQ5j1ed8T34E/HQw4GXPr5nWXMhCNPIisdP4L0u0O2onSTbOj6HtLxXanIwawvIgJqR9napVNuQ2LzeNTvQkM/C4kMaqWSzIXoNmc6C1JrpZeNmcH8qlcgyN+KGhgeAtTJRIC+CGXsGE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=JazrsmA/; arc=fail smtp.client-ip=40.107.20.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="JazrsmA/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QMfX9LjCg1nhcpOrapEx3Kjy7wO693wEB1GQbUWp/1T9oVuwPxTmMKOT+TNrfDM8x2aoMhBP4FiPurMrDGxPVDX4tY+VxnlGKzgdAoQ5dtKSHs7k4RHK1QdWtX8NMUXbRgPJLD5dMoW52/GlixqMaYmv2/ZmEUV4NlwdqGnlbSEP2r3MbEqWkviLphcO/VLgdT/rCMWjWRjLZSNr9tIW8eLvfCsrYnGVaVBhY5G45nmz8NUf9+CIi8ZZ3UwFOETQL0FskvsjIN6lr+FFk/hJNiUXWFNhChuui+Tw2o8JDL1gTWID8QekD16nWod/7DKaxc9hGoRF4I0kNcFi3JT5Ug== 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=zo1sX2aLVpwPhp7IbqnPVJV6vECFSMO2MCqFad1pizw=; b=XJBRsG2NVbTTQdyVsQ3LELnK4Ykz0xhO5BmfdH0KF8GOfz8XaOaT71qAv5rhnG2gdC2sb3Fw0Bqkzsl4+EeN1BdyGL+hASIR+WpydtHUvjkkuynfkzuMbLzy3faLPNJ/vWAxCbjns3wzT9kuPR6ibtBb39m77kmP4S+xEPcp1m0lM6fYn4YRC1nxwY4ud0o9xomLbFY+r5XRkLrERdZu/GJ1QyoEqyWp2Db9IIc4aEIDsDNflKYLf6iIHQTVjqkkaaayt7D4WnuH2+SqVb3sD19UieJjTHaVuRuJKP6goH+ivkXsFhx0NN3fkqmSzrAiIutLrZ5+iQEe8zcxibJ6eQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zo1sX2aLVpwPhp7IbqnPVJV6vECFSMO2MCqFad1pizw=; b=JazrsmA/cTk6U7t6CbBIVTu/KCnKkxnS7MEHyncdUJBt/aNMkbQvXmMIeWDSVIux7W3gFGsXapk6A8OshZDx2lpY2E+EDQWEz6/xA9YoO6fXL00XreHzqR8rl8Z+t2+hinhW/AdOnkddrWpiAbUQQ/eSFd49ZDp+7hy6qlqXwq++miYBojUAJq7cMN/IJ4KpKk6fEKG4f2HVW2pIp2DPXLP1MtCFzxf5EllYJAbootwsCN3rkfw5191/SD0UtbbyWG/NXk440RNdI5cE+4YQI4zjGHTxmLOhCXd3r8sDy+S5L3rv5hyVT1mtCkLoAIuv2ROACDMzkUN8QKItLS+q0g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) by VI1PR04MB9834.eurprd04.prod.outlook.com (2603:10a6:800:1d8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8272.14; Thu, 19 Dec 2024 09:21:04 +0000 Received: from AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7]) by AS4PR04MB9550.eurprd04.prod.outlook.com ([fe80::e28d:10f8:289:baf7%6]) with mapi id 15.20.8251.015; Thu, 19 Dec 2024 09:21:04 +0000 From: Larisa Grigore To: Frank Li , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peng Fan Cc: imx@lists.linux.dev, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH v2 6/6] upstream: add eDMAv3 support for S32G2/S32G3 SoCs Date: Thu, 19 Dec 2024 11:18:46 +0200 Message-ID: <20241219092045.1161182-7-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> References: <20241219092045.1161182-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0213.eurprd02.prod.outlook.com (2603:10a6:20b:28f::20) To AS4PR04MB9550.eurprd04.prod.outlook.com (2603:10a6:20b:4f9::17) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9550:EE_|VI1PR04MB9834:EE_ X-MS-Office365-Filtering-Correlation-Id: 65c38eee-f127-428e-3a01-08dd200e75f6 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014|7053199007; X-Microsoft-Antispam-Message-Info: =?utf-8?q?CcCV7h5mxwZbF3oRf56yP4xcGwnYAHa?= =?utf-8?q?/efFkBmkYix0LuZ6LE8KKNY3uNMv1UgroaegXuDt5pQQUlySrr1i44KhhDYN/x5Qg?= =?utf-8?q?fUA5ByMuCqmoSLNTRoRoziGWxuDXSbr+sCULT88wWCQ0lcVjR+WAm2Il/32zQW/5s?= =?utf-8?q?SvKIrOSDI8IJ6x+wDbCMD9C+nNFvCLW2BT4MwgZ6lhYfcnB2Z6XB4K0lY8yfIKRP8?= =?utf-8?q?xJy+td8XcHtmic7DL5zEsceSw/8viJx6hcfXYH04Qp41uMWHL9QzVgtFgmCaHAZOx?= =?utf-8?q?PsLof0gvmR1/xLPPOcPCdUDnaUFnwR5/GmnWooaunvRQt/bCv4bs6UJjcw2/wKV7l?= =?utf-8?q?OSTQpQmNCqIGJEGmuZuMf3aH1j0aAFJHi/jgHBAeWDnyF9VxchTPIrGlGCMBJutv9?= =?utf-8?q?SVbraeWHlCyLESNkiYEHzhHM+pcaJWR8UywgKytcJS9BwDsCC5Fw2iaEU+wJIWsIc?= =?utf-8?q?H8NkGAMmXt6BUWF3eyUoahCNb6YcoJJ5hQL/vzMORveZL+aVBULMeqS6efgX6py/H?= =?utf-8?q?vR67pLFPNdYFidjWAeIDPayZ1zrsCS9avtbTMxeaPylfwKhMWz8OoJNPHCML6Y8tW?= =?utf-8?q?5H7DX3ZVVaHlsORT4aXfCYuCxSJvM5W1F91YOsxZ8OZgsztRvxbuY9VN3xiW+QEIo?= =?utf-8?q?CvaLArLdIbL3MVeQvdDiKbY3m/K7w9EnqhZgd5yCEYUtTDnHDQmjiCBNcojQi9LLp?= =?utf-8?q?gAVQIWXMwrukGebt7KmWFYggdNROCM02zcWKj2b1tOhQ13e8rXta/Rl//0hbHxm/y?= =?utf-8?q?TlvhoGX/tKGxGl/xxpeLrPypAu1HyRYjkwo4uCgMmQdMj6FAUajBePKfn+qqfzl8E?= =?utf-8?q?buS4T8RLb2bzYAl7TFii0BrWueVaKvwyhWa21qGwDlmF21+pux9ic/YbZvACJfacE?= =?utf-8?q?bzXEKZAagQodNEzokAlXZys/GwmdSfW6QUlXFbN59VW66DJlcoq4baZP9LBMoCuqp?= =?utf-8?q?G9QIwxrlzchoFAcz2i6bAvcPViEdp9JLMKMhDcf2G74QAXMK88KVd4RbEKjRcFmeW?= =?utf-8?q?ZGYivgwzZPkGQVmTaLQBRLEOrc7lDIAneZqhYT2vBvi7Q5abFA+x0nkr37X9Tdldl?= =?utf-8?q?Wi4W2eOqe1HnoJU6P5xEw3iXDAe674Vtl793TjVQ1y6GKDtm8gVKLTsDSfZ61V/Lp?= =?utf-8?q?jSpPBWWzmqD+s6pabGL7WlNQ6IL4FnqLqb637GdTaM154sWGPf43Kq8xA8UIG3lhx?= =?utf-8?q?yaHvDZvjVVrAKuUaUQ2qGyhTYCJJuzVhVj/QZndwVJyWBYHmHgIrV3XDdfARYTlvW?= =?utf-8?q?D674cUQMspBHrvW+aokHQC/bOUDnscEbXIPfMNiZxBhUpQUyAXbYEsiXhzoP5y2kl?= =?utf-8?q?Sdfu4CqLU/C8?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR04MB9550.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014)(7053199007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xIQVvSs8c8tb5wSEPGsGh17BwQhw?= =?utf-8?q?/qLrI924YnqeikGvpKGrfdwSHuzLZYUdN1PLWp+Wg4NIS+rxUaHRh/bzvblgavn0q?= =?utf-8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utf-8?q?BOM7m1vNAWwb4IeN44HgLFAcocDlB3xeMjInzEcM8FVZFWutgcJ1AMNBH459iMm+4?= =?utf-8?q?/JDtKgMmRwOMlyf1Zm57Qz1TjAUxknpwMztFVaFDE1Api+/7eaJPVsJx5nKaq0Anp?= =?utf-8?q?AkaXUWz+G9gJ5drGK4aE8T+GnvBviULPaov0Vw3PBuFJ49PX8IALk6mSPPcmJN3fB?= =?utf-8?q?OPyJ1/CfV04YSposQd1Qvd7aYdB/Pb3M6H99v0btHVtPBxLNG2w9Bi74fsNPLX7ls?= =?utf-8?q?y0Ua/bXsTY097Y4NcJ59UuBuHzlMIXvSQ1I2/f3nbQMgK6mqtJNIwxquwSE+2BG5W?= =?utf-8?q?3WxwRUYUmm2BQjihgqe5WK5KKW7eci5qaQ+HDTcCeIFoVDEyMDrWxXGPtMVfcBhz7?= =?utf-8?q?EB6vYWI25v6DFzCCkkvBms4F53jTz5c7JUZ/3kL70N1a+SJmfxYqf99MM1IZqTXzl?= =?utf-8?q?sbNjVvgaUKXz0XE5bJNKz2rSXfbsh/grpm2K/bMW2S24BZt+bYtiXvZPrEyp8zq0Y?= =?utf-8?q?jt2+wdO9EqHDWi3YzExioqCYzZri4Evu6tifABwuIIcG9JFenUUE5p7pywWTIGq+G?= =?utf-8?q?07HuxEai4T2q?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65c38eee-f127-428e-3a01-08dd200e75f6 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2024 09:21:03.9825 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oJrKxyUEX5BwPwupqDOQSYwLBXooh9SXj5sc4rmuyhUsRtl3VNzVnpSYQeZsPpJH47xIODbDM9kwGQZo/+1JmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9834 S32G2 and S32G3 SoCs share the eDMAv3 module with i.MX SoCs, with some hardware integration particularities. S32G2/S32G3 includes two system eDMA instances based on v3 version, each of them integrated with 2 DMAMUX blocks. Another particularity of these SoCs is that the interrupts are shared between channels as follows: - DMA Channels 0-15 share the 'tx-0-15' interrupt - DMA Channels 16-31 share the 'tx-16-31' interrupt - all channels share the 'err' interrupt. The following email addresses will be used to send the patch for review: TO: Frank Li ,Vinod Koul ,Rob Herring ,Krzysztof Kozlowski ,Conor Dooley ,Peng Fan CC: Peng Fan ,Vinod Koul ,Frank Li ,imx@lists.linux.dev,dmaengine@vger.kernel.org,devicetree@vger.kernel.org,linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo Signed-off-by: Larisa Grigore --- outgoing/description | 12 ++ outgoing/v2-0000-cover-letter.patch | 42 ++++ ...-edma-select-of_dma_xlate-based-on-t.patch | 39 ++++ ...-edma-remove-FSL_EDMA_DRV_SPLIT_REG-.patch | 35 +++ ...-edma-move-eDMAv2-related-registers-.patch | 199 +++++++++++++++++ ...-edma-add-eDMAv3-registers-to-edma_r.patch | 104 +++++++++ ...ma-fsl-edma-add-nxp-s32g2-edma-compa.patch | 83 ++++++++ ...-edma-add-support-for-S32G-based-pla.patch | 200 ++++++++++++++++++ ...-edma-wait-until-no-hardware-request.patch | 68 ++++++ ...-edma-read-write-multiple-registers-.patch | 90 ++++++++ 10 files changed, 872 insertions(+) create mode 100644 outgoing/description create mode 100644 outgoing/v2-0000-cover-letter.patch create mode 100644 outgoing/v2-0001-dmaengine-fsl-edma-select-of_dma_xlate-based-on-t.patch create mode 100644 outgoing/v2-0002-dmaengine-fsl-edma-remove-FSL_EDMA_DRV_SPLIT_REG-.patch create mode 100644 outgoing/v2-0003-dmaengine-fsl-edma-move-eDMAv2-related-registers-.patch create mode 100644 outgoing/v2-0004-dmaengine-fsl-edma-add-eDMAv3-registers-to-edma_r.patch create mode 100644 outgoing/v2-0005-dt-bindings-dma-fsl-edma-add-nxp-s32g2-edma-compa.patch create mode 100644 outgoing/v2-0006-dmaengine-fsl-edma-add-support-for-S32G-based-pla.patch create mode 100644 outgoing/v2-0007-dmaengine-fsl-edma-wait-until-no-hardware-request.patch create mode 100644 outgoing/v2-0008-dmaengine-fsl-edma-read-write-multiple-registers-.patch diff --git a/outgoing/description b/outgoing/description new file mode 100644 index 000000000000..dcffbc0fa4f7 --- /dev/null +++ b/outgoing/description @@ -0,0 +1,12 @@ +Add eDMAv3 support for S32G2/S32G3 SoCs + +S32G2 and S32G3 SoCs share the eDMAv3 module with i.MX SoCs, with some hardware +integration particularities. + +S32G2/S32G3 includes two system eDMA instances based on v3 version, each of +them integrated with 2 DMAMUX blocks. +Another particularity of these SoCs is that the interrupts are shared between +channels as follows: +- DMA Channels 0-15 share the 'tx-0-15' interrupt +- DMA Channels 16-31 share the 'tx-16-31' interrupt +- all channels share the 'err' interrupt diff --git a/outgoing/v2-0000-cover-letter.patch b/outgoing/v2-0000-cover-letter.patch new file mode 100644 index 000000000000..7450c360744c --- /dev/null +++ b/outgoing/v2-0000-cover-letter.patch @@ -0,0 +1,42 @@ +From e803ee3d1d6a60006f0ebe631de9f78a246b8e42 Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Wed, 18 Dec 2024 16:01:08 +0200 +Subject: [PATCH v2 0/8] Add eDMAv3 support for S32G2/S32G3 SoCs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 + +S32G2 and S32G3 SoCs share the eDMAv3 module with i.MX SoCs, with some hardware +integration particularities. + +S32G2/S32G3 includes two system eDMA instances based on v3 version, each of +them integrated with 2 DMAMUX blocks. +Another particularity of these SoCs is that the interrupts are shared between +channels as follows: +- DMA Channels 0-15 share the 'tx-0-15' interrupt +- DMA Channels 16-31 share the 'tx-16-31' interrupt +- all channels share the 'err' interrupt + +Larisa Grigore (8): + dmaengine: fsl-edma: select of_dma_xlate based on the dmamuxs presence + dmaengine: fsl-edma: remove FSL_EDMA_DRV_SPLIT_REG check when parsing + muxbase + dmaengine: fsl-edma: move eDMAv2 related registers to a new structure + ’edma2_regs’ + dmaengine: fsl-edma: add eDMAv3 registers to edma_regs + dt-bindings: dma: fsl-edma: add nxp,s32g2-edma compatible string + dmaengine: fsl-edma: add support for S32G based platforms + dmaengine: fsl-edma: wait until no hardware request is in progress + dmaengine: fsl-edma: read/write multiple registers in cyclic + transactions + + .../devicetree/bindings/dma/fsl,edma.yaml | 34 +++++ + drivers/dma/fsl-edma-common.c | 112 +++++++++----- + drivers/dma/fsl-edma-common.h | 26 +++- + drivers/dma/fsl-edma-main.c | 137 ++++++++++++++++-- + 4 files changed, 257 insertions(+), 52 deletions(-) + +-- +2.47.0 + diff --git a/outgoing/v2-0001-dmaengine-fsl-edma-select-of_dma_xlate-based-on-t.patch b/outgoing/v2-0001-dmaengine-fsl-edma-select-of_dma_xlate-based-on-t.patch new file mode 100644 index 000000000000..e006cd3bdc0f --- /dev/null +++ b/outgoing/v2-0001-dmaengine-fsl-edma-select-of_dma_xlate-based-on-t.patch @@ -0,0 +1,39 @@ +From f63c1efcd420fb26c4ddab005a70cac30d27af9e Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Thu, 24 Oct 2024 10:29:22 +0300 +Subject: [PATCH v2 1/8] dmaengine: fsl-edma: select of_dma_xlate based on the + dmamuxs presence +Content-Type: text/plain; charset=UTF-8 + +Select the of_dma_xlate function based on the dmamuxs definition rather +than the FSL_EDMA_DRV_SPLIT_REG flag, which pertains to the eDMA3 +layout. + +This change is a prerequisite for the S32G platforms, which integrate both +eDMAv3 and DMAMUX. + +Existing platforms with FSL_EDMA_DRV_SPLIT_REG will not be impacted, as +they all have dmamuxs set to zero. + +Signed-off-by: Larisa Grigore +Reviewed-by: Frank Li +--- + drivers/dma/fsl-edma-main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c +index 60de1003193a..2a7d19f51287 100644 +--- a/drivers/dma/fsl-edma-main.c ++++ b/drivers/dma/fsl-edma-main.c +@@ -646,7 +646,7 @@ static int fsl_edma_probe(struct platform_device *pdev) + } + + ret = of_dma_controller_register(np, +- drvdata->flags & FSL_EDMA_DRV_SPLIT_REG ? fsl_edma3_xlate : fsl_edma_xlate, ++ drvdata->dmamuxs ? fsl_edma_xlate : fsl_edma3_xlate, + fsl_edma); + if (ret) { + dev_err(&pdev->dev, +-- +2.47.0 + diff --git a/outgoing/v2-0002-dmaengine-fsl-edma-remove-FSL_EDMA_DRV_SPLIT_REG-.patch b/outgoing/v2-0002-dmaengine-fsl-edma-remove-FSL_EDMA_DRV_SPLIT_REG-.patch new file mode 100644 index 000000000000..4ef93ee0638e --- /dev/null +++ b/outgoing/v2-0002-dmaengine-fsl-edma-remove-FSL_EDMA_DRV_SPLIT_REG-.patch @@ -0,0 +1,35 @@ +From 29cb164154fcc9e41113d14b13a26116602e00ff Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Mon, 25 Nov 2024 15:40:18 +0200 +Subject: [PATCH v2 2/8] dmaengine: fsl-edma: remove FSL_EDMA_DRV_SPLIT_REG + check when parsing muxbase +Content-Type: text/plain; charset=UTF-8 + +Clean up dead code. dmamuxs is always 0 when FSL_EDMA_DRV_SPLIT_REG set. So +it is redundant to check FSL_EDMA_DRV_SPLIT_REG again in the for loop +because it will never enter for loop. + +Signed-off-by: Larisa Grigore +Reviewed-by: Frank Li +--- + drivers/dma/fsl-edma-main.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c +index 2a7d19f51287..9873cce00c68 100644 +--- a/drivers/dma/fsl-edma-main.c ++++ b/drivers/dma/fsl-edma-main.c +@@ -517,10 +517,6 @@ static int fsl_edma_probe(struct platform_device *pdev) + for (i = 0; i < fsl_edma->drvdata->dmamuxs; i++) { + char clkname[32]; + +- /* eDMAv3 mux register move to TCD area if ch_mux exist */ +- if (drvdata->flags & FSL_EDMA_DRV_SPLIT_REG) +- break; +- + fsl_edma->muxbase[i] = devm_platform_ioremap_resource(pdev, + 1 + i); + if (IS_ERR(fsl_edma->muxbase[i])) { +-- +2.47.0 + diff --git a/outgoing/v2-0003-dmaengine-fsl-edma-move-eDMAv2-related-registers-.patch b/outgoing/v2-0003-dmaengine-fsl-edma-move-eDMAv2-related-registers-.patch new file mode 100644 index 000000000000..b76948bbbfb9 --- /dev/null +++ b/outgoing/v2-0003-dmaengine-fsl-edma-move-eDMAv2-related-registers-.patch @@ -0,0 +1,199 @@ +From 1f42c35231b1592ffe1843e5c8dd727be0735db5 Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Tue, 19 Nov 2024 16:25:49 +0200 +Subject: [PATCH v2 3/8] =?UTF-8?q?dmaengine:=20fsl-edma:=20move=20eDMAv2?= + =?UTF-8?q?=20related=20registers=20to=20a=20new=20structure=20=E2=80=99ed?= + =?UTF-8?q?ma2=5Fregs=E2=80=99?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 + +Move eDMAv2 related registers to a new structure ’edma2_regs’ to better +support eDMAv3. + +eDMAv3 registers will be added in the next commit. + +Signed-off-by: Larisa Grigore +Reviewed-by: Frank Li +--- + drivers/dma/fsl-edma-common.c | 52 ++++++++++++++++++----------------- + drivers/dma/fsl-edma-common.h | 10 +++++-- + drivers/dma/fsl-edma-main.c | 14 ++++++---- + 3 files changed, 42 insertions(+), 34 deletions(-) + +diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c +index b7f15ab96855..b132a88dfdec 100644 +--- a/drivers/dma/fsl-edma-common.c ++++ b/drivers/dma/fsl-edma-common.c +@@ -108,14 +108,15 @@ static void fsl_edma_enable_request(struct fsl_edma_chan *fsl_chan) + return fsl_edma3_enable_request(fsl_chan); + + if (fsl_chan->edma->drvdata->flags & FSL_EDMA_DRV_WRAP_IO) { +- edma_writeb(fsl_chan->edma, EDMA_SEEI_SEEI(ch), regs->seei); +- edma_writeb(fsl_chan->edma, ch, regs->serq); ++ edma_writeb(fsl_chan->edma, EDMA_SEEI_SEEI(ch), ++ regs->v2.seei); ++ edma_writeb(fsl_chan->edma, ch, regs->v2.serq); + } else { + /* ColdFire is big endian, and accesses natively + * big endian I/O peripherals + */ +- iowrite8(EDMA_SEEI_SEEI(ch), regs->seei); +- iowrite8(ch, regs->serq); ++ iowrite8(EDMA_SEEI_SEEI(ch), regs->v2.seei); ++ iowrite8(ch, regs->v2.serq); + } + } + +@@ -142,14 +143,15 @@ void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan) + return fsl_edma3_disable_request(fsl_chan); + + if (fsl_chan->edma->drvdata->flags & FSL_EDMA_DRV_WRAP_IO) { +- edma_writeb(fsl_chan->edma, ch, regs->cerq); +- edma_writeb(fsl_chan->edma, EDMA_CEEI_CEEI(ch), regs->ceei); ++ edma_writeb(fsl_chan->edma, ch, regs->v2.cerq); ++ edma_writeb(fsl_chan->edma, EDMA_CEEI_CEEI(ch), ++ regs->v2.ceei); + } else { + /* ColdFire is big endian, and accesses natively + * big endian I/O peripherals + */ +- iowrite8(ch, regs->cerq); +- iowrite8(EDMA_CEEI_CEEI(ch), regs->ceei); ++ iowrite8(ch, regs->v2.cerq); ++ iowrite8(EDMA_CEEI_CEEI(ch), regs->v2.ceei); + } + } + +@@ -880,25 +882,25 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) + + edma->regs.cr = edma->membase + EDMA_CR; + edma->regs.es = edma->membase + EDMA_ES; +- edma->regs.erql = edma->membase + EDMA_ERQ; +- edma->regs.eeil = edma->membase + EDMA_EEI; +- +- edma->regs.serq = edma->membase + (is64 ? EDMA64_SERQ : EDMA_SERQ); +- edma->regs.cerq = edma->membase + (is64 ? EDMA64_CERQ : EDMA_CERQ); +- edma->regs.seei = edma->membase + (is64 ? EDMA64_SEEI : EDMA_SEEI); +- edma->regs.ceei = edma->membase + (is64 ? EDMA64_CEEI : EDMA_CEEI); +- edma->regs.cint = edma->membase + (is64 ? EDMA64_CINT : EDMA_CINT); +- edma->regs.cerr = edma->membase + (is64 ? EDMA64_CERR : EDMA_CERR); +- edma->regs.ssrt = edma->membase + (is64 ? EDMA64_SSRT : EDMA_SSRT); +- edma->regs.cdne = edma->membase + (is64 ? EDMA64_CDNE : EDMA_CDNE); +- edma->regs.intl = edma->membase + (is64 ? EDMA64_INTL : EDMA_INTR); +- edma->regs.errl = edma->membase + (is64 ? EDMA64_ERRL : EDMA_ERR); ++ edma->regs.v2.erql = edma->membase + EDMA_ERQ; ++ edma->regs.v2.eeil = edma->membase + EDMA_EEI; ++ ++ edma->regs.v2.serq = edma->membase + (is64 ? EDMA64_SERQ : EDMA_SERQ); ++ edma->regs.v2.cerq = edma->membase + (is64 ? EDMA64_CERQ : EDMA_CERQ); ++ edma->regs.v2.seei = edma->membase + (is64 ? EDMA64_SEEI : EDMA_SEEI); ++ edma->regs.v2.ceei = edma->membase + (is64 ? EDMA64_CEEI : EDMA_CEEI); ++ edma->regs.v2.cint = edma->membase + (is64 ? EDMA64_CINT : EDMA_CINT); ++ edma->regs.v2.cerr = edma->membase + (is64 ? EDMA64_CERR : EDMA_CERR); ++ edma->regs.v2.ssrt = edma->membase + (is64 ? EDMA64_SSRT : EDMA_SSRT); ++ edma->regs.v2.cdne = edma->membase + (is64 ? EDMA64_CDNE : EDMA_CDNE); ++ edma->regs.v2.intl = edma->membase + (is64 ? EDMA64_INTL : EDMA_INTR); ++ edma->regs.v2.errl = edma->membase + (is64 ? EDMA64_ERRL : EDMA_ERR); + + if (is64) { +- edma->regs.erqh = edma->membase + EDMA64_ERQH; +- edma->regs.eeih = edma->membase + EDMA64_EEIH; +- edma->regs.errh = edma->membase + EDMA64_ERRH; +- edma->regs.inth = edma->membase + EDMA64_INTH; ++ edma->regs.v2.erqh = edma->membase + EDMA64_ERQH; ++ edma->regs.v2.eeih = edma->membase + EDMA64_EEIH; ++ edma->regs.v2.errh = edma->membase + EDMA64_ERRH; ++ edma->regs.v2.inth = edma->membase + EDMA64_INTH; + } + } + +diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h +index ce37e1ee9c46..f1362daaa347 100644 +--- a/drivers/dma/fsl-edma-common.h ++++ b/drivers/dma/fsl-edma-common.h +@@ -120,9 +120,7 @@ struct fsl_edma3_ch_reg { + /* + * These are iomem pointers, for both v32 and v64. + */ +-struct edma_regs { +- void __iomem *cr; +- void __iomem *es; ++struct edma2_regs { + void __iomem *erqh; + void __iomem *erql; /* aka erq on v32 */ + void __iomem *eeih; +@@ -141,6 +139,12 @@ struct edma_regs { + void __iomem *errl; + }; + ++struct edma_regs { ++ void __iomem *cr; ++ void __iomem *es; ++ struct edma2_regs v2; ++}; ++ + struct fsl_edma_sw_tcd { + dma_addr_t ptcd; + void *vtcd; +diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c +index 9873cce00c68..0b89c31bf38c 100644 +--- a/drivers/dma/fsl-edma-main.c ++++ b/drivers/dma/fsl-edma-main.c +@@ -36,13 +36,14 @@ static irqreturn_t fsl_edma_tx_handler(int irq, void *dev_id) + unsigned int intr, ch; + struct edma_regs *regs = &fsl_edma->regs; + +- intr = edma_readl(fsl_edma, regs->intl); ++ intr = edma_readl(fsl_edma, regs->v2.intl); + if (!intr) + return IRQ_NONE; + + for (ch = 0; ch < fsl_edma->n_chans; ch++) { + if (intr & (0x1 << ch)) { +- edma_writeb(fsl_edma, EDMA_CINT_CINT(ch), regs->cint); ++ edma_writeb(fsl_edma, EDMA_CINT_CINT(ch), ++ regs->v2.cint); + fsl_edma_tx_chan_handler(&fsl_edma->chans[ch]); + } + } +@@ -78,14 +79,15 @@ static irqreturn_t fsl_edma_err_handler(int irq, void *dev_id) + unsigned int err, ch; + struct edma_regs *regs = &fsl_edma->regs; + +- err = edma_readl(fsl_edma, regs->errl); ++ err = edma_readl(fsl_edma, regs->v2.errl); + if (!err) + return IRQ_NONE; + + for (ch = 0; ch < fsl_edma->n_chans; ch++) { + if (err & (0x1 << ch)) { + fsl_edma_disable_request(&fsl_edma->chans[ch]); +- edma_writeb(fsl_edma, EDMA_CERR_CERR(ch), regs->cerr); ++ edma_writeb(fsl_edma, EDMA_CERR_CERR(ch), ++ regs->v2.cerr); + fsl_edma_err_chan_handler(&fsl_edma->chans[ch]); + } + } +@@ -216,7 +218,7 @@ fsl_edma_irq_init(struct platform_device *pdev, struct fsl_edma_engine *fsl_edma + { + int ret; + +- edma_writel(fsl_edma, ~0, fsl_edma->regs.intl); ++ edma_writel(fsl_edma, ~0, fsl_edma->regs.v2.intl); + + fsl_edma->txirq = platform_get_irq_byname(pdev, "edma-tx"); + if (fsl_edma->txirq < 0) +@@ -281,7 +283,7 @@ fsl_edma2_irq_init(struct platform_device *pdev, + int i, ret, irq; + int count; + +- edma_writel(fsl_edma, ~0, fsl_edma->regs.intl); ++ edma_writel(fsl_edma, ~0, fsl_edma->regs.v2.intl); + + count = platform_irq_count(pdev); + dev_dbg(&pdev->dev, "%s Found %d interrupts\r\n", __func__, count); +-- +2.47.0 + diff --git a/outgoing/v2-0004-dmaengine-fsl-edma-add-eDMAv3-registers-to-edma_r.patch b/outgoing/v2-0004-dmaengine-fsl-edma-add-eDMAv3-registers-to-edma_r.patch new file mode 100644 index 000000000000..bb143c138958 --- /dev/null +++ b/outgoing/v2-0004-dmaengine-fsl-edma-add-eDMAv3-registers-to-edma_r.patch @@ -0,0 +1,104 @@ +From a2358ec157b67a5333eeaa4139a35f7b7f255362 Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Tue, 19 Nov 2024 16:26:07 +0200 +Subject: [PATCH v2 4/8] dmaengine: fsl-edma: add eDMAv3 registers to edma_regs +Content-Type: text/plain; charset=UTF-8 + +Add edma3_regs to match eDMAv3 new register layout for manage page (MP). + +Introduce helper function fsl_edma3_setup_regs() to initialize the +edma_regs for eDMAv3, which pave the road to support S32 chips. + +Signed-off-by: Larisa Grigore +Reviewed-by: Frank Li +--- + drivers/dma/fsl-edma-common.c | 15 +++++++++++++++ + drivers/dma/fsl-edma-common.h | 11 ++++++++++- + drivers/dma/fsl-edma-main.c | 8 +++++--- + 3 files changed, 30 insertions(+), 4 deletions(-) + +diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c +index b132a88dfdec..62d51b269e54 100644 +--- a/drivers/dma/fsl-edma-common.c ++++ b/drivers/dma/fsl-edma-common.c +@@ -44,6 +44,11 @@ + #define EDMA64_ERRH 0x28 + #define EDMA64_ERRL 0x2c + ++#define EDMA_V3_MP_CSR 0x00 ++#define EDMA_V3_MP_ES 0x04 ++#define EDMA_V3_MP_INT 0x08 ++#define EDMA_V3_MP_HRS 0x0C ++ + void fsl_edma_tx_chan_handler(struct fsl_edma_chan *fsl_chan) + { + spin_lock(&fsl_chan->vchan.lock); +@@ -904,4 +909,14 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) + } + } + ++void fsl_edma3_setup_regs(struct fsl_edma_engine *edma) ++{ ++ struct edma_regs *regs = &edma->regs; ++ ++ regs->cr = edma->membase + EDMA_V3_MP_CSR; ++ regs->es = edma->membase + EDMA_V3_MP_ES; ++ regs->v3.is = edma->membase + EDMA_V3_MP_INT; ++ regs->v3.hrs = edma->membase + EDMA_V3_MP_HRS; ++} ++ + MODULE_LICENSE("GPL v2"); +diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h +index f1362daaa347..52901623d6fc 100644 +--- a/drivers/dma/fsl-edma-common.h ++++ b/drivers/dma/fsl-edma-common.h +@@ -139,10 +139,18 @@ struct edma2_regs { + void __iomem *errl; + }; + ++struct edma3_regs { ++ void __iomem *is; ++ void __iomem *hrs; ++}; ++ + struct edma_regs { + void __iomem *cr; + void __iomem *es; +- struct edma2_regs v2; ++ union { ++ struct edma2_regs v2; ++ struct edma3_regs v3; ++ }; + }; + + struct fsl_edma_sw_tcd { +@@ -491,5 +499,6 @@ int fsl_edma_alloc_chan_resources(struct dma_chan *chan); + void fsl_edma_free_chan_resources(struct dma_chan *chan); + void fsl_edma_cleanup_vchan(struct dma_device *dmadev); + void fsl_edma_setup_regs(struct fsl_edma_engine *edma); ++void fsl_edma3_setup_regs(struct fsl_edma_engine *edma); + + #endif /* _FSL_EDMA_COMMON_H_ */ +diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c +index 0b89c31bf38c..cc1787698b56 100644 +--- a/drivers/dma/fsl-edma-main.c ++++ b/drivers/dma/fsl-edma-main.c +@@ -495,10 +495,12 @@ static int fsl_edma_probe(struct platform_device *pdev) + if (IS_ERR(fsl_edma->membase)) + return PTR_ERR(fsl_edma->membase); + +- if (!(drvdata->flags & FSL_EDMA_DRV_SPLIT_REG)) { ++ if (!(drvdata->flags & FSL_EDMA_DRV_SPLIT_REG)) + fsl_edma_setup_regs(fsl_edma); +- regs = &fsl_edma->regs; +- } ++ else ++ fsl_edma3_setup_regs(fsl_edma); ++ ++ regs = &fsl_edma->regs; + + if (drvdata->flags & FSL_EDMA_DRV_HAS_DMACLK) { + fsl_edma->dmaclk = devm_clk_get_enabled(&pdev->dev, "dma"); +-- +2.47.0 + diff --git a/outgoing/v2-0005-dt-bindings-dma-fsl-edma-add-nxp-s32g2-edma-compa.patch b/outgoing/v2-0005-dt-bindings-dma-fsl-edma-add-nxp-s32g2-edma-compa.patch new file mode 100644 index 000000000000..529d7c304802 --- /dev/null +++ b/outgoing/v2-0005-dt-bindings-dma-fsl-edma-add-nxp-s32g2-edma-compa.patch @@ -0,0 +1,83 @@ +From 8960ba80448c129ed0372778e4d35a2d0be6c455 Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Thu, 31 Oct 2024 16:39:17 +0200 +Subject: [PATCH v2 5/8] dt-bindings: dma: fsl-edma: add nxp,s32g2-edma + compatible string +Content-Type: text/plain; charset=UTF-8 + +Introduce the compatible strings 'nxp,s32g2-edma' and 'nxp,s32g3-edma' to +enable the support for the eDMAv3 present on S32G2/S32G3 platforms. + +The S32G2/S32G3 eDMA architecture features 32 DMA channels. Each of the +two eDMA instances is integrated with two DMAMUX blocks. + +Another particularity of these SoCs is that the interrupts are shared +between channels in the following way: +- DMA Channels 0-15 share the 'tx-0-15' interrupt +- DMA Channels 16-31 share the 'tx-16-31' interrupt +- all channels share the 'err' interrupt + +Signed-off-by: Larisa Grigore +Reviewed-by: Frank Li +--- + .../devicetree/bindings/dma/fsl,edma.yaml | 34 +++++++++++++++++++ + 1 file changed, 34 insertions(+) + +diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml +index d54140f18d34..4f925469533e 100644 +--- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml ++++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml +@@ -26,9 +26,13 @@ properties: + - fsl,imx93-edma3 + - fsl,imx93-edma4 + - fsl,imx95-edma5 ++ - nxp,s32g2-edma + - items: + - const: fsl,ls1028a-edma + - const: fsl,vf610-edma ++ - items: ++ - const: nxp,s32g3-edma ++ - const: nxp,s32g2-edma + + reg: + minItems: 1 +@@ -221,6 +225,36 @@ allOf: + properties: + power-domains: false + ++ - if: ++ properties: ++ compatible: ++ contains: ++ const: nxp,s32g2-edma ++ then: ++ properties: ++ clocks: ++ minItems: 2 ++ maxItems: 2 ++ clock-names: ++ items: ++ - const: dmamux0 ++ - const: dmamux1 ++ interrupts: ++ minItems: 3 ++ maxItems: 3 ++ interrupt-names: ++ items: ++ - const: tx-0-15 ++ - const: tx-16-31 ++ - const: err ++ reg: ++ minItems: 3 ++ maxItems: 3 ++ "#dma-cells": ++ const: 2 ++ dma-channels: ++ const: 32 ++ + unevaluatedProperties: false + + examples: +-- +2.47.0 + diff --git a/outgoing/v2-0006-dmaengine-fsl-edma-add-support-for-S32G-based-pla.patch b/outgoing/v2-0006-dmaengine-fsl-edma-add-support-for-S32G-based-pla.patch new file mode 100644 index 000000000000..8df669589df7 --- /dev/null +++ b/outgoing/v2-0006-dmaengine-fsl-edma-add-support-for-S32G-based-pla.patch @@ -0,0 +1,200 @@ +From a6f83bd94f76f21d8ff662f07f4f72e79f71aebf Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Thu, 24 Oct 2024 14:16:37 +0300 +Subject: [PATCH v2 6/8] dmaengine: fsl-edma: add support for S32G based + platforms +Content-Type: text/plain; charset=UTF-8 + +S32G2/S32G3 includes two system eDMA instances based on v3 version, each of +them integrated with two DMAMUX blocks. + +Another particularity of these SoCs is that the interrupts are shared +between channels as follows: +- DMA Channels 0-15 share the 'tx-0-15' interrupt +- DMA Channels 16-31 share the 'tx-16-31' interrupt +- all channels share the 'err' interrupt + +Signed-off-by: Larisa Grigore +Co-developed-by: Ciprian Marian Costea +Signed-off-by: Ciprian Marian Costea +Reviewed-by: Frank Li +--- + drivers/dma/fsl-edma-common.h | 3 + + drivers/dma/fsl-edma-main.c | 109 +++++++++++++++++++++++++++++++++- + 2 files changed, 111 insertions(+), 1 deletion(-) + +diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h +index 52901623d6fc..63e908fc3575 100644 +--- a/drivers/dma/fsl-edma-common.h ++++ b/drivers/dma/fsl-edma-common.h +@@ -68,6 +68,8 @@ + #define EDMA_V3_CH_CSR_EEI BIT(2) + #define EDMA_V3_CH_CSR_DONE BIT(30) + #define EDMA_V3_CH_CSR_ACTIVE BIT(31) ++#define EDMA_V3_CH_ES_ERR BIT(31) ++#define EDMA_V3_MP_ES_VLD BIT(31) + + enum fsl_edma_pm_state { + RUNNING = 0, +@@ -252,6 +254,7 @@ struct fsl_edma_engine { + const struct fsl_edma_drvdata *drvdata; + u32 n_chans; + int txirq; ++ int txirq_16_31; + int errirq; + bool big_endian; + struct edma_regs regs; +diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c +index cc1787698b56..27bae3649026 100644 +--- a/drivers/dma/fsl-edma-main.c ++++ b/drivers/dma/fsl-edma-main.c +@@ -3,10 +3,11 @@ + * drivers/dma/fsl-edma.c + * + * Copyright 2013-2014 Freescale Semiconductor, Inc. ++ * Copyright 2024 NXP + * + * Driver for the Freescale eDMA engine with flexible channel multiplexing + * capability for DMA request sources. The eDMA block can be found on some +- * Vybrid and Layerscape SoCs. ++ * Vybrid, Layerscape and S32G SoCs. + */ + + #include +@@ -73,6 +74,60 @@ static irqreturn_t fsl_edma2_tx_handler(int irq, void *devi_id) + return fsl_edma_tx_handler(irq, fsl_chan->edma); + } + ++static irqreturn_t fsl_edma3_or_tx_handler(int irq, void *dev_id, ++ u8 start, u8 end) ++{ ++ struct fsl_edma_engine *fsl_edma = dev_id; ++ struct fsl_edma_chan *chan; ++ int i; ++ ++ end = min(end, fsl_edma->n_chans); ++ ++ for (i = start; i < end; i++) { ++ chan = &fsl_edma->chans[i]; ++ ++ fsl_edma3_tx_handler(irq, chan); ++ } ++ ++ return IRQ_HANDLED; ++} ++ ++static irqreturn_t fsl_edma3_tx_0_15_handler(int irq, void *dev_id) ++{ ++ return fsl_edma3_or_tx_handler(irq, dev_id, 0, 16); ++} ++ ++static irqreturn_t fsl_edma3_tx_16_31_handler(int irq, void *dev_id) ++{ ++ return fsl_edma3_or_tx_handler(irq, dev_id, 16, 32); ++} ++ ++static irqreturn_t fsl_edma3_or_err_handler(int irq, void *dev_id) ++{ ++ struct fsl_edma_engine *fsl_edma = dev_id; ++ struct edma_regs *regs = &fsl_edma->regs; ++ unsigned int err, ch, ch_es; ++ struct fsl_edma_chan *chan; ++ ++ err = edma_readl(fsl_edma, regs->es); ++ if (!(err & EDMA_V3_MP_ES_VLD)) ++ return IRQ_NONE; ++ ++ for (ch = 0; ch < fsl_edma->n_chans; ch++) { ++ chan = &fsl_edma->chans[ch]; ++ ++ ch_es = edma_readl_chreg(chan, ch_es); ++ if (!(ch_es & EDMA_V3_CH_ES_ERR)) ++ continue; ++ ++ edma_writel_chreg(chan, EDMA_V3_CH_ES_ERR, ch_es); ++ fsl_edma_disable_request(chan); ++ fsl_edma->chans[ch].status = DMA_ERROR; ++ } ++ ++ return IRQ_HANDLED; ++} ++ + static irqreturn_t fsl_edma_err_handler(int irq, void *dev_id) + { + struct fsl_edma_engine *fsl_edma = dev_id; +@@ -276,6 +331,49 @@ static int fsl_edma3_irq_init(struct platform_device *pdev, struct fsl_edma_engi + return 0; + } + ++static int fsl_edma3_or_irq_init(struct platform_device *pdev, ++ struct fsl_edma_engine *fsl_edma) ++{ ++ int ret; ++ ++ fsl_edma->txirq = platform_get_irq_byname(pdev, "tx-0-15"); ++ if (fsl_edma->txirq < 0) ++ return fsl_edma->txirq; ++ ++ fsl_edma->txirq_16_31 = platform_get_irq_byname(pdev, "tx-16-31"); ++ if (fsl_edma->txirq_16_31 < 0) ++ return fsl_edma->txirq_16_31; ++ ++ fsl_edma->errirq = platform_get_irq_byname(pdev, "err"); ++ if (fsl_edma->errirq < 0) ++ return fsl_edma->errirq; ++ ++ ret = devm_request_irq(&pdev->dev, fsl_edma->txirq, ++ fsl_edma3_tx_0_15_handler, 0, "eDMA tx0_15", ++ fsl_edma); ++ if (ret) ++ return dev_err_probe(&pdev->dev, ret, ++ "Can't register eDMA tx0_15 IRQ.\n"); ++ ++ if (fsl_edma->n_chans > 16) { ++ ret = devm_request_irq(&pdev->dev, fsl_edma->txirq_16_31, ++ fsl_edma3_tx_16_31_handler, 0, ++ "eDMA tx16_31", fsl_edma); ++ if (ret) ++ return dev_err_probe(&pdev->dev, ret, ++ "Can't register eDMA tx16_31 IRQ.\n"); ++ } ++ ++ ret = devm_request_irq(&pdev->dev, fsl_edma->errirq, ++ fsl_edma3_or_err_handler, 0, "eDMA err", ++ fsl_edma); ++ if (ret) ++ return dev_err_probe(&pdev->dev, ret, ++ "Can't register eDMA err IRQ.\n"); ++ ++ return 0; ++} ++ + static int + fsl_edma2_irq_init(struct platform_device *pdev, + struct fsl_edma_engine *fsl_edma) +@@ -406,6 +504,14 @@ static struct fsl_edma_drvdata imx95_data5 = { + .setup_irq = fsl_edma3_irq_init, + }; + ++static const struct fsl_edma_drvdata s32g2_data = { ++ .dmamuxs = DMAMUX_NR, ++ .chreg_space_sz = EDMA_TCD, ++ .chreg_off = 0x4000, ++ .flags = FSL_EDMA_DRV_EDMA3 | FSL_EDMA_DRV_MUX_SWAP, ++ .setup_irq = fsl_edma3_or_irq_init, ++}; ++ + static const struct of_device_id fsl_edma_dt_ids[] = { + { .compatible = "fsl,vf610-edma", .data = &vf610_data}, + { .compatible = "fsl,ls1028a-edma", .data = &ls1028a_data}, +@@ -415,6 +521,7 @@ static const struct of_device_id fsl_edma_dt_ids[] = { + { .compatible = "fsl,imx93-edma3", .data = &imx93_data3}, + { .compatible = "fsl,imx93-edma4", .data = &imx93_data4}, + { .compatible = "fsl,imx95-edma5", .data = &imx95_data5}, ++ { .compatible = "nxp,s32g2-edma", .data = &s32g2_data}, + { /* sentinel */ } + }; + MODULE_DEVICE_TABLE(of, fsl_edma_dt_ids); +-- +2.47.0 + diff --git a/outgoing/v2-0007-dmaengine-fsl-edma-wait-until-no-hardware-request.patch b/outgoing/v2-0007-dmaengine-fsl-edma-wait-until-no-hardware-request.patch new file mode 100644 index 000000000000..45183b0f7f66 --- /dev/null +++ b/outgoing/v2-0007-dmaengine-fsl-edma-wait-until-no-hardware-request.patch @@ -0,0 +1,68 @@ +From a5421ea034f07dac4e31ce83aa7ccdbbb70915a9 Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Mon, 6 Nov 2023 13:14:31 +0200 +Subject: [PATCH v2 7/8] dmaengine: fsl-edma: wait until no hardware request is + in progress +Content-Type: text/plain; charset=UTF-8 + +Wait DMA hardware complete cleanup work by checking HRS bit before +disabling the channel to make sure trail data is already written to +memory. + +Fixes: 72f5801a4e2b7 ("dmaengine: fsl-edma: integrate v3 support") +Signed-off-by: Larisa Grigore +--- + drivers/dma/fsl-edma-common.c | 9 +++++++++ + drivers/dma/fsl-edma-common.h | 4 ++++ + 2 files changed, 13 insertions(+) + +diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c +index 62d51b269e54..d364514f21be 100644 +--- a/drivers/dma/fsl-edma-common.c ++++ b/drivers/dma/fsl-edma-common.c +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -127,11 +128,19 @@ static void fsl_edma_enable_request(struct fsl_edma_chan *fsl_chan) + + static void fsl_edma3_disable_request(struct fsl_edma_chan *fsl_chan) + { ++ struct fsl_edma_engine *fsl_edma = fsl_chan->edma; ++ struct edma_regs *regs = &fsl_chan->edma->regs; + u32 val = edma_readl_chreg(fsl_chan, ch_csr); ++ u32 ch = fsl_chan->vchan.chan.chan_id; + u32 flags; + + flags = fsl_edma_drvflags(fsl_chan); + ++ /* Make sure there is no hardware request in progress. */ ++ read_poll_timeout(edma_readl, val, !(val & EDMA_V3_MP_HRS_CH(ch)), ++ EDMA_USEC_POLL, EDMA_USEC_TIMEOUT, false, fsl_edma, ++ regs->v3.hrs); ++ + if (flags & FSL_EDMA_DRV_HAS_CHMUX) + edma_writel(fsl_chan->edma, 0, fsl_chan->mux_addr); + +diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h +index 63e908fc3575..ed210bd71681 100644 +--- a/drivers/dma/fsl-edma-common.h ++++ b/drivers/dma/fsl-edma-common.h +@@ -70,6 +70,10 @@ + #define EDMA_V3_CH_CSR_ACTIVE BIT(31) + #define EDMA_V3_CH_ES_ERR BIT(31) + #define EDMA_V3_MP_ES_VLD BIT(31) ++#define EDMA_V3_MP_HRS_CH(ch) BIT(ch) ++ ++#define EDMA_USEC_POLL 10 ++#define EDMA_USEC_TIMEOUT 10000 + + enum fsl_edma_pm_state { + RUNNING = 0, +-- +2.47.0 + diff --git a/outgoing/v2-0008-dmaengine-fsl-edma-read-write-multiple-registers-.patch b/outgoing/v2-0008-dmaengine-fsl-edma-read-write-multiple-registers-.patch new file mode 100644 index 000000000000..3fd04bd37253 --- /dev/null +++ b/outgoing/v2-0008-dmaengine-fsl-edma-read-write-multiple-registers-.patch @@ -0,0 +1,90 @@ +From e803ee3d1d6a60006f0ebe631de9f78a246b8e42 Mon Sep 17 00:00:00 2001 +From: Larisa Grigore +Date: Tue, 20 Feb 2024 12:29:09 +0200 +Subject: [PATCH v2 8/8] dmaengine: fsl-edma: read/write multiple registers in + cyclic transactions +Content-Type: text/plain; charset=UTF-8 + +Add support for reading multiple registers in DEV_TO_MEM transactions and +for writing multiple registers in MEM_TO_DEV transactions. + +Signed-off-by: Frank Li +Co-developed-by: Alexandru-Catalin Ionita +Signed-off-by: Alexandru-Catalin Ionita +Signed-off-by: Larisa Grigore +--- + drivers/dma/fsl-edma-common.c | 36 ++++++++++++++++++++++++++--------- + 1 file changed, 27 insertions(+), 9 deletions(-) + +diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c +index d364514f21be..e70f7aa9bc68 100644 +--- a/drivers/dma/fsl-edma-common.c ++++ b/drivers/dma/fsl-edma-common.c +@@ -496,8 +496,8 @@ void fsl_edma_fill_tcd(struct fsl_edma_chan *fsl_chan, + bool disable_req, bool enable_sg) + { + struct dma_slave_config *cfg = &fsl_chan->cfg; ++ u32 burst = 0; + u16 csr = 0; +- u32 burst; + + /* + * eDMA hardware SGs require the TCDs to be stored in little +@@ -512,16 +512,30 @@ void fsl_edma_fill_tcd(struct fsl_edma_chan *fsl_chan, + + fsl_edma_set_tcd_to_le(fsl_chan, tcd, soff, soff); + +- if (fsl_chan->is_multi_fifo) { +- /* set mloff to support multiple fifo */ +- burst = cfg->direction == DMA_DEV_TO_MEM ? +- cfg->src_maxburst : cfg->dst_maxburst; +- nbytes |= EDMA_V3_TCD_NBYTES_MLOFF(-(burst * 4)); +- /* enable DMLOE/SMLOE */ +- if (cfg->direction == DMA_MEM_TO_DEV) { ++ /* If we expect to have either multi_fifo or a port window size, ++ * we will use minor loop offset, meaning bits 29-10 will be used for ++ * address offset, while bits 9-0 will be used to tell DMA how much ++ * data to read from addr. ++ * If we don't have either of those, will use a major loop reading from addr ++ * nbytes (29bits). ++ */ ++ if (cfg->direction == DMA_MEM_TO_DEV) { ++ if (fsl_chan->is_multi_fifo) ++ burst = cfg->dst_maxburst * 4; ++ if (cfg->dst_port_window_size) ++ burst = cfg->dst_port_window_size * cfg->dst_addr_width; ++ if (burst) { ++ nbytes |= EDMA_V3_TCD_NBYTES_MLOFF(-burst); + nbytes |= EDMA_V3_TCD_NBYTES_DMLOE; + nbytes &= ~EDMA_V3_TCD_NBYTES_SMLOE; +- } else { ++ } ++ } else { ++ if (fsl_chan->is_multi_fifo) ++ burst = cfg->src_maxburst * 4; ++ if (cfg->src_port_window_size) ++ burst = cfg->src_port_window_size * cfg->src_addr_width; ++ if (burst) { ++ nbytes |= EDMA_V3_TCD_NBYTES_MLOFF(-burst); + nbytes |= EDMA_V3_TCD_NBYTES_SMLOE; + nbytes &= ~EDMA_V3_TCD_NBYTES_DMLOE; + } +@@ -639,11 +653,15 @@ struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( + dst_addr = fsl_chan->dma_dev_addr; + soff = fsl_chan->cfg.dst_addr_width; + doff = fsl_chan->is_multi_fifo ? 4 : 0; ++ if (fsl_chan->cfg.dst_port_window_size) ++ doff = fsl_chan->cfg.dst_addr_width; + } else if (direction == DMA_DEV_TO_MEM) { + src_addr = fsl_chan->dma_dev_addr; + dst_addr = dma_buf_next; + soff = fsl_chan->is_multi_fifo ? 4 : 0; + doff = fsl_chan->cfg.src_addr_width; ++ if (fsl_chan->cfg.src_port_window_size) ++ soff = fsl_chan->cfg.src_addr_width; + } else { + /* DMA_DEV_TO_DEV */ + src_addr = fsl_chan->cfg.src_addr; +-- +2.47.0 +