From patchwork Mon Dec 16 07:58:11 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: 13909329 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (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 F21D81F6675 for ; Mon, 16 Dec 2024 07:58:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335913; cv=fail; b=j5G+W5x6peDh7a/oah6uQptzFY1OBKgv+p1Xf/99j1AZGNITUCTxzyXHjkit7j3YEQ6uo+L/YBuSRuRFRja3oqvK/S4yGcJUGHorS2NYoWohnKiB2RQ6wg8S5Kk5PZ3qPE9XkBFlmPTATmkCugIoxk0GLRMLdB0uGpf9JSX7Te0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335913; c=relaxed/simple; bh=h0ThtxV2ucK5fq1zwr19IsUVH2xykBQ117Z82aAByH4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Qad4+mKoZwjZDYwY7OlB3JyfNEE2aoZcJqQL8OEuWWfNtzOYfA5yFirPaDruToPKIJQB4RXjX52o9QL9nWaNJBNhvVKYeOjI6gWTz1vDZ5dKi2rhWu32L4/fxYJ0Pa6Kpl4U0vyA4F4L18oa0XAN6iBHPYdKQ2KDfFKriEyllp4= 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=Lsa6P90x; arc=fail smtp.client-ip=40.107.20.41 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="Lsa6P90x" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uiQKAGWWKNGYOKzyt/TaJblTyJN6WTx+InMqqziViHFnUXh4t1xdLO8wSZfBJxSST9ov1uqiO2j+ED3MI90Y9MkOBiMULpTdIdpQXIkaMAXdMNKLguSTSxposL5Z8F2K6V+X91b48Y3L2x7KMn8vCV/NuFfEtqBCK8JW86B/m+0gEYzVNrbC6HxWn2Jpnhs7wldDWm1BvsJ+QfsT442m3cKa0ANw9cNEwjpQiTIRmGFDUt1I/NuahH0mfd7Bj8GvcUmWqkTMXgIqVVl9r3UbseUljZVbkiKyHBKU/uhe6t/P2lsxlQ8a+qhA7laK7Jfmq1Xh+m5lmO2QQVYpHU9AZQ== 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=EpYX/Wba9b9blkBpLq1qKc1aLSTb28wIOKVhcxZUOj0=; b=yC9gBgFnZ9rX/4zxrBO1edN6vedm2kc6cc5WpYMWF5m5PsIexek2UEx4J4N1NbVfSGXwtXG8V/FSCtDSnXpSWoEf3dfHhgOcYQsvajqjwzOqcQB3VAq3RpBwKeqo04emqZVsoVMtFw2XLjKCT+0pam1EfE8hJn4k+cqpDtjhzSGgy+mxmLYgD5xTP2nKCRxlcvTnagUAV6k0KJ/YCpLySIxg7RH4lJkGd30te5N+VChkOM0hgC7eaYRj2BG9CB70kpN0ocrXnIeKelkWJ9TaGGbgyplGvVIQXj8g8pzZR6uTa6h5B+Xtdq5tyWSm2IEnjA7Y0mUKIEozY55rXf4GGw== 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=EpYX/Wba9b9blkBpLq1qKc1aLSTb28wIOKVhcxZUOj0=; b=Lsa6P90xvi0N92GkAeg/9OJfNjf/wdRzAYaWRuzijjNtWihmfd9nzEn9z743v8R4YYd9eoB3Kjdmakd/XQDvQXRNgY0W3ea76eArVZFtjR0F+L+uKzpUxEHiDb707mf/WRtiGvzh7N4WYLR+v0XKevPoHa450sbLzYbdWQWWY6/GFCpNepWF40rHkhOPDd215pY6EtFBPkrjPOiqAdy1cDZxgJ4w/wfODmN+hHbGWp97tYjHHn4kbsQuiGjrUG57bQQ/uSXJ6xZKvjWoV/0jsj3ECicn49Pqf386NNYoY5HxaOi2ADMlNhEofUYbd+iOZ2SdldbgPvyEtQMNzLozWw== 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 DU4PR04MB10361.eurprd04.prod.outlook.com (2603:10a6:10:55d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 07:58:26 +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; Mon, 16 Dec 2024 07:58:26 +0000 From: Larisa Grigore To: Frank.Li@nxp.com Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH 1/8] dmaengine: fsl-edma: select of_dma_xlate based on the dmamuxs presence Date: Mon, 16 Dec 2024 09:58:11 +0200 Message-ID: <20241216075819.2066772-2-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> References: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR04CA0108.eurprd04.prod.outlook.com (2603:10a6:208:be::49) 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_|DU4PR04MB10361:EE_ X-MS-Office365-Filtering-Correlation-Id: 06176cb0-50da-4be9-f314-08dd1da76bdf 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|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?KhW0PWqz/Ohk1HAO78PnuDqZ7Qaao5k?= =?utf-8?q?d6O44EU3BMvWCzuv42YBNdE5P5bsJkBTe3WpqFoZ7lKayIB1jWW7/sLNpOy6OvKyX?= =?utf-8?q?nJH8kUnJtbhHJrJUL7tj+q4u+G+HF7cdyQu+Ha3Io1ZKJZ4paCeVhIJ7wPVZiU19h?= =?utf-8?q?FwvO4G07usV9aHcGlXbmKtsn4W6fUcAJFZS86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6zMro5iU+csUsJXHI?= =?utf-8?q?MqCUBD6daKXAiyo24clkDjoCI/Du1X17FrXtXdrDV4hPMr6yzO5ob2gkcj+GKcQRl?= =?utf-8?q?dx1WBT96d3nxggnJoX8vFbJYuLt/rqEfDnApbL6bu+R12un//TAbY1tIvkf47XLyd?= =?utf-8?q?rwULf0J9B7l2PMhoHtXnelcuKppXM+5To3EEg+yY+gbZES3McWweIUnb0j0qDmSUW?= =?utf-8?q?tKwbJiM1Yn1cU5X4aBPS6VDxCHgYPTIzME8PmjEQM7zwRrH97DK5oZh8YiRE3oHxg?= =?utf-8?q?iOpuXkxXKwdN?= 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)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Gf5agLMAAXqJWUf05tWQkyF8Cu1N?= =?utf-8?q?d4+bxijIQoAONaiZcKMnTfkG6mGZeLIsA5L/VevyH+aZ7/cZMh7z+DiMpY2NN8lqS?= =?utf-8?q?B7oEwtBRGhKPcXIYr7wVmxYdMVFR7m20a0QvsL2qv1GqRMsYMUuyX+9p3JdI0A+dr?= =?utf-8?q?7fA5H9VipQgMKz2OyuPbJtISdu4KlXZ17JbV9SLv6w0P/x4LKrtQNv3w5PgFX6hqE?= =?utf-8?q?3OmFjE32IeC89hDTp5ji80FrMFyh8+4d1u/yVQzXI4l505sd9Ed7J7rTaiWItWQSp?= =?utf-8?q?L100gs8ou6lLhO/6QnLjig2o5IHYPDkD08V3TLK4o6wn6PyYM7/TPsnTJb2lNCEZW?= =?utf-8?q?/hWrogy4tgT+hmcJOCRuKrFYhH0ufBfOU6fWJT3fdjzq1WWw9Jw05DC26YAo7cXQA?= =?utf-8?q?eSLwjjOI9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T0BxtwRMwiCk5GwOq/Rk4Acjk5MuEhoP6XgkJlX+8mcT/5RS4h?= =?utf-8?q?aZYSrYbjOneWeh49rviFMxjBEMDe/UhJVzncH33wgH8xy4TmG4d5RJBg7k5Ue4OIy?= =?utf-8?q?sCUH3YjzOe6JjQzU5pZ3Ab/Rx+QFGvXXoUGnJm/zHR2MOW8zrmkAWcVLLqIfEqzn4?= =?utf-8?q?IfaFQrd8bIFNC/YicLbpyJFhJQO6OHEEZzJkjaR15XjbD/+prnnbro8Uv2aNOYjgg?= =?utf-8?q?uJ/W4xpb6wye?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06176cb0-50da-4be9-f314-08dd1da76bdf X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2024 07:58:26.4884 (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: Mc6KEIWXzh1I6ZDPQaMkhizpJI2r68B7Zwbp2pLWWh53HdSNLivMTgERVWhCumF1W85rJlE5c1VbSAkz4PInbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10361 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 Mon Dec 16 07:58:12 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: 13909330 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (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 3EA981FF7B5 for ; Mon, 16 Dec 2024 07:58:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335915; cv=fail; b=A+/AA0vDniN4mSZIBsQyd38A9y3LkdTU3pGFSJrn9QVyzjfLTNVV+rrahgpjUpbK8XTY8BQyks/bBMp8QuufW+8hd91vB3b8DDskoq2jGOPTWjTgiCiGTea/WHr7XRajiEXjYVfm1F2sSP6Ih7FxVsAmuP1XyAcy9IQoAh3BZmk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335915; c=relaxed/simple; bh=4RvqRw53/gE8ei8QYh3kZPxplhESxMfoCabtJ/xdZFU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=eGU1J0dTLHAV9JxUTs/hqofkAH90SAIpoQxUw5Y/E4BBKSStRcArRXM4/cD4IbyilRSLq/dYDinqwxXypLDMug+y2SaSmEXT4n+BH8sp7ZOMbY7He6DgHVyKSMB7UyJXZsiUZhjAf1q7RAhOZ86Vn7ZiYJEXcsyYOEhSkafraIY= 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=m09XuUgB; arc=fail smtp.client-ip=40.107.20.41 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="m09XuUgB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wGoH3fghyZ1GJG5yP0/TnS7+++DOG46JLSmV/EfV1XRYUtCbsoDA57tOcVhBnj4BroQl9fALW1H0WQaPgDS+GmNzdEkbbWHRbVzYM+ls0as2QetVBr8XhOCd98XudqZErzBEXCoYIo6uQI6QoPdCd7tQZ19mMi1qHljZuYKdvwiIyP5Tqui/g+0a06Dh0Jz2Im3CONAkmZ1kgnR6UJP5mCcZzeTDAc96MiJGFLmMy6rTogZqqwA2ooaZsqox7YLUmZYar7B6kCBaKXQZCGTpADIdtOO7Zb53rfs+KI7+/EXOOwIQrd63OokNXLZ/0QOiIxL8hXaFTT9F2yPG0QhyUg== 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=oVj0tlAE8xUm+s8V2QlwaulZloHv7aYC5xKhXGA537M=; b=CMhgZ4FBF9kdwcLeZBsxTsUURkb96UuPT3Yo/yymiW7zx3uUdWkAyoak+UWYo53HQKTo+hvMwtx9zFV2wMXuoMIGncnhW3eErwbPr3NWaRdUBQrfEgxfjvlOf8h7mRMPIizJ9LvL6bF7cS1IJTPC1569f7l3Q1mTCxk/5UWIX6Pnjcs+fdc8NrTdkIsiYb5ZvQ2gjdajUP6X7yqDHEv+vJac9spQxgqABJ5qcvyEEadi6hFbNP+8EXEuwlOQx/AzSUwteAjYgmURdSj/aJhmI8IFx1fyN9yxbfeCidS8QCnExh7T3pTTRq2KykgI3Modw1dAF226ymu0BULDUNFrCg== 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=oVj0tlAE8xUm+s8V2QlwaulZloHv7aYC5xKhXGA537M=; b=m09XuUgB0pl8wRz4DFaj18JOTyiSd0Xs9vMwPeAvdhHSTDcSeX4g8lJyTQa6s63BxBVyR8eYt81DHiPDV6yDpk1axAB4+uIH3QI5Yf6RNi+OaWuxyaWvihrbYS71Xg0S0HLgzasvYZ9IAQbNPy9bRhZKCJ32DZhcycBWnIDqYzUb4KEmDze12UZHJvLS2aU1c0Q7kpDzhKaakz6NogxHYLpSOisIOkkOzDGbCHzlUsVz7T4/CsgWkC7I59tkRmHoNwJCbh/Iful5s3Xb9kttgwaWl5h49RDX2fF4hGIIgZUd4ZyfFsrnXI7hEbaD00GRr//S8Qo7Ag83dIY3Y7QnTw== 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 DU4PR04MB10361.eurprd04.prod.outlook.com (2603:10a6:10:55d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 07:58:28 +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; Mon, 16 Dec 2024 07:58:28 +0000 From: Larisa Grigore To: Frank.Li@nxp.com Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH 2/8] dmaengine: fsl-edma: remove FSL_EDMA_DRV_SPLIT_REG check when parsing muxbase Date: Mon, 16 Dec 2024 09:58:12 +0200 Message-ID: <20241216075819.2066772-3-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> References: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR04CA0080.eurprd04.prod.outlook.com (2603:10a6:208:be::21) 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_|DU4PR04MB10361:EE_ X-MS-Office365-Filtering-Correlation-Id: 866eec43-0fd9-418f-f2b6-08dd1da76cd5 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|376014|1800799024; X-Microsoft-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NzskEDK7C8UhX/TQXrS/Z2KnkMmQ2E6MuKp2gWc/zXAG8mOBvH4fh?= =?utf-8?q?7zgELkn++ChbApr6Q58NJFXyDiQNatHiLJMWPMbZdVxfMw+l1WMqkiAKF1hQX1MdN?= =?utf-8?q?JMAY0Q6I3kcAGEBWJPfuk2QSbVnpKKDwDSGmzaYISMjsc84IL6tH5usDKRwVaOAvM?= =?utf-8?q?RZ9+IXerwJgJIAkfrC8i9X03/BY6dxlPsMKAJPF6+WQyreFccgcbvgsnthabZ1NmE?= =?utf-8?q?RsX98UjIK9IQ3QytzmHXQsbZKrjuCEHdM01bill/cbKtCaILsRF0igyYgGLbs1XzJ?= =?utf-8?q?TNeVKO25YiHCgN0eBnvbNOkrGiJyxmcpQRQ2X60UGDi74n/D2pwHorPPHsHIrM9Zr?= =?utf-8?q?H0mDDTsfMBGmx1Loe45phX5pDsXw7Hsk/VVw7sSwyJuoyNj4o74n+uCbHlzL0HIWk?= =?utf-8?q?n8YDswoZq5a9daqgK7jkmUprrtS3+oMfB6v9ZJC7NpXSeDd73rGLDtGxxFR/zmgNP?= =?utf-8?q?x1SDxccGWJL9?= 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)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?yzugT5MBYs2aj1xjAfoC8SdONuXo?= =?utf-8?q?3BUB1UAtVDdOmkh7+jv6hR0xzzFSVZvbciiBT4ng1BOvxRFCR4GRXNJP538x3oUG+?= =?utf-8?q?vcu46S2d5+B+8G4RNFbMic9iANIiVka0DouL0CpSl7MJtD9mqN/mwlTE3bU5tObj8?= =?utf-8?q?Ypap2rX5nOM+hqEm067cTL5lgC3XYBRWmzNFHwq7FZyWmzC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uKyz7sfZQ?= =?utf-8?q?e/F9Tja5CBIM09zarpwxiCbLjo32y2By6gjAsrcAjdsBDAUdjBhvoIqcuwLjnA56H?= =?utf-8?q?XQlL5nqGIIt2fKeKtQyh49rBTdVjHhWkqWU4EiezNrB0b3lVNR5W/chqSSN9W69Fh?= =?utf-8?q?7l+R4hXzLdrVsNokdSJKD3zlcVKhHpCWFV4vhnLGK1howS1ts2m4JC9JGI7lpSt0A?= =?utf-8?q?JgPp+3r1bAWMOzcJf6mhZmhHlxaOzjgCJ5HjYvJHwgL4CC53Gcn1VITKZ4wRGgfBD?= =?utf-8?q?fRprhQbghmbSKsUDbEGRb84cIWTdB1h1/80GN0EsnslVy6uo8eGDGOAi8fiuwvIMC?= =?utf-8?q?YfuM7TaB2448nO+F8vR8maZ094nNWRO6KJbPwBmt0Z5jBSY6Vy4F/u02+ZaNkQhXd?= =?utf-8?q?7tfueNygdHNPZK3NtyBIzbcV8LMjwcr5MEza4+o6IDjWdXElHFHrgXQ/HjI7kO+wm?= =?utf-8?q?zCugCWToiCHH?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 866eec43-0fd9-418f-f2b6-08dd1da76cd5 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2024 07:58:28.0982 (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: d+5rXYWj31qaQPR0c2gtH78QeVe2y3617lPtUBAMuVnXKBVbrF/Vg818P4EJsyTA879gL5K5FIGNDG2JDJevZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10361 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 Mon Dec 16 07:58:13 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: 13909331 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (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 566961FF7B5 for ; Mon, 16 Dec 2024 07:58:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335917; cv=fail; b=LdthSUFSsaG6WS2OUOMdX/mg/WbKwAnKD/Y4fGw2UWK9yLpPUn2vX+rD/QMD0xXeiA2OACd++W0/m0clHzbzQet9XLQ1JswVRZIhd1ReR+BAxpUPZyDXM+ttGlPis6B/B48NnC3AasP9bzff8HHvNPZsQTdSqMJjqkhyq1H9DMA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335917; c=relaxed/simple; bh=hoC/8j7Aw2+ZwBS8LuDJ4kHSWCEk88ZD9MGKraAll0Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=WmH+1QQYIbFIHx80PqvKDnoNCjAe2sypIMknqbXukT8lHZGw+iGc3EH/UyM+YEBoDC+J2rqgkeNFw/e3l3fE7/h0WsXdMMr1JUDdTqYdpmlCBwOnY/4BMGFtScnyrasjQXRReCY/rAjvBnUKoOFjukYZu2Vjxzhoysw/aAP4RBA= 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=lGHU5x5K; arc=fail smtp.client-ip=40.107.20.41 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="lGHU5x5K" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QMGGiJBXUpe9NsH/PEknIigkdvUGLFBh+7YuEOPeExrqUi+mDhn6nG/PeBuc2uHUAiH0Z3TP2cNPvTPcvX9Ofk1ezyoOZb9g9IzulB2Ui9wv/+uHa4UjTWj7kZ1EuP81cBanz6GHr/RmMuFsguBmC/0FNP4iLQg4gppgHrAFJqZyASHRGzCT3iXfDc8vn3yXjZAJ9Bgd/APy21WQN/Ooy6wDoFGD/086o5gYTPGveii7SNGvTgQlk553MKfPpFZotwPC+djeIAENa02eat/iiYJhRAXPPH/8JSLkOW/bIhTf2lfA56aH/iLIv4bCVBRseu5t/VTcBGcsFUOBgGPWAw== 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=RpjL3UpDhlGU8cK6OFygpbSRbkq5xgfG+Nf5MiagAt4=; b=McjjEn+u/49DQaXMT7cmOxNbUrS8xirY0AqgCVMHtW8d/YhUOMiDeYH6S9OzmhdBI2Pnoptwwh0VxEhWFSDy4vUei31lR6OP2I68EfWqQWZzkLIdZtuDo1uDb8Zq+slUeqNMU7OD86wv9Z75711p4599uGSypAkOiYF2HAPpcwloKIcdOednOicejDrUZ+L1xoidpdlMSSrm81UEhHhHzz0I9WpmY7SiTEnmuL3cFYbXITYX0pUAxFgtfcCORHZMir8NsiDKJDPjkCxtDK4DC4tzQcKgov6KjPTZRB8m/9Sw/AcGVbbESlYAkdJTjMEuvQbT7WXuXAPRASIbz7pCAA== 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=RpjL3UpDhlGU8cK6OFygpbSRbkq5xgfG+Nf5MiagAt4=; b=lGHU5x5K6Li8gpcNNe0qH8L/SHafOod5xNsz7rU13trtl4mRG1K1bSy/UU/R+pcJfqOBCBl4YkRnveea7IGjeHKejK3LPOpv5pSn+YMqbmMoidPMLGlTTS1eDDE0N1t0mf7qZEM8ILjpopFiidHwGG7DEE38a0Na4CKbdCQW4s9cwZ5q8OyUAFa/clSf0JtazsrKuecgKi6xCmar+OIAUJCnInOYHlP6kM7y25nrxQxqhSboTJyLC1e1nFilzDnXcHTkMVIyyugLmPTCywMXrbmgXoBTYhtBIrnTrKhhoVCTFwH6Lq39pFzioTMYgwrbAK7rxmUt5nuPV7tPrJ2W/A== 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 DU4PR04MB10361.eurprd04.prod.outlook.com (2603:10a6:10:55d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 07:58:29 +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; Mon, 16 Dec 2024 07:58:29 +0000 From: Larisa Grigore To: Frank.Li@nxp.com Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH 3/8] =?utf-8?q?dmaengine=3A_fsl-edma=3A_move_eDMAv2_related_?= =?utf-8?q?registers_to_a_new_structure_=E2=80=99edma2=5Fregs=E2=80=99?= Date: Mon, 16 Dec 2024 09:58:13 +0200 Message-ID: <20241216075819.2066772-4-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> References: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR04CA0084.eurprd04.prod.outlook.com (2603:10a6:208:be::25) 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_|DU4PR04MB10361:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b5d47f9-1d7a-413d-7f6f-08dd1da76dd5 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|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?tJF1ywnwxd/i3PIicsJQwTmzpQ2GIlR?= =?utf-8?q?9KhEMjkjguoOvoCylp6xdQtzRkLQnOmNUxGRzEMWxNfS05Uf/j1quOVDOemA9LAvN?= =?utf-8?q?k0ibr3ScHTZM0No912JfZAaQ/J8c1BxtqCvbhxh1Z/6165GD8tqWIrO/Al1TM5G2I?= =?utf-8?q?zjDtntc1AZRBn4Ci69aRtZRs+7ZNHW6hfjhNNVs8f5JfW3VlsAOvAT0xsxLM9o1xa?= =?utf-8?q?CET/HJ+pPvZ/uHKrALOJ+ib4s6I30KjzCdjRHaq9/GSfumSYwk3eU9AG7/LIXSPha?= =?utf-8?q?SQX+fOobjP6DMEB0fzJiEWw9mQjlkZyzTCfQY7OLZz0Y9VUYDT2ikWQXE9+jdwRXS?= =?utf-8?q?FUXIDfmLMdwx04hHekdv0r0Ki6sanZmFuJWP7uYloaP+XBN+qvL6cCjyyXj3CLVL4?= =?utf-8?q?WUC6/mngKVqnZpqE44yEx2gVn1o04ecMpSmo+B/pcth6Yexap0XLcA3QlukoIywMQ?= =?utf-8?q?OOOWEFYA6cwrixkzKAFtegQp2V+/5kp65xH67Nf3HpsA1GtUt4u46k5YtHnWCGyW6?= =?utf-8?q?pTfeqxa36wIfdATc/rogGbpFl7FYafESnYIHWuFPUOvNSREPJwkKX/xgigl/Snefm?= =?utf-8?q?CvDXjJU+8tOVcVRoObKfS8JpvfI7dT0l0Ak/e8PABfnEdq3Qsmbo8sKYRVDcgzfFu?= =?utf-8?q?GvDWvf5lJzsDm49arzLgyWBI9fDwIAPbGiQhGXYkmPm8Pax0lXRRvqDB+5up6nzTi?= =?utf-8?q?7L1YcMof1Hy6rhsWtSWjL5F0xqkTbts5rS8ls43EvS2eKMmjGUgnPNwrK6lsan65z?= =?utf-8?q?5wY4/oxs/IJXvMVsdv49gU6XXbZa0NlIsJloTZ+il6HlEa18D1MtbxNaK8/5WwlaJ?= =?utf-8?q?UMCw1hpCCGm793LSr4quIdUwAefwTItI6Sx1dz+zTIsxuhq2H11ractarXCohu2+A?= =?utf-8?q?aXoziK+8Uq9U/gwyzUYTESjN1ZwUm2Ghr5Gpsph1H73cThq6G3T/yEtqvJARVI0Zz?= =?utf-8?q?OL5rAKN9lc8rZMBJUD0y33/ysWxVEJwt0FxVc3/LohXlKDkVsopMrs04CaorDoNp3?= =?utf-8?q?o6y94rIEcGSxhHSIamza27XpefkTrtDLfsauer+qSddVEnMG3lqVYn41UWUZ5YqAE?= =?utf-8?q?lvVDBnWWmRnLcNzkMK9C9ZVirduFvSD59urJ40VLtK5NsuMfZCnE+fPsVeBaaXLtn?= =?utf-8?q?BhLKUpZCwCj4aouygJDGLVDshI9xAgCSg6D++7c9W/Pt7XKmTQFjI+DlnQP9DGVZn?= =?utf-8?q?zqAXuq/KW9+YAIDytml2KURUDwzt9CijG+PKmApSFpSU+kWDPX5NK3pQYzqS9mONr?= =?utf-8?q?qPkeLkqhfq/Mou4VienvkQ4uVf9oqMKt83CHaLq9TVw8Jhl7ypayT7IuiHUHMtAPH?= =?utf-8?q?DtpVs2pGhOa+?= 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)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-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O2v1/kLIXRXH/WfIJGuaIqn7uwswRnxyhYybSDgl?= =?utf-8?q?5lpu/MNK6vv6lqqvE85oh6UBWs5hVXfiHzQKOfxU6UhYqiCI4SQlOX0ulx9sg0htv?= =?utf-8?q?4TKDR0F85dgKfdfXSss/dLWMuIjwbEVqPzdJJH1brw+t+hjI6/lFNLZsz3+y8qn5+?= =?utf-8?q?DWxur1QhtGHxkisafEh3bksUDGPFJ0e3MzdfHjTsELfnv6XDt/QI18vv6LzyZyHLa?= =?utf-8?q?/x/SDJ3Ie4us5cPvprdPwPpGGRA2bsxwu8D4V2jT7DRxDSBTajCQEpmeg/baIZUdF?= =?utf-8?q?ZEwdX5KrHGUEZ5uS09RmszQv/E9aOXrA02jk13U1rlGlh4BANrY971bDlJJAnbD1K?= =?utf-8?q?jgmkpbczkyS/J1iBK9IIh88BXB7cii8XbUU5OEhHMU/lBSv2eph+/dPlxG1ANJMHO?= =?utf-8?q?uK8T16T8iol8rima+HjDr8xeMYDLt8TylURayBThiufN+yHw0PVHMjUTmA77q1wUc?= =?utf-8?q?t4H2RgTAUpp/bnI5nit/bc44fwDoNeSXcjxg5LgClUf48hZ973+nJ4pKjbRUeCk5C?= =?utf-8?q?Jb3tkUesj8P78HRvkeXIwoHYhJTHea8xqr1IfMbR9IdrfxLqcAsFq8/0vi/5M2/uy?= =?utf-8?q?aGThJy9CWogFp7lpUOMtGH3bQ6gJa6HgBs0cvhv873jpCf8B82I8WkpzOZTUfUts2?= =?utf-8?q?HmWwbTqeyYuP?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b5d47f9-1d7a-413d-7f6f-08dd1da76dd5 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2024 07:58:29.7397 (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: b0TIst55EVfbhdjfymyy7aD8Yq6NsH68uY+4CR/23CReWMp65oN1taiCaA1dpgfWaT4cPUTB2HrR5+MzqqHicA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10361 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); From patchwork Mon Dec 16 07:58:14 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: 13909332 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (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 B08C11FF7B5 for ; Mon, 16 Dec 2024 07:58:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335919; cv=fail; b=l7VikzN2kcwbCojnvoCk9J3oaGS09P18MMWklWEOEGrJL3uauLNlfsTWFX19BZE5nIfV+z86/ZpAtzPrnC+DxeqtxsjOHca7lrzrOBOQbIJ1l7zql9RLVWZ6jJr3vXJkNxsawWmiRCXV7TQgXQ1PxuHv3ibiNx7I4xLnS0a0pi8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335919; c=relaxed/simple; bh=g0hyPjcqAZkv+r7RgWj/ak9g/4MZz3NBUpdZHO89b9w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=FLj1SL7ylBuq+oNWYSeLm6Nmg3Au8k95aScQdQ9vSochr6gFO7TW2QcMgTBpxuGix9b7Yn2ev3sZUmxbbW6ZzV56a1PO41FDnnZoqaPInZrqPyWFuOv032ehc/NGahG4t5xM/V74E/tUSBDbJwvxkZA+PWqGnLDlclwqczyoB8U= 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=av7Ty9kF; arc=fail smtp.client-ip=40.107.20.41 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="av7Ty9kF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Kt/2tKbpLFFSMdKQMKiuWDPxGDMok9S0vHpn2PWvttp3MXFGry5uaiHpZAjYH8umom7cHcb1wWc3lhDvpm9milOKPO64fhIDu7HxXOE9b7/S3auHEQjEO9CvV9daKJIMR+M5WMy4eZv4d74dY7luTNCwRuHEzyQDEyWMbSw36QuGC9gf27CRbM1Pp6szud6YOni7EqSuKPUOkrqWxU08E4TRJQegR7YPFOBqoVJIHyItQzde8NzEqNa9/MsdwIDt3WpNAMuRySpPw327Dd991odqyCIDMaWpk28h0hie8cEfQXFvvQdus/glRq5vuFCL26iWpNEmjZLj8CuTg5GXzA== 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=9IYbNyROv4P5mouCNyViMuQSGpX+YC+WB51W6BWVdOM=; b=C28B5skTeIJHs1FJSvEK+4unjIaEuaIjnMmVeAC1lXIsmxOqpvKTSYk6yyHK4+aGz2jBHUXlKx9fzWByqf9MSDZI3kpnIZayU62SNrG2mou0fO8cQxDZ4XbDL26IKUH8B3AGi3BmUGkk30hpgd1LdIGr6GyjP9xqRBASuQ+11XTU9JH4jGM4LoIhssVnFicGEJDK0znv7P8hk0u4zHYZodeB0vkefhrus/coPo9yyjeDv63zbWpjkmqcVyU4Q6zwUtSbT1oeA7F0zdRYogthG2+qOU4RCfJzcP1dqbo+GG0Ptv+dc5IVfx/a5qM5Vyb3TRMI5L4NHTwysV6upFtk+Q== 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=9IYbNyROv4P5mouCNyViMuQSGpX+YC+WB51W6BWVdOM=; b=av7Ty9kFwJ+S3MN9SFgPQD+31trjXy3TB/7GDvELP7ov1GWWrKjUGLqaIZuz0vU9FLPtCwZTfpCbMYSJNcEf0RHVxlNFYdQESF+gbfPXAPyEPmlRAg5qZ5+QU8qHRS/SDxQW0e2AlMVTXmQPmavDuzBdLx8iD7POdfGdI+PlWITH84VFUv9D7qAsJBQi1dayx7GAK1NI7alB12r/aDWY8wVhLOYt4h13TlLNIRE8v1FUEqmPer8CdE5o1471leyF1KaJmg6me+MK6T9sxv69+lGQEpsYfeK4ap+oYiBxQ88eBFpW/4pdSYuAjt3fC+rM3R1ci9s9oj2lcwjMrKvOBA== 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 DU4PR04MB10361.eurprd04.prod.outlook.com (2603:10a6:10:55d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 07:58:32 +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; Mon, 16 Dec 2024 07:58:31 +0000 From: Larisa Grigore To: Frank.Li@nxp.com Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH 4/8] dmaengine: fsl-edma: add eDMAv3 registers to edma_regs Date: Mon, 16 Dec 2024 09:58:14 +0200 Message-ID: <20241216075819.2066772-5-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> References: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR04CA0086.eurprd04.prod.outlook.com (2603:10a6:208:be::27) 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_|DU4PR04MB10361:EE_ X-MS-Office365-Filtering-Correlation-Id: a9d302f4-aad1-4952-1db5-08dd1da76ec1 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|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?fKslHeVLxdR7jfabaQKeWb0lqNrLArb?= =?utf-8?q?NPNDQLv1RBdhpRi374bEeRXTxfdctoC6aaCHYQ26VVuSU5FMhGJYfbF17525h+w8D?= =?utf-8?q?TT7sXX8BVKk8640qj746Rpi+h4GnbM+MJKvPam3kDuFUQRHAx9HzCHPI/WyK4XIcs?= =?utf-8?q?NaBUFkod3tifmskRdMr89Ji25MwqAgjJ20x5iVT0UviAKIlgwhVAMhYMMfog5fS7+?= =?utf-8?q?2Xcy4TePjCO0GhGZJgeGSIaCgt14hB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Eub09DX+7yGPX79GzJq0m4/o7INdEssyU3u?= =?utf-8?q?N0JtEjir2cWNsxYFMXxf2l2VlihEe0maMxg6QZOWPlurYy2dc5sy+vmuJiGhwQZUG?= =?utf-8?q?j3Uh0H1Z7AXweJvsHQ5WoR9QIwj1VHeohETUpjhTgjNVMIC8Rkowd7pjcCi0jUHEo?= =?utf-8?q?GE5GeODsMpw90LNzCX0Ra+txxt7I5CwpiEqKsEzHHTarbgQ1ImlRYaVsFTZ60eiYB?= =?utf-8?q?zhFJGP0+6P0r?= 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)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Tzqd0oARP3AAU7OPDEaXQs2nu6Wv?= =?utf-8?q?QVTezUD5XH/NhoyWkZ5U4wy0B5f7Vxv1iKIkKKYJWizFmV5sy3/jtdwUx9mHbYQDO?= =?utf-8?q?eEY5H1LxnKSOuOrbcQ/k/GKE19UkLVRU3elM32LU1Xjk41xzpTu/k1ERbMiuWnSWd?= =?utf-8?q?tML9oksxz6q3CzRpDvL3YKYvOYgfMVx/wECM2wABrFB7VGF1ixNB7ViiYUMumGGdK?= =?utf-8?q?w65i+E2c2eP3Vyx8zsmvH6mM8XySSXGSp8y8cO2mIKYJItsXvXC9TloZhhtfF3lWc?= =?utf-8?q?uy/ElISF2N0aYjJlTRW38DyihmtXyLOTZmRAx+Iz4Lf+IyZ/ADuPxSxJhCX6qwr7D?= =?utf-8?q?69WHSqESvpHnbLzxkkKC8AtNx+5Rvk3Wj/2GgXPO1WIQNf36CrL5Gxk9vMvNxhBdY?= =?utf-8?q?5PBgf79awbMDQeBFfbulRMTvo6XSVBfr3mUHJnCAywIBiR3nTQZFXw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riAuHXGCYnWhZ0NmgE0m153bC?= =?utf-8?q?FD/x35PAuqYNlFY1LXQI0mcPeZDeYH0vJ2DF9e1flbOOO9M3TZ6FBcKzdqLSgMGiV?= =?utf-8?q?YWktg7JFwwxfCKFFWALo75M3KG067ivdJ5xfVWsvdqEUDtXHfuz6RMxMp+N7eBUlC?= =?utf-8?q?C5opT7z6VJGI2W5J57njAizf9u3DxSwe/AgeBwLB3kHLIbRel59jc9XOHZaaeb0WV?= =?utf-8?q?N1AeiqyCwKTd?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9d302f4-aad1-4952-1db5-08dd1da76ec1 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2024 07:58:31.9032 (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: EhbQ08t7TeONy0YOmcWECUI7mp2xnNFyzRm1+o/7lxYOkxwAHuF077DweJq51uHymx8NZgWyNd1u7Bdo5kIzxg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10361 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"); From patchwork Mon Dec 16 07:58:15 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: 13909333 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (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 042CD1FF7B5 for ; Mon, 16 Dec 2024 07:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335921; cv=fail; b=MzIFVbgdwnU6n81PGlVCNAWMxVB2ZpIyW6aWRjnAgOWs8QGonyXGTrKEb2dUriVb2nosvNQ+vKHMTjEsSQByqCR1pMu+U+6/FTGJgJZ8hLvwDILslBMFXjtJCOUlyhzGeDDH1bT8bXDSHmjXiU+UdtejwaO+bHDMxYbfqnww0uk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335921; c=relaxed/simple; bh=7P8iy+1K7O+WsqldVxSfHKaqm9+AtvwDcCl6yXl8WmI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=ARgsQp3YkeaRmjmcZ/B/eI4zc+q84VmB8Ee7MWiZ5qxcPp0tlquB6o5QSWvafEDxKOH7cqVyc4bcQ9C9B+PVAJ6EfCgeWXwK8ICNSmtR6V0LFVS0gU5Q+L6Qg/Zgq0iS1rZ3B3Zg1z8gzpQc7dq2N5P+7nf3MBu8eVG8liTztew= 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=VuVn1tm9; arc=fail smtp.client-ip=40.107.20.41 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="VuVn1tm9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jG6kWGHZ/RQas0ELCmWPym6evuW27g3P8KIlDwNdgf8Jh8no75UTOsVK5cIo6E+El+l16SMx3rUeSLFa3rIDHMpcVXH0W+9oKzawKIj986QdrxrgmPJ/2qJjMGzI9+dNIsfFy/ZbkOJbnfEt5By8gMV+CgP58+KPltaFpokZlGBKr0Ur5nz3DdnKzbMKyPN0ZRD0qomk9+3orixQS8kbZdFiCLWE8pMAeRCgFVkCMRnf3CGlMVT7iPNNxPHRfuxC64g1pe9SqWIHld7kQCi6sJk56eqbEMogsLu02sE+5ypwQp67/V9Jxt0oF79gz+EcHY+yP10GsF/Val3wmLGzqg== 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=Mt0jsr+pIJWqbLu1JPSusncKOHpHouhnLY8gLp53tRo=; b=SJaPNFbUvEWGIbdOJeVclWrppl+hB01jrLSOcPBnRUcxDoi+Wn0iSGgeT5e/lNvIzCMy5CTPxf8PWcoM9CDcAOiNVsv2Y1TqV2OL2nZ0GWk9lptO32tQ5sQvPhEE2tONda0FPL6Yj448CsjQq1ryWDPzUCjfH6g2BSFG7ewYvMwE2yq5zlaKeXMPWjT8jFsLFkYo+R4CJ1cyVt+Mg0MuZSI5+vbRc+5lizjM2zdVub6gi4/kwIO/11SWOmcY3q4CHumEPiDHrjwUJQjC3mJXDBI1O1a0KNTXYqHmubVgTrfQOjf6rJpse2FJOvlqeSRU+EQipaaqrprxPEd5Z4GRbg== 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=Mt0jsr+pIJWqbLu1JPSusncKOHpHouhnLY8gLp53tRo=; b=VuVn1tm9lcK7MUBOyHlBx+xcy+xBUUduDNtbxwbQzRYfUyWdSgMxqx1LmsAWMSPcw0sDxV5TDKCsB3M2V4dHcytuJsg4qoRfheeWHgQdlbmthhNAHJCxiYIC0sN4OSujzNl5gML5eF5eyOTckf+N9pFM+oVF7RdJr9zbmyTNccdyKnjHCu7gSK4npyhKIaiI/oIoOiK+Y0pLEVKmpQVwDO+IqLPmWgyiPoKM5zFbG56KWWx90pdjX9+yB2C2Db417IaScEMl95rCnVcPw6HEfKFxKZIut1qVmiT9BpiXoGXEiFsqDMmb7/dkpGUNA2Ljw0yzOY80GNGs+3cy4j1xlA== 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 DU4PR04MB10361.eurprd04.prod.outlook.com (2603:10a6:10:55d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 07:58:34 +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; Mon, 16 Dec 2024 07:58:33 +0000 From: Larisa Grigore To: Frank.Li@nxp.com Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH 5/8] dt-bindings: dma: fsl-edma: add nxp,s32g2-edma compatible string Date: Mon, 16 Dec 2024 09:58:15 +0200 Message-ID: <20241216075819.2066772-6-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> References: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR04CA0080.eurprd04.prod.outlook.com (2603:10a6:208:be::21) 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_|DU4PR04MB10361:EE_ X-MS-Office365-Filtering-Correlation-Id: e3414a4d-dfb2-4583-a055-08dd1da77007 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|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?hb+KzTLaIq4R0yo3G5Ddtbte+5W3UKc?= =?utf-8?q?wvUyr6J/IsgklxV4weoFhesiBUT5uX1z40+7lDPi49hWZJ9A+laS9LSDfkXZSE15J?= =?utf-8?q?fUxJGtNr0Qix6jk3H/UVUmEgT6Zh7keXw5Oms/AZdG21lIk7KB1nvdKW77+YTCWsd?= =?utf-8?q?STOvDlAdoTFrYu/gugFR012nKu3mOTa8RRssKBIgCtCIqFB7zBlyEmaxUWGXuuGXr?= =?utf-8?q?j89VB3FR9W8HXXdXV0n4eMsNciEUn0HLOQxi85hIrk+30jzQ55q27t4YKfXHf70OX?= =?utf-8?q?Idj56j+3uk14UNzd6hvzlXp9xrz3l5fjvpm9ZxnX/r0qIfJbG5/7dHANZxhYfJMjv?= =?utf-8?q?+XlPDxSL7wgiyhrQFvW2W+PKCh/F1qQ0XXvkXWufu+37Z66dXAQEWKkUhz9N3k0qw?= =?utf-8?q?8Rv+DqYk50oG43U+DGnZN82PkbVKWMxN7/HwYzHN5WPrOAkAw4LBLzsFhlYuyfuoa?= =?utf-8?q?N2iEfbCzEf5qBqKpfgNrMusAaAwtSAmevnX29rCc36niEr/KNjOoYXeXUj5mjrCfl?= =?utf-8?q?hNwfzvOd/+2yvqeko9AEsMN0D1VnsUyC6E1tjFDWSlNQvm1Wo49FSE5Zw7qHfG50Z?= =?utf-8?q?YaiQQF1KS916oFt/FGV8Thj0YChmNx0rNnHVrsxgjj3Q11yXMZpp+feIYGVt9CnTd?= =?utf-8?q?zdcfQ0zn81b3io0bRrNSJXgH6fvbQ1glsE7xGOISnUxVls3ojbKTkpZR/JK3Xk1/z?= =?utf-8?q?D+Pa89C82sQmHljjXITcRCxsljVmX1zljX5dpAJ4KpU4VM9Maz7M2lYl7Endh7gI2?= =?utf-8?q?Gt2aHfyiYEyw2PQkg2L9MnqgcM4rc1DvhbF97TzRvC9SfVgj4Yq+I7pNn2oHwzgIh?= =?utf-8?q?8By/wdlFuSuZr76wf5cJTxq3QlCMjlXdDqgq7eTigAKtIiaH0+sG+qYiEYF2AlG/P?= =?utf-8?q?sQ2g8fjoVasgvOZ5ZU8BponE0OHpHrqMKhkIjp4BqF3NSzj/ZwUhlWddqVmz3B278?= =?utf-8?q?qq+11MadHR9cULwOP+bd3mJBpjfj7pFFxc+gjw8AsW4L7ZKiH22VNVEvJeXy0kK3S?= =?utf-8?q?mDm4hVPWegT7BKKsyEKv/u75/R2WpJ8CD2OS1avWbhHB8Uvt7f9t1Av8u5LFGRWkP?= =?utf-8?q?fS3BRSXRhDBTub/7XtksVaM2WaJaS2kb22ioPd8erf7BVPQkH/QBanH/Sa5VcoHhr?= =?utf-8?q?6ynN+l6Vj7hLENwsfqs4p+h3G3MxfftZAXyb27DttRhM5Qf7oTH4t2rtu+Q3oJPy5?= =?utf-8?q?4cOEmUcPx8HT9gJXj3/9HBjXWowsd3XYZYMIrZeRWCSCwrceL9mTrl3qKnKpcnTtb?= =?utf-8?q?5VvzoosgVEPikSDnEAmDE4IdIA8DeqfMzxs54fcWU9Xw3oe3r5TrsBv9DXWr36EKC?= =?utf-8?q?Z4pxVA47k40C?= 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)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?A2II//EGuHiR6H9d+u2gAdT/Bpsj?= =?utf-8?q?VhWOQcmmT10rftiXckzlIiS24GMEaISPImRpTKbe8H77ofRmT8uBkGAtgjM/ZcJfk?= =?utf-8?q?whSo6caw/ch6OkzkPz3X3iA0vnazl9N64YvuJD8gQK5vzfv9aC3fMo5Ns1x/yvfcu?= =?utf-8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q?cLJXw2QpkYTBqcQMAWXttIY2QbB+qVWkyWv39RTBE3IEOREZ+DJjfBJqCUvKP6f6i?= =?utf-8?q?cb/LDeUdy9Xm7nndyf/CUGVvcTIpJTcd3vFL1HapikMOMrEWGYvSdbkCoHc4l5fW3?= =?utf-8?q?jw8xlzL8EqtqUYhOPjG7ppmLAIymwdm+1LsAC2buTTF5WwNLbPeePEurw7omSKFQ9?= =?utf-8?q?MuerLfixrcVhgqpBQXdUnX8MSXGooNLYRr6MskaFS/CFp26JEO9I6fTFwqvqzkMvb?= =?utf-8?q?XYgH+mCK9whta3SRotYD87TmYA1MfCLL9TEpicFAJGHu0tQyhGoc/KJmpgTXFoGBl?= =?utf-8?q?stJ10SrtEpYGrEkIM2kl+NLPVvKqFxqWqWl1qHPuBhkKslCx3Wuyb1PZ5H/i2jUph?= =?utf-8?q?iWkDbnJj9sRpj1cyt308Br9AZcVJlWQCFWtUrZ/VEs8owaSVi46OKJExQ7idVomhb?= =?utf-8?q?a5PAFwHBeuxnBdo9UztcQYdrxq8LJbev9ay5HlsexuOy/zbuXkV6/YCU2T/xGt11g?= =?utf-8?q?atUMvNIGRlYO?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3414a4d-dfb2-4583-a055-08dd1da77007 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2024 07:58:33.4257 (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: Cm4wrEKeFBENpmXGc0jOnHVN7Yl2DaDmT+P8XvR1i9u64K7DLsBrctpHxFIwfv8IgyUF0M41/Wkw4VYUVjuYnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10361 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 Mon Dec 16 07:58:16 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: 13909334 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (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 0ECB11FF7B7 for ; Mon, 16 Dec 2024 07:58:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335924; cv=fail; b=MSFOZNJa4c1/gvPpjPy4n9YH3OWALJRWqdUBlUEaWN7q+gflISwxXJOiYAuVkHy/GwcRBN0jDe6MJuN3jV94kV66Rvglrwkkf4i6+atliqgEU9OFN3qQuygcNcc3ojIE8IkTtAeVN72dwzkLQ5zc3yzjgdCMEdn+rA5hefclIoI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335924; c=relaxed/simple; bh=NBoQw/AdDf2L/90aAfoyiXpqnbBFwZm7q+nVg3ewCjo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=sQGsNX7pXIFTujke+AeMgApcxn7AyrtfXEvqR8REVpsDc8pcEiS95HkElFW46zGLc7h9s7SdMTpML3VRUb2LZOmastcWdzWee7ZFXtoJkbeY9AmKNtn+azTyu7h5lqFk9MgHecGyATrQ8jHTDWmF3zMnU6Rue9Fa7BP3Vz02KAI= 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=qVQmPqYO; arc=fail smtp.client-ip=40.107.20.41 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="qVQmPqYO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zQlcc7mHUo/kzF2ZQrCfkYQo6PQye1k+npgKVKA43ubGKfPW9xQlkgEAhZgyl/fC+wEvlx7nnM+Yx5mTLu1E1hH093PHrTAehyDnYMG/FFne59ybeYR4TBbztMfS4lofV0xngwwp8v+NHeV4czQ65s17PCuT6s8LGaycNOW7+4B5s7Cl1wR7g8U+9L0dSqYsHsu059GIAsIyl00dVOvUPADJH/1Tzw1R3pj/nPRDo37J8RbuNpEzw8tTi4gnYDuq9VZ77vx0aeVbiNjIREgnSm0tpfdjuhCuWaikbZAsciQv0QAMLT/2rTHIm09KKapFjcviPQIz6I9qFwONqrw4eA== 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=wHxEgU9gLnV0LuycV1V4GglatHZ7PT7InM7xeDPyKQc=; b=SYyY82VzoVYN2JQRtIg77eaLBK8AL4ZPGeYx7qzS72b/dKBqWu5kGQ0bguX5yisCesvoy0lAzy1yoVXF6K0+S86u4s233SL2/FhUbnuUnvM5ZQvjViBLtzskDGEg4ubXSkirLr4yEL4UyuAtuw6ZIP46Fu9UCkn72/J2RfEv/aPGwMJ5BXqIBvvI9R7QDC9xIwFBa9+uXlS9HWt2k2eggshoHC1pwAfjq4tkqmvaaKMuPAwqVgRKZCTYqDesvZRohiLTOh82JyQ/05MpJy7PFzBxS3mTYR0/0WkqAVZnyRJ9RPyHt3EPejz0jqyuFx1FyUH2axAer3MBnJPtgGwE0w== 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=wHxEgU9gLnV0LuycV1V4GglatHZ7PT7InM7xeDPyKQc=; b=qVQmPqYO+I/u8FZqOMz6t04QHhDyb3j+ckqtmZ0jfthZb071Z8aeMmbdEUvlj2ZcZT0Ge2MPiDUcuG4wxXGpNKLDQk6I0iBS4npqrYnCWIL3fsjPD2hauWCVhJQ/yTdwgUgNzmiQzkBQTx2qqVeGhZ1oVkv1KdAMqoMBZ75w1ajfWkESZx5IYu4nd+zEZ9bPDq8Hj6nJjWPX1rsoaTpyfsnEyHG7GPdo21MUA4yh9/6zVECUkBbs6vQ9JLYLneSU3t+NWbG95nyLUsGn3OGzUiIjnM0fLQN0aaDikKUqFIjOZ2AU9iYUk0pB2dmJCahCRovojpKC+4oXzP6/oMMXkw== 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 DU4PR04MB10361.eurprd04.prod.outlook.com (2603:10a6:10:55d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 07:58:36 +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; Mon, 16 Dec 2024 07:58:36 +0000 From: Larisa Grigore To: Frank.Li@nxp.com Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore , Ciprian Marian Costea Subject: [PATCH 6/8] dmaengine: fsl-edma: add support for S32G based platforms Date: Mon, 16 Dec 2024 09:58:16 +0200 Message-ID: <20241216075819.2066772-7-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> References: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR04CA0076.eurprd04.prod.outlook.com (2603:10a6:208:be::17) 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_|DU4PR04MB10361:EE_ X-MS-Office365-Filtering-Correlation-Id: 394d6c98-f0cd-48be-5d20-08dd1da771bb 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|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?otio6rCCE72gzE6HapwcuyoYvsyyFDv?= =?utf-8?q?NZuCxfYKq53dzt7YBWLbkkgsuhSfeS8vHqQXHDXMDMAIwPJdY9SGoOZcYbzu4d/IB?= =?utf-8?q?KV2Jwt6DhIpU8jy1n/QwjHb0I4amBP3qtsB9uAvl+EVPgk10KlGqUjfnDfhbzdKfE?= =?utf-8?q?9SYc74t6FGzbP6bJ4jvRWcnMn5rF5ML5O3d77JwebKU9sCpFBCYT98HQmn6p/w/HN?= =?utf-8?q?jd7aC4ddavoRuFUlFwAXAJV6y0Bfz7EYTE3GG4zhkTaEBTQdKcFa+Tbn3hdkkC2rI?= =?utf-8?q?y9uKNCtOkfkvsYpKT0KZ8lc0SEbhD4uak29+fcmwYGywrLoGIqM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hBjPc/kn86?= =?utf-8?q?xv50mwDwScIvyRYw8hdK12lneX7RfZRPKRnelVXkmWN7Y06KNGt5YuJPDTuVaiY4E?= =?utf-8?q?x96Z/H/AxxiN59uidFCKJ/g5jCTogg+5SNAUuQcxu95Zq+OLLeUbz5C5eBq5mH3Dh?= =?utf-8?q?dfN95kKL7FG4?= 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)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?I5F6LErCBHLMJNlTb0oRdy4ydlBc?= =?utf-8?q?ltWri4o+WrURjQAWsIYjLpUiYwyMLvnpr9KQsjdRx4EM/svxrFWv1+miquo0WjBxh?= =?utf-8?q?9myso6P567bejX4GhbCVrKO6LiQVbc1IyT7osiaWbO5JSc23WqsrAEAH9soU48/H6?= =?utf-8?q?PrhHsTy3BUXmS4g72X97CGVts6qyyPTFMkBRx4Q9lWmrqaalcnq9nkNEXWvGX0q9k?= =?utf-8?q?Hrlrq5sVsBkv4j2AIKocM5uQARELBTlgmxoJ2S4jZYJQEPxdVqvFHDON/CdRERuZz?= =?utf-8?q?wMkgIvIY7sJabslirOmPRM/lOKkO+6PMmeOd53BnCBkg8x+l9SqjOM0vOxJm8fWpB?= =?utf-8?q?ef+b5qXCE073WPMvdZSf5+zs/N6SeLWAvhIcQ+FAAj2KxhxrZTStqv7TAigqzS/1J?= =?utf-8?q?tE6odocLpYk/PVZioy9Kc1HlwvRneb+mUN+fNA4TA/8xz8oEYoTHbz0RvT50Yny0Y?= =?utf-8?q?3Z8V0hrB0+fGLxYVZXgnbPYyx13xSSiMBLp9m4pXqjGbj+gXQCymVwTfspypy1yms?= =?utf-8?q?5GiNBMXKpnkk2E59aJnImGCH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7OuD2KXQCXo6OYM8Nuhqq8EDgD0mcyKx?= =?utf-8?q?KTrd2WJdD/tf/vFP1Wh3G0ePfLPrbV89lyXFxJgGdUWK+NomWbcDAGM+y15h6A1i3?= =?utf-8?q?QVwhebDZ11bN?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 394d6c98-f0cd-48be-5d20-08dd1da771bb X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2024 07:58:36.2765 (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: b2MnQBQUjOfbXzLZV5c3NTtocEv+PJcqUlW0q4vfiNA+V66TmGMhiGLvDtvfRgJbZlWRUO6L62ijdEdWJswP9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10361 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); From patchwork Mon Dec 16 07:58:17 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: 13909335 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (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 593B91FF7BC for ; Mon, 16 Dec 2024 07:58:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335926; cv=fail; b=ZSzoP0ggLXNK0mtCsJEItJVXJ8laAEBaDkDaayv0h/bXP6RxQ2xoemtwLilOPbgQDt+a68TBWcHd1XKNePtUlm5jTk0cuqnf0l5kZvur8k4LyLE/59qzfQM/pV9MK67mM21OJPHPr35vbY9aY1kz+SQ7qulibmqUuPazZgiKl7E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335926; c=relaxed/simple; bh=QNMrE4cGtLRiu6GXLbpQl+n4TI93KWI5YCfGuvQpDRw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=BAKzw5aJqmoibPocWh4yOqOQ5UZ5DPbSpQAmaouLKnFF8JuzFYTJhlbB7d9IieNmuLiZ/CU8tvonlBSqpkgxOKautn8uI7Wf+CEz57/fMbNgI3sNudp9HyBQcJ5/23ngFrmVvnjObQK34qm3/F5tVSMeFbKXrgsClBWsiADQ2WQ= 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=EXWDehPW; arc=fail smtp.client-ip=40.107.20.41 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="EXWDehPW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i4qGZgA/ALEP/9d/KCBckPuZHuLFZgJzhE5m7NsS6iJm40XrGSE+awe31rKYp9RUoAjbntd8sL50y0cF8eoyUizNwLC2arRBIgvw3KHEDcdI64Oo0rESgvlXYMF1G3TkOEqoLdF5xSi+7TWWA7hjAaSBAPL54vMWh/XkabYBfrhYCZK8yTQtliCwq87vjkabCLzb4SeLu7N4poWYAWPwow2XXbdwMDM4XAJf8PSFPnXOdhlylBijN/8w7DXDyXexzFA6k+zouGWmY1sHIToPKullRTKihsfN1bXDf3V43WEn9dgujvSfMuWogQ5wPwf+roQCPan4w5x6y6No+N7QpQ== 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=Fqv9B4/qYt9ftsmCLi1SEDyfj0arZQP6CX2ytCd69zo=; b=aCf9ZQizWEXPmi47FpbSR0qvdToLGZOlmOwes2a0b/Q7wzExkjF3+9A7AllS2TUFXsKNcVp/croT1kBIqDtT6BZ3u4uKUgOcNcKbGoUOOyuSlvzqQ4LkNGOJqQnsFaLHICcVUAyUK1WvS6AxsvO+obHa8Dsj5oKzz/nHfeu9q4m/Sx4RUzpzC2g9e2aAR/F8sqi0xdOrTWS+aCMFgmdoM6fm5ipx5LrGUJWYkB8JfdEFMXFRotaEBPDXgS5GEV8w0VeydH6jHPi+PespNDU9aE3FCDVHxTa6wL57tF745sjRsgVlE3sG7mN0pEIFqdLqpWd6iwJ2hUr8lz8uHotpvw== 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=Fqv9B4/qYt9ftsmCLi1SEDyfj0arZQP6CX2ytCd69zo=; b=EXWDehPWWjp2lQtf1EJuim7t476wHN4CuY5Sof7p6GGLw2Ijg2UqmBK7AJh0Vwox85lJysRxYrUeSfpHlkKbSRGvmZhGQAToDR+kv/GbgiYhUBoFDNeduh/fr6iaRhxIZRDaUUVkHDN02lZS1QC6t2/M1Uh1r2WBbNKVrdz1ge1u11YwdDkjKFXwtGlNUmODl3GbUA4lP3QsYdlrqTexQVvvZQQ+b8HqTqv7V+CmNszdZ5bIHPiPudL6bX1a7b+PltvZoHCRjuMCftZQ9Hv/8dBa75bJHHWw68WtIs+rclQnEvEzhPPBX/ekjp4+B4i5waeg1VDJHZGo1glriP4Qjg== 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 DU4PR04MB10361.eurprd04.prod.outlook.com (2603:10a6:10:55d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 07:58:38 +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; Mon, 16 Dec 2024 07:58:38 +0000 From: Larisa Grigore To: Frank.Li@nxp.com Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore Subject: [PATCH 7/8] dmaengine: fsl-edma: wait until no hardware request is in progress Date: Mon, 16 Dec 2024 09:58:17 +0200 Message-ID: <20241216075819.2066772-8-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> References: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR04CA0082.eurprd04.prod.outlook.com (2603:10a6:208:be::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_|DU4PR04MB10361:EE_ X-MS-Office365-Filtering-Correlation-Id: 51a1f368-0467-4380-9fb0-08dd1da772b7 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|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?cAuB5J1xNJYwxJ5HiJfN4RGRB0V1W+I?= =?utf-8?q?HWID72TyfjH8iOWAmtHbhsCTGCGSx+nNG/yAGFDCG0ky8IVZciOaUJ1vXILKK62op?= =?utf-8?q?R/uu7P8unkgEusRdLpEpTyEqj2qw6cfeq70eVgJaEwXqKIlxf66Is5rOsq1Us+3Ut?= =?utf-8?q?WVH0BLS4jZ9nvEHpkv9rKa0LAMULx8RknadwTve7V0msmZ8j4mSLXe3ymG/VTkSp0?= =?utf-8?q?uI20DD0L/26EPk/X/P9sk9H/K4fYV0vxBns2dcsUuHxTAYg1t124ZveBIMnWanhhg?= =?utf-8?q?Y8gSYsJsHEyvKnOrh3Bt8n8CQddcJiGKSiQzg1/X4e2IzWE1gISMaBKGvAgDfSlbn?= =?utf-8?q?FaAHnEJiJ2eTWaUJt4NWyYrvib0nGGye8a5uCPlzp/Kcedfu7bGbkQVtyE56hBbWY?= =?utf-8?q?Qe4Taa35za3WvSpdHn1Nh5ayvj8GoWoGZR5hXNRjD14w31O0t1AI4fKk9T5v+oqiH?= =?utf-8?q?/j/k69EKFghmUivd/8Gu8QSublHhkHQUNd2oLHFdk/iG10SKnJb4UysUkAfUpGCfG?= =?utf-8?q?xfpLDhD9HS+F+hOJSGmDPoHI9nc4ZQFhIPspdETcb7dZT8oGR2nKyn4WHT9ks2W6Z?= =?utf-8?q?Utn7tbqdA6AMfATZwfhMR1mHGythLWUSj0SVv/YYkbBM5AmLOJkM5cZuK9zb3FR2X?= =?utf-8?q?TxUlH+2E19vN/oETMXkbj9PmFUNn2J6piKH6wRD9LLUMsoE12ie3ipD0HHHxReN2n?= =?utf-8?q?QI6xtA72DNupGyZx1EzxEBPMGi/qvY5PAh1a+WH83QR8O47ZJXgtXOPBNamBbPIGD?= =?utf-8?q?d1psh8FVn5RKWgcrzssFfiLXp9huTQyNFg6mMG9Gwzx26Qh+ZZ3UqMtcKZE3mrp4H?= =?utf-8?q?bIiJ2fuysmuktdYZo+uYdyO8m/NqKBt36SHR287EByD1qVnpjvz/k1Mohmg2Xq5vR?= =?utf-8?q?hndRymPyMdnhob2UPpb1m9bzPcPbN5TXxpBZ/DrxlkeBN3i9qUxSTmuowyx0ggQCt?= =?utf-8?q?I8Tyo5qlrQlZY54jVU5EoST3DcUDxVi89pt054wLIp9EhjxfR7u1XnEN3vZbPdx6v?= =?utf-8?q?gHkJTt5gvq32BdR/nAQWWHg1f0zhnanT9lRxSjARZ3jrZiXlZPnP+ER4LF/yOkwwk?= =?utf-8?q?KCuQrecwqSnGhxy90YwcqKLaXdjFOXGA9ODoX1a+wTfz5ETB9F3DYw0LKvEIPVWkE?= =?utf-8?q?QpMN9th219BRqlKKavMBkCvyLvdELP9keAUw6INJOJtdPgmDed6RC1TCV7T6L3CsY?= =?utf-8?q?6d5cwZvpL5v0ddRqbLEYQXTeaHlz6rjg0jdGw4VfeD7U75HQqZN5RVa6RAPRe+uF0?= =?utf-8?q?50OqjAeWLkWovpSu1VBloJNeCYdchU46zC4npN34osSQ9M/ZQV+3TbrZtZYDsU1Fp?= =?utf-8?q?ayVKml44VY8v?= 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)(376014)(1800799024);DI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CMi6wKKHxANUCp9hDP2kmOM3vi0aKOnal1qhmoM9vg1xcr?= =?utf-8?q?kLqcKWmqZCfm6IArT3k4GA5dc2TXUnATgu27mwNO6O2sVINPjPdP0YLL17cHD5tRy?= =?utf-8?q?5HZFS53gkPOlV87YkS6dMIYpYVvhTlEgRXb4BRpwYwVVTe+e+W5HQUyeycSlDZ7W4?= =?utf-8?q?7uxsFP1Rel/5vgp1FUOomyEtUSaRll/OS07KmA9oHGDgZfhsSItJY1etE+NqnUwpX?= =?utf-8?q?a7oxaXj5q11krdWSNYL/mt0HXMGGkuT97yCTsp289R7efyyW7NfjxnthAtY7uQgNB?= =?utf-8?q?5b7JeCUhVtUK6Nb3iHNHkj0N1HR4og83atBZ3yIM7mH9pYshJrWwoxw7G61GuY1xu?= =?utf-8?q?lI0OMqsdVgYLu6O8uvZRdx1tnoXbhX00x3W0Nx4YQa1dh9FBJurOWKwfp/wWABnPu?= =?utf-8?q?cimZBrKdPEEVSSKGy05ouRDCo44eBSnVMlhxUzKVhkjt3CSIf2mMaCw/EorTBGnkF?= =?utf-8?q?T9RfmNIWdS0p87F4LHYkm4/PeARmDEv8TnUOC31xHUurj4wqRg9WQNWQNuOlSbxJn?= =?utf-8?q?sqOrtIaOVd8h7LkZMAWlGjpuOzmj2UEEIQ5foBPeDSelqAE6KgGYezSPvd+A2vJgQ?= =?utf-8?q?V4nQGiPXIdK3c+xkDS3xxD3YN0YlEOJ5XkFjRm1HvF+4Aa9N9BsUb+ucoUBrTNJwI?= =?utf-8?q?cruePXQ1NO2X0IMwk1RnCDwxdmc5F4rvVkZ7sjjhIpbwDkanHxu8BgDbDyfg6U/ZK?= =?utf-8?q?WXqqXjJSMAa3?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51a1f368-0467-4380-9fb0-08dd1da772b7 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2024 07:58:37.9616 (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: Hd7RBuzizHfo41xop17O4lIaAsl0MgEGeQP5rvCDzH+2ge79xoV8AjPdJeRJHOh0fhP/m68ZO6cKzvOrXviERA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10361 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, From patchwork Mon Dec 16 07:58:18 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: 13909336 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2041.outbound.protection.outlook.com [40.107.20.41]) (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 7A6A6201028 for ; Mon, 16 Dec 2024 07:58:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335928; cv=fail; b=SXH58ybVH951tmlLrOU2WEqmBMPA98lCrBI2y8dNih62GwDQAPsY+5Fmk2+SwcJjvnRE269uca70feanb2bKV59YmbhoaI5ogQNBi3YOHlWGmwaFMCQueOG+2ZKKyRrbXqWGiKNJPyNQSQE2RIbz2ESA+7aoFsX3AipU8AfcR9Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734335928; c=relaxed/simple; bh=3u1I9mecfrM1ZthBTezjocM9AwW1fNpwLEyC92SYc6M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=u93UJWmsxfOIv/gy+AOPWajdBjmoddJEw8fi30vle+1LdZ7BliKdQA4f9zs6UZr0EzrLRtxsBvNfAIctQmAsAXGtSWJsNxptmkvr2suTB/FWu0W+xkJRYPQc73UhwQmO4HDqeda+qlnSzR35qrTk5ZV222qN5FKJJ2yVk6ut+9Q= 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=Cl91czg+; arc=fail smtp.client-ip=40.107.20.41 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="Cl91czg+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=soqoVDl/pqO7o8uJR/cgaieGJ99gg3bL5o3St9mqunB6pi4TCSwdVcE5gNVafE3OgKFIRJPE38L/afjheLZuS30H/hB+1uUqvbp+i7HeN+jf/TIgAA5V+I7Zcv2/MqcgzQyC4+yqRG8Rxc1Sd9PBqENrWVOpgcFrZhB+baCQDzt3/JrKXzXDpbNncLS2OV3PieSXb4hgdK94+S08SaxYqPhS+JFUFYphxBNdyL6wbIvTiUJf5w4YkepNIYgm6yT7uOhwdtzLBUPqKJD/FfAOACEaNstNuvRUSUt36PKu/dbaYsfitdW/wJ4MVU8q2tNDFmrsuxuc6WJfG4y7JYAggg== 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=CG4S+uU44FO8P3eYVZXQjKfoUG/2vfbNF4ZdtMEfnok=; b=WP51Cy84GV+I7EPCPTGT6F0VrExebk4qd7M0mlWM3Z4Y6HkRJqqr7vlxawCrWMLBBkQeN9abOwPdsiAGX7V8s+NQNjkm+jpuUVPciK/TgCOHvKFL4MjFa+8qohI5t2d+D9n2VsDwvgI8sfQ91tDXsA6Bw71dtxGm9ZvON367ln0IIVd94a7wWw3TvZs3H3PZn0s/FAJ1va83pV72/3SOJfv1G8W27yghoTdLQIjsa/pMUT+ZYIo8HvnES01CSAQOtn69Qh0PZMzgLqYonyXmuzg2gHylU9XB3dPyvQ7Jrfnk0PonV8bBJimGYAmc45eJYY+7JWK6JcuAxduz+F8gzQ== 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=CG4S+uU44FO8P3eYVZXQjKfoUG/2vfbNF4ZdtMEfnok=; b=Cl91czg+0ok2boNLYpcuwM6gCJXJBPw1HM2WTrKqXRCEFeD5ZvD/ihy3QYH8602Lv6oEpVxqQnlvapuviJ1mvwBKPfu+vrmbjgeByV1mBYoLfB1uLxnzSpsDsmzWSWdWK7LI2EtVcyF4syo0LdDmnd+5SH9BYFghpw2S0NMG/7uH66fzK/c1rZfzmpzYzs0QLkQnxOUpJa5vmll1Zgv3oicus325X3DzRb+M1NjuHSF8xhLK3QvAtcbyUIMvNZiqaHqEJ7poARR/u4yRsMyaR+0Jolv9RVCN0eekU8OlCwGWEQ6mYAOTRyESX7MvA1+roqhOXlzCRZ0t9jKiHUO3Kw== 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 DU4PR04MB10361.eurprd04.prod.outlook.com (2603:10a6:10:55d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.21; Mon, 16 Dec 2024 07:58:39 +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; Mon, 16 Dec 2024 07:58:39 +0000 From: Larisa Grigore To: Frank.Li@nxp.com Cc: dmaengine@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org, s32@nxp.com, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Larisa Grigore , Alexandru-Catalin Ionita Subject: [PATCH 8/8] dmaengine: fsl-edma: read/write multiple registers in cyclic transactions Date: Mon, 16 Dec 2024 09:58:18 +0200 Message-ID: <20241216075819.2066772-9-larisa.grigore@oss.nxp.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> References: <20241216075819.2066772-1-larisa.grigore@oss.nxp.com> X-ClientProxiedBy: AM0PR02CA0160.eurprd02.prod.outlook.com (2603:10a6:20b:28d::27) 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_|DU4PR04MB10361:EE_ X-MS-Office365-Filtering-Correlation-Id: 8416422e-ce29-47cc-8396-08dd1da773ab X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;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zYTxKUK?= =?utf-8?q?CJV5fqRhnE5RRrkX+f6gXuwBKxQjJWuCHLAsoloX7yx33afeYL7zn6nA7deOydWGW?= =?utf-8?q?AusNtibxKSuGKKJgQ5bKNGwaJVhnHL/gApIsOfPwrUuvn0+zFKT5eX2vW15HxqW5l?= =?utf-8?q?wYr5/Pc1YDtKTj1yOEOnUJhDr1fgvuQf6aY1EqfWhoA4msLgJZRKhjWx2ZFF+02PN?= =?utf-8?q?raQVbrrUwVeYJZZl+WhaNhkzii+wPeEMY1tjFBcWX9pmlVf4MJCJroVVVtX8LlIf4?= =?utf-8?q?St8eC1NBkljXzoXCwxVQ2AAjzZ4fPGT491vey4Kg+wXp2WTWKeZBa/ste094DVfkP?= =?utf-8?q?Y7RhUkxU53oysf7apPfO+EQCSmZfkF9FDmdiNjHNNUFwQtA1kUCTomSkpHNpvAXqC?= =?utf-8?q?dQecSdCIds9ZGl5zaNVAZIFmZIDN0ih3NVcqh5SeTRwHfwwRqG3auHaqM/6gLMDt1?= =?utf-8?q?LcSXowL4XcnshAL8FVsF+uIkWa9r/SaZnjd/WmFdsdmQDiUhGBvBJU3Is3XG8rowI?= =?utf-8?q?LeZku4BT8s8L?= 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)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?XM9ihSIuvNpgkI64oxJEYAbPli3R?= =?utf-8?q?0hpCPCLZwlqoZbPMjhwisN/J2d17z8hw0klRCAGIv9ze73lhQ25fjURyySannIyAI?= =?utf-8?q?WYcKZUOWfjQheA4lqP7ix0sg6gAPqmwMQoE0yrcf3ajGBRM+DBJ4ox9bp5A0RwmAA?= =?utf-8?q?eOtXmK/ydnLByTkOlS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qJ0DIVlIKzGoqVJd4cvC9eXqfZPLVPq1beSE5b?= =?utf-8?q?5S+u0Hf7m+XP02kbaKPwD3qWA9zOJuXgp5O6Dyz32eDiDvuT74lEvSL7ckbZLrTaZ?= =?utf-8?q?joCDXBM5buybBtQ0BP7hEAXW6oMKzQAJRJkid9shWn8vfdaNRSEAMm5LFZT0osVc5?= =?utf-8?q?PFpX0TNh3hxpWOeqvJ6SXMCH9JyHRon85M3MLIrMuUNt/OtRb4JCdko9mvBvz33vA?= =?utf-8?q?wbd5gX1uDMcRMy5FBgQO7SNk1H5aVJyxv3drO+MDB/Z4TaR0AsbGvf5qS32OXa78r?= =?utf-8?q?P1fHHT+gWIggCAkZ2xAfTNXh1BlAg3H3o8SYqJL43BcryjMkLxbwQL4OC/m9pXX7Q?= =?utf-8?q?SuUatOXUyCo/5ofqaboQAy0aJm0HSM7btBPV/Y829gl3BUIpqqkd/Q2fpdebnulpG?= =?utf-8?q?cEwpYCnS1TB5t8aSCeXvSLm51oyT+OdzGzDDHbgEe565ZnntALo2YDEdHvU723PZp?= =?utf-8?q?K9sCjA+GqA17?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8416422e-ce29-47cc-8396-08dd1da773ab X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9550.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2024 07:58:39.5223 (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: oiQLQA3HRIbLPUomOSE9cz2+PBtzqUJ10Y0dgjgYb+gqxe9K0kNbi7akpZLAxJfnYjS5aPgLgnve/OLgv3mMOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB10361 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;