From patchwork Fri Apr 19 15:07:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13636484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D3414C4345F for ; Fri, 19 Apr 2024 15:08:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=75rIVTNAnZzEDWkmjbWBaytvZJzRrLk7HVYbXXdKNR4=; b=AwGjfRTCzeiYdY g6TSwaRJBZMhdiD+3gC0rL0xk+1WB7BipBoOQNnJf6FvsKmfEqQNtDeZUlledfnfRdJaq/LLRMn0D hzoX/mGafbq+b+JKl/Fy7RP1Nee0cZkgVx/67leQQqvySRnG0X2DpjlPQSspqWDaov87UtvvL1sWx Rx+yyEFmPJ5Xfv6d/bBCbjsp/gO/PUAw3hWkPnJJJWJjlWBjjNp/GzazDZU4orSX8c83GT0Hyj8+u Xn0HAyLEmS2tehOQbhzcdrdNqqJOJEF8os+U03z8Eugij+enALeNzHq1DpxY/+eXdtgNQiWZeaO9e k0UuLN0gDydESt/LezTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxpqR-000000065HV-2rt9; Fri, 19 Apr 2024 15:08:07 +0000 Received: from mail-dbaeur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260d::601] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxpqO-000000065EX-3YaU for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2024 15:08:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nrDBbXVBpXEH2OQJoGeWdAimNZfH0JQ+t47312AZAFb32Ln69vOR6opvmJYAczeNv2MOJ/BcBJ0Nn+2o/dNtMPChMwl4YhZZzrx93+MmAhS/rZepqHjdRUGnS2sbY3Ij2ze6DQsqo+zFen4oh1GIFypQWUNP5ce6DbuaHmOitgiEDXyDx7uV94GXJDgUI6xK2sK6eO23LOO9FNxdrGHaimkQmuSqZhWOa0+g1j98kFTW4kZozJrLIiLRua7wRUkJXGSRD9TCsdLnnOq/VT/hrncoFkfGlebhes1jauHcAr49qay9xVy2veWjfT8Nkg4fIcQ/VAe+mxRH7Dljl28MWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=48Y0BjVoxPxokN2MQq+QIxImoQoKWsrW7mlrMSDnp+Q=; b=iQ5wzz4qUWMeq1YI3FMAhIHV6OD8JAFk0STYmlR91jSaX78/AX0kjnfyLub6WvHEzz6EuUhH47fxJ4j5nJXismWj5b+4EEvBNJ8GstkpV/CzsT8DsrxE58H0Ks7zH1HzshP+MsayPBbP3YOM/bNbfxYrmpSyLmNiOQj/YXTYrSNFkC9okH+5zARuAKhqnxBaDYHeCa0kBRQEC5tDf9t1gJeONIrBoPwQ3jAdcZs9CrX5DVCpNPnN5hTgN+XR8VvXaHmDFSQfoYaIpjUZZmdf3TqHDeKbRmNQN3DqyetgGlPfAXBMZVmRfmtif0LzLLOgb+U5bPbdojd08wOdB1ePuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=48Y0BjVoxPxokN2MQq+QIxImoQoKWsrW7mlrMSDnp+Q=; b=kjKwEPjo4gjvWvovGHvHK7jKH9u+XHXmZyYRYFkzIEI7mq57KSkh12Us5Xli2mBIiAfVhOc/z8o5I5HZQYc2+ljtexexQcT6Xt/fnHiulBVlssUGeOQ/HSIOewVX9LCHx/kjy5lSmb+E02oO2lM+mh1Ug0ahvu7I5FYsPJNI7Ro= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by GV1PR04MB10330.eurprd04.prod.outlook.com (2603:10a6:150:1cf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.39; Fri, 19 Apr 2024 15:07:47 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7472.037; Fri, 19 Apr 2024 15:07:47 +0000 From: Frank Li To: vkoul@kernel.org Cc: Frank.Li@nxp.com, conor+dt@kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, festevam@gmail.com, imx@lists.linux.dev, joy.zou@nxp.com, kernel@pengutronix.de, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, robh@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: [PATCH v5 1/3] dt-bindings: fsl-imx-sdma: Add I2C peripheral types ID Date: Fri, 19 Apr 2024 11:07:27 -0400 Message-Id: <20240419150729.1071904-1-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BYAPR21CA0008.namprd21.prod.outlook.com (2603:10b6:a03:114::18) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|GV1PR04MB10330:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a9fec9b-d4e3-42a7-0d95-08dc6082792d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KY9b3EULoIgwdXJWcM3lKa1aw4fbyJAA3bDoHYq2BtR4H8c36gmblaoPVUuaoLBpGPk2LEiUiQRd0/XJdbT+tdcK5vtSvp4skYovgKWvm5eqSbRuCkn2mMPQFEqSunmSw/XdOdWWrhGi1E3sIkQ7aCcBBnZ5QQrDN0rsE4ONDyaWgCIrPtKherjq6PFas5X8ZyCChlUiT3IfSVZv025XeKtvzeu7Pdbzsyp3V/2mVRp8PMtABe0oCyi98cd//FDaHKxJGUstdz59oAeLpFz3CU7hvjpoW8h2tW0M24C749SgvtK8QSXIxWGXPdiCr5u3qUJHva14/ukDMksyg2co1L8/m9xhgvXYcQWy3n/FcIDcSsYv1zU9yBbyn6ZC4Z+dPpyWTrhDCHUMkHELxyqbi4XTWj4wDzsfsJ39P4BCZSETPjqbUmh2u28d9Ua/5enZm6xxQyg2w86QZoFEJY0NkygafbH8oGqQr4DfUCWxfMy8UK1GeJfBYsSwtfX+IIsocJS7C202u61mEg/vuRJ0ZGTdkMOQkaGiLU9fpKqczqOjYMu4S4c+Dxzpc4WuQUKmKa+8+9KGQLBmmit50ZQcaydOOAhtLrfn7ORyL5ZDrR0QgDVt4MnhyaSfTAVBCxSXId6Cixm6WdMtVtqMWO+wTUWgljt5Q/cI6yK7qjWLIxNXAd7/7U9+BSII9E1a+n+q2WkzYnYG/QVTmlfLJQPR5PXDmEkMF81Of8ylE8XySWbaL0dEIJmmdgyrRIgwl+ztntcVsc2FClDyrI5+K0Q+OleubPRpZBS+25HXGYvPw3PIpSUJ4MvZ/V1uHiApyodREgK5Myh7dR6TfSjbkb00kq/moI62abRR6QergYIkg8MS3nx/Fbs+cQCvsltt/9IbMfqjsDG3rRtnA1vXNYKputwCtQrEzCgcfWEAZW+WtdZd04GpZC2SzMeuaXMWEWRgaWXZMvNZrAVXnZJLw+C5GxuH8VFoXoVfCc99ZTKuUsYKAgYzMwyZek80Db/fOORcdsTGtT+AmM9/v9YpNB8pli7MIF6cINHV9HAgllc2SJjeIZy3p93uY1PbTMc1FsaEXtzsnL3dyovd2ApDvS7eXZRu8o3c1X/rQ1M/ehO9qEpcaNCEbQWtLaNHJtxazUXV3LG3a2yU54MHkoG2JGd3S2rdUM++z/hrmAbNNdAGE0CPKgvAc0DzHtEso6Qxb7SVEuuGNc/oRh0B0TjGrJJn6vdyObcuacbbE8A4z4ytBukLwsNqNSpkGSqNw956wmQ+LIS73p65rYxeXfgam+OvYLAteE1OC8O1rt8QC3E3cF63wWfcgJ2wiIgbj8UpXn16n7Nsi11pCBxqDfoaw7xMLQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(376005)(52116005)(366007)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dy6kwP7WrnRUag0v587PL20VM2QqG8irlDJgH1pT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kcb3muLRqBYMhPDTuJgwzC6+B49QBMpy7EBt3bN9vkOFQQ0XrA1VfgsHO/ld2JQU8Kj2s47zHB0b3B1LBurmntOPCdvFuxK6HgQUjC3N9FT1mPt4HYwQjjYebBj8ikZGg3ZA5A6FCXGBWepGi+R8Op+rBi4nJalbY0nWxfrV98LWXu7lqnIqYhejEqGZAqPatkQKGPuRjyOd76HB1pFTE0Hi8fe5fc5wbkaxwzdIxO/ExDJyJA7kAVCy3R+B+6osftawLb97IOBtovsUf+jCB/d3PDUlFwgVY6yiORLqmDwU13wxC8UTawDNBnIv/FLISPUH+OpRUTtGCR3GZk4zV0CmKf3fcSl8hQQTvEcnfv6yVKOnBxR72TxygPw9FBxGWOqYqcxgceHNlSt0MKsGBNO7wDbjSsh9NrL4H5IF0+4D6N3QQTHUMjH4K6a2Zbyb7EBdiuR+AwJcJlgNrP2m69fgI0gr9eRImC9yg/zPSQGG X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a9fec9b-d4e3-42a7-0d95-08dc6082792d X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2024 15:07:47.7499 (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: G2AtcNb7vMSY897hxDPygNCH/pcAgW2ncI+4wubts7pga+jK6ggifrbyqDWqwvsUdy1RkfKXw2if0vchaH9vsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10330 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240419_080804_911507_987819FF X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add peripheral types ID 27 for I2C because sdma firmware (sdma-6q: v3.6, sdma-7d: v4.6) support I2C DMA transfer. Acked-by: Krzysztof Kozlowski Signed-off-by: Frank Li --- Notes: Change from v4 to v5 - Update I2C to number 27 - Add Krzysztof Kozlowski's ACK tag Documentation/devicetree/bindings/dma/fsl,imx-sdma.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/fsl,imx-sdma.yaml b/Documentation/devicetree/bindings/dma/fsl,imx-sdma.yaml index 37135fa024f9b..738b25b88b377 100644 --- a/Documentation/devicetree/bindings/dma/fsl,imx-sdma.yaml +++ b/Documentation/devicetree/bindings/dma/fsl,imx-sdma.yaml @@ -94,6 +94,7 @@ properties: - SAI: 24 - Multi SAI: 25 - HDMI Audio: 26 + - I2C: 27 The third cell: transfer priority ID enum: From patchwork Fri Apr 19 15:07:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13636485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E234C4345F for ; Fri, 19 Apr 2024 15:08:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MjaqrOcnETVctCH/w4g3a2BYH7PIEoQkEFR51hknqqs=; b=kAE8PoswGQkBeI jWdhTTIRZFqTsVaEynH2368vLEwE9YIIDlcqCpaMhsCuukENBGfD3Zn2gS6iN4wk1kYQqGFrdYnrJ cQqo2DOBlrFX0+LuGdutRdkWSHRT1kbEqijBPAHVsoDT/ggwJsfUBzTO+JoD4OH9VuNeT4+syGbbM K+feACp6FZGVYYGDbQ+BxgDOFOssJk9R3KmULX9oKKfBiEsVDCTFE4NHmjIjN0D+lyTlIESAOsLBo sxXwbrFiTRLd4drJ+bLik1Jmg337v1P464raBtsRHKizxVQ/hLuPZUw3/TissT2bPSHY31guCbLDh tvKBReh5lEuHbpJy7QLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxpqZ-000000065L4-2RqX; Fri, 19 Apr 2024 15:08:16 +0000 Received: from mail-dbaeur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260d::601] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxpqQ-000000065EX-2HnN for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2024 15:08:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X11P3bNeubFZsRqBfun+KPanFSZtLKG4IBi5ZC8Bhu570T40VmH4XF+kXnNJ16pQPSTzCl8GBT0eZguwFeA7iCcABYsP8A/uCzdmNgZdQSJ/R0XsUj8alfAXIBm2TE0cJfSHpwMMRFkMmog5C+7bsJZFIA0dmUKDvzMneJXQv2ozxIhgTUufTE2SdVQzzdN8R2QuBpoUQ8ajyezYakYEV7QUc1mzTCZ/vtpjPO3NTjAvDWHAMANUyqqSoXacrdxEeu7Z8Z2fNrO50ES7pld0JOgARx2JdPlMyF/RbwBy2PZYCViZgPx4lwEp8lsV1EPRddOLcgpl5STJsxqiEihFqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Rbob5Skd0aZ0iLEPzrStt1DsImjOZD7ZLxlgYrgl26Y=; b=GqA1UGSAde/MXVarpdT8dLBUqgid75lZgTv8V36wRI6rcschp6MaX6CyEwSB0+Q8DhD8thXavZCIuamax1UGsMBDgpG5lVKQM7a0dTr8Aj6gxKrxQ/Nw/StdsghETeacFl9f7NfeaiuTq4R3TS4r1Nn6DHNlzIsBY60TONhi1pmUSvmmdqg0chrsZHqGZF9wQhSByesKDu1PPwOEQBzFJ11zbAWbQL3A0sPbUazXJAyGXo04v/dLAFTZK9q9EHeGyOfETnk9bY48j9BgVY5vnsb6rskuijfI6VjRamkXkLknjXI/0M+NbCWl7zwlTV8wKpYsA8CXfMfNL64rP4u69g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Rbob5Skd0aZ0iLEPzrStt1DsImjOZD7ZLxlgYrgl26Y=; b=fwutf3+6ruvgjL36s4GLBiH2y7W0TmmOYYGaSWE8vQ9JlNNzbTP9lSoDBCjDAI7sZ/b8NOq+nCQwnwXXmMIzyWPCj7H4jnSEagbKXdiV1YNjVYauAGAxGv9YYVWyL43WSMx8uGXYmJZqfqMDAJgYLMdEaW1OQSut36yMAFcJhVA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by GV1PR04MB10330.eurprd04.prod.outlook.com (2603:10a6:150:1cf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.39; Fri, 19 Apr 2024 15:07:51 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7472.037; Fri, 19 Apr 2024 15:07:51 +0000 From: Frank Li To: vkoul@kernel.org Cc: Frank.Li@nxp.com, conor+dt@kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, festevam@gmail.com, imx@lists.linux.dev, joy.zou@nxp.com, kernel@pengutronix.de, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, robh@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: [PATCH v5 2/3] dmaengine: imx-sdma: utilize compiler to calculate ADDRS_ARRAY_SIZE_V Date: Fri, 19 Apr 2024 11:07:28 -0400 Message-Id: <20240419150729.1071904-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240419150729.1071904-1-Frank.Li@nxp.com> References: <20240419150729.1071904-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR21CA0008.namprd21.prod.outlook.com (2603:10b6:a03:114::18) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|GV1PR04MB10330:EE_ X-MS-Office365-Filtering-Correlation-Id: 547299e4-6431-4d9e-e8a6-08dc60827ba3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BMppfv10gNqUSjyHUT/fn0CG3RGckrt9gKK50BypLummq+DDaSd3sKhj/Pa5t5Azk9eKmB0Ct3O0GIzLfErjNWieV5a/cAXMUy7R0aeWU5BEtvzKOpJF0em6WDvZlTbtbY73KHWRC1da/By6+5tbpMpQt/hEnSOm+HxcyBLi7q6Tsn6W4z2kLkhb5KJC44ARAg9VspZm3nI9XRXp+XxThRHzSjTHNaejiSyTQp4inPXSnMXuX/LaMzuxvkVaaCjGU0Axlxlof4mK1TvnMVZKspfflj5nXSTFL9/tYMqqd76fMsXSlHZfj3+ugJOBBO5jesBTcFv9m1fIKeEt+mLE5eLEV+O+Ogc/07UKuxhcWkPrrafuorWAUNrbLwf0FuFuy77RuVbrWkQvnTjjFVB1eA+Qixy0rUjfs2XlzIi6+6il53zVakImT89OIJZHqrGGqpJ2/mZrs1+Yu4B6gqErStC9wa/UZQ1BQPhMW6XLC98PCXs3UDIKRjvn4Or9bVfW06brbcze2JVPm0qbcby0PJqq3d3/T9uy8t1vXcnytE7sjkV9ICiE/eTqFGTe8+B6HHQ71wEv+mLyFdcBvwANZapokbCofPsY6zGbIFnqeZfLAKDD9w6VQM9KTIvnerJAKu8RnHvzR5nYkj0SVXyvUoj5yWuNhmUdrZPHrN/hbC5AVb/MWHUAMAXYGrCnHTfjMQ0D+Rt1CoNQ/TJR8BiaxGZVNK1ni4ekTHQtbCxvWCfFMT15NyvB7UhL4PGHocndTvNF5bE7xxptbKjLHU1IeWdyHqCg08SgOgk91UkuwrDxUcw8tYl/B4UWtXiwRavwmGXUhXNGG/3JxYqw6itFwKYXv6iKTb7vXG9y5z/fw0UxorARTPGTcg9rV1jLjBEj+Y9s+HZte/BWR+7dZr1Y6B+hIMYqTy18qcDIMeoGDsi7OFsSTH8V69/7YbGK3zhcmdv6pUQq9AECzftsFzelZQstBZddtWUZlqnZMdsCzHjAeZVcdSzJ5fYcT/Ni0iHisCJ8lOBZjZmqpSRoU4XuSwIC5nX+OxJHkMAUucutj4xVpf9da6msaueRVygjoVkqsW/mEJQ5GBKFtsgrW5Ax84tWteuO+q5D1Z6LuxyJwN2cZ0rgA1EWRd/JH78S4AoZ0hTASUctVNoU91EO4U8SQCyLaXStgtjHQRCXoHtCHw4zfxNRFZC9dVAxVCPMYABNOe7LZTrSc5dgWZXasCVVAAWqAhplt5aq8E5bZQMJUyWkEb+/E/ok+p1Vgx4CA/rRnLxHGQiodtt2J6ulD5EHnhPYGdvwG+Ogsu4ySeO1WV/X5LT9kcelk6jfmNBSza0jRpcBSb2gxIWWAGMoopr9dA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7416005)(376005)(52116005)(366007)(1800799015)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QY6c6/zk01VNA/GEIcosaydmTgREx0nSmTZJX2TTl/QRUF1yjLSh9ulSM41rADP4XvVohyzz49JBHh8/vyPh8Mfn9wG+3p0vbSszzco9wMouApa4iAWLfk/Ba/ElmJbFDF41OyqHBr17JLev+FIZWVe0wlDhXCN78FtGY/dxa5Xjk8hw0Egs4eNkIvC7twUpw5f7NG2L+eQkegu9k4tKDs4KT3OzjDs7yYxrQ/g4vNWPqpvsv9KFJFagY4BMXTxJ8g8telHRdpIR/k83BxGn9DuMrwjP1WjNnBHdwj6bBaQWZcgkIPBe6RW0x7BJtc/agoQxtx9dp8XFJBvwOxK65+neZDhkTzVNiGodxsd58gxej1+U5hFQkyOfBwhKyNzwhDmmwcqKwpD5IiVUxmMFmidJqrV+nPit9gMMnEXwtRmu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fLAqitJa0JYifPoMa94HLq7VqF8anHhEyXNYYimoY/Fbh1RgR4640jHAoIKVxkEBGM9itPzFxdDlGzw7w X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 547299e4-6431-4d9e-e8a6-08dc60827ba3 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2024 15:07:51.7869 (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: peAwbJHSKoknBAoiV4wa2NEmnwO3HTMlwKZOl/aAAqo84CAyvyjaTUjOU178JM+elaQipZu/LbU5ok2eciPZHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10330 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240419_080806_631343_F18FAA0C X-CRM114-Status: GOOD ( 10.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The macros SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V actually related with the struct sdma_script_start_addrs. struct sdma_script_start_addrs { ... /* End of v1 array */ ... /* End of v2 array */ ... /* End of v3 array */ ... /* End of v4 array */ }; When add new field of sdma_script_start_addrs, it is easy to miss update SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V. Employ offsetof for SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V macros instead of hardcoding numbers. the preprocessing stage will calculate the size for each version automatically. Signed-off-by: Frank Li --- Notes: Change at v5 - new patch drivers/dma/imx-sdma.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index f68ab34a3c880..4a4d44ed03c8b 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -240,11 +240,11 @@ struct sdma_script_start_addrs { s32 utra_addr; s32 ram_code_start_addr; /* End of v1 array */ - s32 mcu_2_ssish_addr; + union { s32 v1_end; s32 mcu_2_ssish_addr; }; s32 ssish_2_mcu_addr; s32 hdmi_dma_addr; /* End of v2 array */ - s32 zcanfd_2_mcu_addr; + union { s32 v2_end; s32 zcanfd_2_mcu_addr; }; s32 zqspi_2_mcu_addr; s32 mcu_2_ecspi_addr; s32 mcu_2_sai_addr; @@ -252,8 +252,9 @@ struct sdma_script_start_addrs { s32 uart_2_mcu_rom_addr; s32 uartsh_2_mcu_rom_addr; /* End of v3 array */ - s32 mcu_2_zqspi_addr; + union { s32 v3_end; s32 mcu_2_zqspi_addr; }; /* End of v4 array */ + s32 v4_end[0]; }; /* @@ -1915,10 +1916,17 @@ static void sdma_issue_pending(struct dma_chan *chan) spin_unlock_irqrestore(&sdmac->vc.lock, flags); } -#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 34 -#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V2 38 -#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3 45 -#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V4 46 +#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 \ +(offsetof(struct sdma_script_start_addrs, v1_end) / sizeof(s32)) + +#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V2 \ +(offsetof(struct sdma_script_start_addrs, v2_end) / sizeof(s32)) + +#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3 \ +(offsetof(struct sdma_script_start_addrs, v3_end) / sizeof(s32)) + +#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V4 \ +(offsetof(struct sdma_script_start_addrs, v4_end) / sizeof(s32)) static void sdma_add_scripts(struct sdma_engine *sdma, const struct sdma_script_start_addrs *addr) From patchwork Fri Apr 19 15:07:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13636486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09113C4345F for ; Fri, 19 Apr 2024 15:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lgzTj4FxbD6PcRuOdIDJApihqB+52EbzZE2gcqdqQ98=; b=w0erFG6WhknRNm y+ewS1T8wr6eCYEBamaynHb1xpgLKVcMLT492Jo4gXbh1uRw6SnzlLkyq+TKP5JQnhbJ6O1GoXFh5 wLZex5oenRa0FfjATeQzjYj1+1FWenmV9gSwJg01Wygg/9rzc6rXIN7QYJ76lXZwHEjdO842wPZAC 6NH8DJkGsqdRf3OHQ0i5oWMl/BSttU3fx8cGhjeQMEOp4YP/Jk7cGhe22a+8OoipwjZJlZkgydu0q mkUaMfYPZJdrt68fYDGAQUDHmBLXP1maGEnPrhThmVjbRwBA6LpNUhxvejlNRZUmFpyrPD3arTFB8 SJozRX0UPyGcAoWAImJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxpqb-000000065MP-2TuP; Fri, 19 Apr 2024 15:08:17 +0000 Received: from mail-dbaeur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260d::601] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxpqS-000000065EX-19aP for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2024 15:08:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQ6RNMrnbt54+xxRKA/kS0gdjRGI5g/uhzoosDNV8zZqJFLHN/xfPM3in79gRiutO+ej67y5kAt9UBkec4nPoA7OyZLj9zMLidz5JIGZKjcVsKZ7jdbgzebDC75Q2sXnr6NW5TsxZS5jlwT9NnvdFcMuLArW1TRteNW/cZNu8ggxddogK7g0cDfXQn0oo9Pxrx33VM/wKa4vo87azpBIEGMB++cQTrx2e0KcVafuJqLJMpaUnjl4cmgcdAnKKeZQy5vcnzgXs+iizznCp1y6UT5VgP9ta/rYP+1/zEJI0YupbepeGmIAuocOZ7FAZMKqHZzwgbWy6D96cKyvJHjT3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dP9ldxWobQvZm9Bq9rd9KDqKFZ6xZRce7132ihwTtOc=; b=RSSi89DwPIm9eI9fpRyKSWZDAVITrMBdCAxd8SZarFBKhs38+GUctpsKip9IHIb2P9o9MlrbRyRbweqVSGse4Pysco3cXzpjPze6QfQLli/egCTvfgxMp68uxsN1MNfEhbQJmaiNUtz6urdV1jo/L9wpeOIcjPQA7kzyUEhUJ/uY0X8cQZsErlOB9Eb61bIQ2rf4sYwAlmsj58/M3QxUHuzTuETi7B/cjiCtNKLI79zzDhbklcHVhGGlE5zlzu44uIeYwhnwlkGWJbV9V9nfULyt8/ASgKQoy1bqznFeDBwAjOuzsQFflt5zl/lvM+gISPBYeUAdkrfhDjsdR+mhgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dP9ldxWobQvZm9Bq9rd9KDqKFZ6xZRce7132ihwTtOc=; b=R4hnQj/67GzDhEbUy8CWhB+F3c1yerc7UenamvLIZyJWB684t7e831K5kEDAwvl0/UlqECgWS3RTSk4a4kq0jOU70RgYC+ZGWJiT1/s2SF/Jvibdg92SDs/erCSf65P0yVLxx4T/OZsTIfMVxdT4tRP4synE352nAcNC5pYxdFc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by GV1PR04MB10330.eurprd04.prod.outlook.com (2603:10a6:150:1cf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.39; Fri, 19 Apr 2024 15:07:55 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7472.037; Fri, 19 Apr 2024 15:07:55 +0000 From: Frank Li To: vkoul@kernel.org Cc: Frank.Li@nxp.com, conor+dt@kernel.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, festevam@gmail.com, imx@lists.linux.dev, joy.zou@nxp.com, kernel@pengutronix.de, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, robh@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: [PATCH v5 3/3] dmaengine: imx-sdma: Add i2c dma support Date: Fri, 19 Apr 2024 11:07:29 -0400 Message-Id: <20240419150729.1071904-3-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240419150729.1071904-1-Frank.Li@nxp.com> References: <20240419150729.1071904-1-Frank.Li@nxp.com> X-ClientProxiedBy: BYAPR21CA0008.namprd21.prod.outlook.com (2603:10b6:a03:114::18) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|GV1PR04MB10330:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a55c037-caef-49fe-d857-08dc60827e09 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FWA/jDp+TsQCcfZD1A2hWfLnaaoTMpN65+juV9nCpdkC4TeuTdzGvJ20hjjRYHk1Z2Uip5LwUZexu8JTjsUOa4EEKHIaTEBsoGdfMZKNlMf0g21/3A/OAerCZIN67bYZIDg/X5EH1GzjvC86Q/mtxHrdOsnFFMP4o8oPFutX9fXgbmMFiAmpamK7PyobT8OALo79jwlvugm9zfvlj9Cru8BkwJ34ETtFd0nFyEpzRFrPBCZVvPQECJNcem2C7pyUVaR1xhWrtG+rZ8g5ENgBxTQBrNth03JaqcrShYQmpRhoIhne4Um74EItG1HtxKFtNZAzF5/hgPvjopG0SMLbdcb/BWHDxuvF/EMpU2Rm3wK69jycxJyHhellJ65wrXDY+qwKQMi3mu5JNU+gzBWQap2rUOYtvW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O+I3QRIupZyAsWDsncRqnUjzdnAx3NUVFyl8nlMleoUyxQ3TemddV5akvx7pl6oP9U/4NY7zS9gOebhaB1HNJXW4ToA0AyAvSE7udAWMCHMBhRkSMgHYHUuBezY5zDfoGztl2+NN3+NsSWDbf0XBNBEu/L936rvq3Ngj6yOKfM8uDJSnXBWAMhpYkoJtvBzP1W2HUDrzhwH7VdT+SV5hJPVdPjiIayy1u0jrCZvpOq23sRcgawB9s6Qbcl7nrJc7AICUWmIoubEr8xDWilliYn1wdgBkjkcuHI8sOUdHj2N3UFGc9dEd6pMZ7AXoP8PYh3Wc60ml/3tWQbDNTOI/lNy/4bqE0BvGi7al80FWJrSzenaMbYr+3wzdiBbBFjmV9eQv9CUOzpQ+QQQgkT6PxX4JpbUULEFkW4hVlyY9gr2gYsOeOYUNBjYB+QzD0bmpyncdCA4uuAh7KYs8A2isDVEBWzeg5PQfhqmzMT+Acvowld2TeQhhC8OPCLYiprFYNvlMcnQq9kAxFFMRY+HDfgeRXn+/NRYoc5Vnt97B79rpKrYM2hjW0U1+2rlmc1ErJg6NJ/eLFIWMrThd0w90R45fAHticdx8wxQQilDFO1DKvT/5lsWKoY/wO6IJfGWXF1T+ObyQcj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a55c037-caef-49fe-d857-08dc60827e09 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2024 15:07:55.7886 (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: B2uEu79IuQqOqAYHex8HMyf09XxbZdMF/zrWVJOSWUDwCBMbHqVTtEHJfWoGW+wCg/L9dIo5ecJ7TNrWjW+9PQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10330 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240419_080808_359918_0A0DD8F7 X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Robin Gong New sdma script (sdma-6q: v3.6, sdma-7d: v4.6) support i2c at imx8mp and imx6ull. So add I2C dma support. Signed-off-by: Robin Gong Acked-by: Clark Wang Reviewed-by: Joy Zou Reviewed-by: Daniel Baluta Signed-off-by: Frank Li --- Notes: Change from v1 to v2 - remove ccb_phy from struct sdma_engine - add i2c test platform and sdma script version informaiton at commit message. drivers/dma/imx-sdma.c | 7 +++++++ include/linux/dma/imx-dma.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 4a4d44ed03c8b..003e1580b9023 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -251,6 +251,8 @@ struct sdma_script_start_addrs { s32 sai_2_mcu_addr; s32 uart_2_mcu_rom_addr; s32 uartsh_2_mcu_rom_addr; + s32 i2c_2_mcu_addr; + s32 mcu_2_i2c_addr; /* End of v3 array */ union { s32 v3_end; s32 mcu_2_zqspi_addr; }; /* End of v4 array */ @@ -1082,6 +1084,11 @@ static int sdma_get_pc(struct sdma_channel *sdmac, per_2_emi = sdma->script_addrs->sai_2_mcu_addr; emi_2_per = sdma->script_addrs->mcu_2_sai_addr; break; + case IMX_DMATYPE_I2C: + per_2_emi = sdma->script_addrs->i2c_2_mcu_addr; + emi_2_per = sdma->script_addrs->mcu_2_i2c_addr; + sdmac->is_ram_script = true; + break; case IMX_DMATYPE_HDMI: emi_2_per = sdma->script_addrs->hdmi_dma_addr; sdmac->is_ram_script = true; diff --git a/include/linux/dma/imx-dma.h b/include/linux/dma/imx-dma.h index cfec5f946e237..76a8de9ae1517 100644 --- a/include/linux/dma/imx-dma.h +++ b/include/linux/dma/imx-dma.h @@ -41,6 +41,7 @@ enum sdma_peripheral_type { IMX_DMATYPE_SAI, /* SAI */ IMX_DMATYPE_MULTI_SAI, /* MULTI FIFOs For Audio */ IMX_DMATYPE_HDMI, /* HDMI Audio */ + IMX_DMATYPE_I2C, /* I2C */ }; enum imx_dma_prio {