From patchwork Tue Jun 20 20:12:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 694605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEB1AEB64DB for ; Tue, 20 Jun 2023 20:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230163AbjFTUM4 (ORCPT ); Tue, 20 Jun 2023 16:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230129AbjFTUMq (ORCPT ); Tue, 20 Jun 2023 16:12:46 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2063.outbound.protection.outlook.com [40.107.6.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C24161731; Tue, 20 Jun 2023 13:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oIxQk4cJKHhr66QmbHDYSkahxxJ4jlTPZeb6QLImbe0NPrs9NcVqY16GZqnKCXobI3GnfMh7sI/5iyNwobYZLyINK/276kinVUVxPQNGTsOw41C6QlxnkihLUIU6RiDv6UJl67MRU5zU7oU3z82ADqequsTcnVI2PdNyt7vrKQfacNq+McLAmvIwHGEKOmf+3icm9vbfq/wts6Pgb25mMIt/J8KLGK6H/9O+1MmXZYapbsgy6R5VusoWuuJk+f2Ww3aC3eQoQUXTmBRd45mxw/LktlQd8cFaXS9AON2vD+ocRR+LioQgt50Eg/5ZOXOcE5yV6bcqcND68uPnNIyu4A== 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=3PiQca/rhXI4tmiaMBYojKL4cq8Esjj9EehlE5LYftI=; b=KmIId6WcMcD/xSlrx2QK7wEFaK8jYrMkBap1O5GsGHtwxySwetUxqfxPxalxSJUoDU1wedJ5qf9a6i3BnTk8gQpGfYmGEgogYRKoRhMhB4GR/H7D+Gs7cjWk5zIuOYf8G2bWVcQa3MxYdUa1DxNP+iueOggQVwi34kpvgCKypiHu8Dum7z9EapHb5mYboXlH121TAM/OvXqP8mefvuq8NJovVtMeOHEC7bJYQ1qI+h1YYCMosmScP0mRVRhk5rx0RK6DUg3eglXCkBpb13D6Z2270ta0t4W4zrhWcAujMTZ3iIGsLxiZmmZxeWfjv8La/lB/LJkqdUgd9XPWT2BUMg== 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=3PiQca/rhXI4tmiaMBYojKL4cq8Esjj9EehlE5LYftI=; b=ShHVJcQUdo5hEgGtzeiZOHPXiio9bBlrBuGgnH9vMt3IHkdAgvfOROxthiETgp23EM+tGYMAomS8TW+2TWqJoMaFSD6u00OZYPRjW8cENF/vSejTGSmJis512Xa9EGEzyEz7CLIA0ewgq/YTXUUrZ5RokaE1ugd1zRxJ6bKC13E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 20:12:40 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6500.036; Tue, 20 Jun 2023 20:12:40 +0000 From: Frank Li To: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev Subject: [PATCH v9 01/13] dmaengine: fsl-edma: fix build error when arch is s390 Date: Tue, 20 Jun 2023 16:12:09 -0400 Message-Id: <20230620201221.2580428-2-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620201221.2580428-1-Frank.Li@nxp.com> References: <20230620201221.2580428-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0086.namprd13.prod.outlook.com (2603:10b6:a03:2c4::31) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB8903:EE_ X-MS-Office365-Filtering-Correlation-Id: 14aa7b8b-497c-4a7a-142f-08db71cab2ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G0rX1QPs005Pxe6yUhUOSMc7ImXWB6QwoFkNO4aOzxNziu8G4I9tUMnaTZ1YB+iK36TXV7U/sMfyz53W+uIJi7VVOyS+uY3ltm/sEBOwhE9Z4KxuQ0IV6F8CCu6LCzJ8fm7snZ+CyVXsFokb/mqyaPUhvyZH4ZiJE0L7y6aUD+TAUQEqSb4FRdt/Ed1+oBF5yOGjN8AJmnAcqt4XjO1sdLTHXk0HEmYPmnDCWfhiCLxHwTbGk6bV7I3QQ/EdNUr7NRIE46km09KvSHz6vPQLtL/mbFlP5SpsK4IJ9k8riFvIWhK4NNllT6vQ1qFOmT9QU1AN764e2hzL/9NGw8VWESolm311WlVvb4f4FAIgkZksuIGcofqyXOtz6L06AwegopkZsCtX3Kqh4G46pAVn2rs74WDuUHuce2JKOmf58Bw21274o3RVbXEIaYoncfK/1S+bLd6vp1ruqmD+8iCqjb68zMFuGRbpm/F4T9J/dXUsLGazQ7mK4Cr8va35ioTdlrRPKUYhqOOXeFQXc48LxgjiM4Q5I6rs+z3rLjVKng+3nv06GYQSVHnp44NVHNYOhNCepiRYXRP3sVTdBPFeJoeqRzbbf+mDGHX3brxky91ngfUl4upgm/uowkM41/GK X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(376002)(396003)(366004)(451199021)(83380400001)(66556008)(316002)(41300700001)(66946007)(66476007)(36756003)(1076003)(6506007)(4744005)(2906002)(8676002)(8936002)(5660300002)(86362001)(38100700002)(38350700002)(921005)(2616005)(6666004)(478600001)(6512007)(26005)(186003)(966005)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FZj5hnw7Y6QuGEeW3Gwc5tONjarFdZpVzjuWe96r6522Kdu3y43Gic8O2Hn1RBowavKTpCMFSlDk09MznvanLYyn+g/Ysh2iF7Mnu7EuuxNM0nKo7Il5BujPgSmVlabl+o2ymlMxMGzX0F8e4g3l0p3DoXP9WTnPIJxZZCWvul7gupUHVoOa64JmqfkgwJFjShldgpzB1nD5W4vx1YFvp66CKPCx/xH7FrtIap4aMLb+wVOS5GBOdM9aefbEBQtJGTJYMOkLxOCgo2OSWt95hJHCnmz1hsimZCR95Bt0HWLWl1cCOyypI1zxLkQYS4y30gHgtmJqDd0YV8gAvK2q59UBamHhJDuHdHXnPFk0a6rZD+G3LJaFbTeVZotZjp4o75eblmMMVxkAJGXOeNKqAGwdEeA0bj/46jHvlZYZvDBL6/opK/AZs8u7OpJto3fFbgWzga/ShVU4en1xOKZ448fIWFC3zUpGbhE7UYvC8mxEWMlvOuNja7YgXB2wLQnwCWn6cOJLhEHqQBd+sgN7bVonMQsjh+mUMyG7z8kE5qKLoE4YGqHAkveySVIN4hs5L5nRRcHva9tkjIkctR1vZ2OVw8K7OpbYQmTWxf+AFig4bDzmMny3PZXZFLzuxe7kHQ7oHEF0taUdyHoTZn+burtIcunmNWIfKsIUFSMEwu79AyAYvwYJMH5yOgfO3Ng1OBoxHMS7NkIUu7jA0mIlzldpr42RQByysThNPrFLzDcwyCwW006gZ57GHjQIJ/JKkLEV1VtdyIBISXrsHTFuRukdIavf6Xh6G1zUad3rgEDQIEPwfaswBll/f4MF2GE1fu2z5nSdFgBWjeybTzV/DB0CRF3Dx0D04ltIqwhTR3MQ+psFgCIwbZTH9JMf5hVLuJFs9xCMMu3ar/bD1o94I1d2SiLbLZQAgfGNMleSFdv2mOEkgRgIhh7n47YRZTenMg0HB8/SPbJGtJ7xAeO6NjX9h6F5xQbqLo0/AT0XWVEj/sTBNItFEB3XWUGW9ZH3Iv8QR4uWZ2OMdVeWZa0/qqVH1p1ME4FLdW7c88Dl0UQDY+Oy9Nzk8F5JnKmjb4ReOhue9TPKGO4gMiwz+DgRwD5n7pyovL3nGL47Z6GTGnaT4i0vWIf0L6kyWHvLvHhHH+s76iq0oa2tBasAO/b/hgLONvb0XtwqKrXcMxIEmsIgJrwUeH82QM5cm+PBPBaSEQn4lVs7lkiOvE3pNr0CexaN9TdOES3wKAkjo4ZpMhhk0qVLhCFKbVtNJU4ZdjMvknD/i6HPjcx135tYDDH+Wb93b2A4DEqGd0f8mpNuVn4qh29EsBCE+9atR6lQ8xM4q+ItFxhp5hx+GpwvHP6Nwa26Z2IOx40dD/vYKN4fA/N3otJRSTKm2GmeFQXp7adBxwanbFQ3VyEINDYglosXgvBM4xelk5Lzrx3rKokoc3Fwi/gdMKAIi8qw3EKnTtULaZAdyb88+AVXOkGvXEllxqJ9ypxBGlbWu0/kKHe6gkKg5U10OanNTMpzIg4nr3hqXdnXWhuJVhsg1ZR8xqbCBP7daWbybRKdJ6f+goEaKf3nnut2xHuIz/LZB3gK0dy5 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14aa7b8b-497c-4a7a-142f-08db71cab2ab X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 20:12:40.1012 (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: GqNOE9QlAyE+NERVjc1DRPiG2vbOzHnDrOyo/Y/sV3wjErTwU7a6WlQHGJFobd+9Ni5SCYs6wMS/6J+SZYh7qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org fixed build error reported by kernel test robot. >> s390-linux-ld: fsl-edma-main.c:(.text+0xf4c): undefined reference to `devm_platform_ioremap_resource' s390-linux-ld: drivers/dma/idma64.o: in function `idma64_platform_probe': Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306210131.zaHVasxz-lkp@intel.com/ Signed-off-by: Frank Li --- drivers/dma/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index 644c188d6a11..c1065c444cde 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -210,7 +210,7 @@ config FSL_DMA config FSL_EDMA tristate "Freescale eDMA engine support" - depends on OF + depends on ARCH_NXP select DMA_ENGINE select DMA_VIRTUAL_CHANNELS help From patchwork Tue Jun 20 20:12:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 694604 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3A8FEB64D8 for ; Tue, 20 Jun 2023 20:12:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbjFTUM5 (ORCPT ); Tue, 20 Jun 2023 16:12:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229987AbjFTUMr (ORCPT ); Tue, 20 Jun 2023 16:12:47 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2063.outbound.protection.outlook.com [40.107.6.63]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25B2310F0; Tue, 20 Jun 2023 13:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NI3L6EvQGXiEjSol/nAWLvTawgbEPq3xdy0XXxZ6uqvwzRCibFqq2KoDsh8xOe47rRuFVnBW1Vv7fm0j4P36Sx5TxtVl0KkTuUBGGHkxlLYgAmARFQ7D4Kg1H2kRrUARd4itQ8zUBfWgPUIzDyJ7Odftf4UYH3KCqfmukzyW5febkvTO6abqvB5DBFhJc7FDTw+x9UmarQrG+Z6HzUwpfjGSFtJnU/tnQNKQTN7YvDSAFktroB354gQ8mlMqHrGci44FShsLhNHPZjynO4sZlBRCeIUqiwd6Jk+IREZFRHrMIfw+smcW1xbR5gaGygXlm5knwz8ElUbwH04E33UtZg== 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=RKzz/DKQcGPIpSzsnHktT8UhEcS2xeQdpWaKphJia7o=; b=k557igwHHdp/9zDY7B2yzoUpk4Z1XQdHNrl0jAls2gNnBmAQUkmK5hbmLP2JPsPacjKLUn3+t5TSIy+6uJ/H89+zRtxFbhZm6e/hsXskb+q+/sOMSUYR1FAfIosdAMGaBLCSPTW48QS/u5rQ/xBVeA5ibQthdXWxE50Ru5xb1NFb4JKJETBUXva6XyXcTHJlzXl40Cxsrn+e9ALYSKMPLWPhrNeY8Yc4ZMofIOly+xYbtgybVDA5vTCudB7M40HlAyYwwu6be1vChJFJzdIE9zOIXHoYB4IUfRBVVSwYoqgZVwa0OzhONOTZTtYat6MLGT+RZUKNzrjh4sdUhV/xcg== 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=RKzz/DKQcGPIpSzsnHktT8UhEcS2xeQdpWaKphJia7o=; b=gQ4BIl6JR4VQ+DysI3nAauAiqznbEuMRHDMqtC/SASzL76oeAu0UL4FjiQOY8J1Ez1UZDLE+Zy5V2WGUoZ4H8Ylbhko1UNB0oasjtLkSF4jEyxrsB4C+f9Ts7EC6aKnmBTd8DP+xXN/wuipPbVS4XdUWWkfpoUP2HVc1WsTbYpw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 20:12:43 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6500.036; Tue, 20 Jun 2023 20:12:42 +0000 From: Frank Li To: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev Subject: [PATCH v9 02/13] dmaengine: fsl-edma: clean up EXPORT_SYMBOL_GPL in fsl-edma-common.c Date: Tue, 20 Jun 2023 16:12:10 -0400 Message-Id: <20230620201221.2580428-3-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620201221.2580428-1-Frank.Li@nxp.com> References: <20230620201221.2580428-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0086.namprd13.prod.outlook.com (2603:10b6:a03:2c4::31) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB8903:EE_ X-MS-Office365-Filtering-Correlation-Id: fdcf4cd6-3de7-4a55-4580-08db71cab46b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8NCM3HTLSb40DQWK8Bigh4SbjN4zUvkUxYXS7lDwXVMh1VRs5k67ofk7RkwZ/OQRM6Dw7q7D8b0QfYS7CxniCTGatbERoCtoROEzaJ6BY+CQVF1aHr6IwiLLpgVqR8wrCMlLhLMDJPdQ4RU5Dzzk0H3dKvjDPWjsgxnrKGAByKRKH/m+dpemxLADTaNhEYikKMvhCv/xqbqs2zcDNsn8GtZ1ZrGN9KeSC6Pqhr/OWuGPhxiAmSo5GoiWfr6+X9obj20BrtayI4cIyLDePqeErUxBYw2us5jXzF4aZ6vArDpEtCzBfdqZnZG2KPJXw52iPmaeW8haoAdKf6067obJYHQ9CHA8Zbhpw3V11ZmhziFW61RGKxJhaWKoy76SMZFq4s8r7gb2MRzUU/t8UUFHHdEqo2XSGEdVOeUeL+VjBzrEHqM+3dyq0b0y+I3h/H0UykupBaPHY5osnbIhSO1DV+FD0rwFD3PtKWVtJjxQTvOeSKwrvAaW8SJ5DVBUf/tMhKZmr3ske66cSH3xP6UONH25EGCN8ZIzQBVNU848Nm/wXpMvcElVyo+NKPhNNXxXkPQk2Cwte15tOjZHHHk0Y4a35hXVGDlGElEiFhBrxK1a3sRxpWbmf93tx6S95GiTRSRyK+1SYzQy7IlakMIJ4g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(376002)(396003)(366004)(451199021)(83380400001)(66556008)(316002)(41300700001)(66946007)(66476007)(36756003)(1076003)(6506007)(2906002)(8676002)(8936002)(5660300002)(86362001)(38100700002)(38350700002)(921005)(2616005)(6666004)(478600001)(6512007)(26005)(186003)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mLC9bKKFvxG54CSVwA5mrJhR90fMA39rvzVkmzZllhUpzJB09ugmLxdTAvyKcklwdoatc1RuuIsn4uJU/0rZojVzqa/lKyLVcO+yzBxA7WmqloiKtibYqK1n87BjERTOs/hHWCXr5gHjQacMPsQX4oKmqZQDDWncGLD54C14UV+XJYHEDYXbTIvr6VwORRqz7tdRwLOHEOASlbedrU3+OAhiZjHt833bBuBFygjgRFjyxXxrwMD5j064JqrDbP7dorXF8Y+rC2oCUjTqLvsxZ7zL4DjHEGN6HJMpzyXHoezwsh4QnDe7WN/IgRv+FgToFqqS1oMlMEE5XZEBZgedB/iRANXnRrM1sd43vZ9wyGLKbJvVwcSmKRkanXPWwOgWSQlCTgy9wyjqo7TUyp3XhGidw2VxXNIZWZqNzDXehRYBi9WW8jP2GwNRB3AXKyMsVe9mg0GDyRn3oThG1dkGMJiWQ8o7thyFL4dd8H5KtK8KtApHAn7hnYYjuzf/8ug7BVZY2h/uxSLiHo3evJkPit/q6yks3a5rqs9+3nRWMY9/z3F4EdXn5CKh0MOUqr1LmIw45lVkPey/CfN4aHw99jwrEye0WnOx3t7qst7jjnYo3L20gnW9FdEWj4w7tdMRVZjD5UGXV6gp/WeorTFvpX+LB43GO5A1O2nsWC/lbpL+DPwVlh9LlYn9E0OaMoEGpp5CaMjdD0pWuykLIOH7HIiUUjtWFAcPeAsXbDJD8tiwX8YkgoKeNpJYvh/AHw5tVYCkjSYvP0Jx1sS4FNo9FdRbpawsfiIX8PM795UgDhDbTDNxw0XuGDVq9JTnan7+ckHR3SbsC4Q29t04dg7To7A5FaUEO1LnCXEUsgqpDdEKqujJR52i5ojzyu0sGjg4UI/BLBrBWfTSFywlnZdtYQLl9eUuiDPpbjTvZO+fgEd+VqETY3JBcmb8qhAU+gxky6vv6MEfJFufLzdTHeVt8cP6vT8rWh+YBRMVdviHYWSpPpnm85uh6rJuGOR19BgzSgMPKp4tUDZJEVmQVRObzPcjxR1euTfDRlyFI05X8DzTKQD9QTVOS6vinMJ1dQN1FtE0P+LB9QWvMGDViIxjBFtUcG6wGFUiTwtUDAaK6j1NL6x6Dk0M0qhQvHEoDvoq/rupOr3pS/DMTghYTXwCmj0oyVpJT0KgrN4cFo8iZmnKtAsh/9InnyWmDcqAMPDC3wTsXGbLnJUnGK22r7SQuzVC+frg7yPFjE+F3xS7iy6MueEs77mcq9lxU8K7WplEKjLYStNAwzSrTrU5nqtjZMNcVN5/XkmLQe4CRsH3ZV0aQL0x1zXXVUhCdl5ApSxt1JAoz3uRg5Stg7rgMoAL43gYpO1Oq92bT4tRbTwejI6s794ELBscGSMbvKlBJiVXmHMKxyPeOuuPVkEgh5/d73LfL1HSsRkGqOnzZ1N9lC+cnBYreOPsGRw2Zew7871H6GSvlxg1XXwgmsfb0WUib6HsMlYjGFHwVJNQx6euQZ6H5bDUn1AesUxD+4r9CI0I6llMvN0pCrkU01l4/MN/dfTzr6rKGEFa1thmsKcpTwW6qPSVfVrGWrcCxPun8kE1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdcf4cd6-3de7-4a55-4580-08db71cab46b X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 20:12:42.9448 (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: 79Ybu512vM4oMp/NMIBn0EBTVLE6KtlT69mII8oGDVB2/r4F8nutfADvc4DL5qcNoC1jzVFGO4M2fTIiVMzXZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Exported functions in fsl-edma-common.c are only used within fsl-edma.c and mcf-edma.c. Global export is unnecessary. This commit removes all EXPORT_SYMBOL_GPL in fsl-edma-common.c, and renames fsl-edma.c and mcf-edma.c to maintain the same final module names as before, thereby simplifying the codebase. Signed-off-by: Frank Li Reviewed-by: Peng Fan --- drivers/dma/Makefile | 6 ++++-- drivers/dma/fsl-edma-common.c | 18 ------------------ drivers/dma/{fsl-edma.c => fsl-edma-main.c} | 0 drivers/dma/{mcf-edma.c => mcf-edma-main.c} | 0 4 files changed, 4 insertions(+), 20 deletions(-) rename drivers/dma/{fsl-edma.c => fsl-edma-main.c} (100%) rename drivers/dma/{mcf-edma.c => mcf-edma-main.c} (100%) diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index a4fd1ce29510..7f3d62c9dee2 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -32,8 +32,10 @@ obj-$(CONFIG_DW_DMAC_CORE) += dw/ obj-$(CONFIG_DW_EDMA) += dw-edma/ obj-$(CONFIG_EP93XX_DMA) += ep93xx_dma.o obj-$(CONFIG_FSL_DMA) += fsldma.o -obj-$(CONFIG_FSL_EDMA) += fsl-edma.o fsl-edma-common.o -obj-$(CONFIG_MCF_EDMA) += mcf-edma.o fsl-edma-common.o +fsl-edma-objs := fsl-edma-main.o fsl-edma-common.o +obj-$(CONFIG_FSL_EDMA) += fsl-edma.o +mcf-edma-objs := mcf-edma-main.o fsl-edma-common.o +obj-$(CONFIG_MCF_EDMA) += mcf-edma.o obj-$(CONFIG_FSL_QDMA) += fsl-qdma.o obj-$(CONFIG_FSL_RAID) += fsl_raid.o obj-$(CONFIG_HISI_DMA) += hisi_dma.o diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index a06a1575a2a5..ce8d7c9eaf77 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -75,7 +75,6 @@ void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan) iowrite8(EDMA_CEEI_CEEI(ch), regs->ceei); } } -EXPORT_SYMBOL_GPL(fsl_edma_disable_request); static void mux_configure8(struct fsl_edma_chan *fsl_chan, void __iomem *addr, u32 off, u32 slot, bool enable) @@ -126,7 +125,6 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan, else mux_configure8(fsl_chan, muxaddr, ch_off, slot, enable); } -EXPORT_SYMBOL_GPL(fsl_edma_chan_mux); static unsigned int fsl_edma_get_tcd_attr(enum dma_slave_buswidth addr_width) { @@ -155,7 +153,6 @@ void fsl_edma_free_desc(struct virt_dma_desc *vdesc) fsl_desc->tcd[i].ptcd); kfree(fsl_desc); } -EXPORT_SYMBOL_GPL(fsl_edma_free_desc); int fsl_edma_terminate_all(struct dma_chan *chan) { @@ -172,7 +169,6 @@ int fsl_edma_terminate_all(struct dma_chan *chan) vchan_dma_desc_free_list(&fsl_chan->vchan, &head); return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_terminate_all); int fsl_edma_pause(struct dma_chan *chan) { @@ -188,7 +184,6 @@ int fsl_edma_pause(struct dma_chan *chan) spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_pause); int fsl_edma_resume(struct dma_chan *chan) { @@ -204,7 +199,6 @@ int fsl_edma_resume(struct dma_chan *chan) spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_resume); static void fsl_edma_unprep_slave_dma(struct fsl_edma_chan *fsl_chan) { @@ -265,7 +259,6 @@ int fsl_edma_slave_config(struct dma_chan *chan, return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_slave_config); static size_t fsl_edma_desc_residue(struct fsl_edma_chan *fsl_chan, struct virt_dma_desc *vdesc, bool in_progress) @@ -340,7 +333,6 @@ enum dma_status fsl_edma_tx_status(struct dma_chan *chan, return fsl_chan->status; } -EXPORT_SYMBOL_GPL(fsl_edma_tx_status); static void fsl_edma_set_tcd_regs(struct fsl_edma_chan *fsl_chan, struct fsl_edma_hw_tcd *tcd) @@ -520,7 +512,6 @@ struct dma_async_tx_descriptor *fsl_edma_prep_dma_cyclic( return vchan_tx_prep(&fsl_chan->vchan, &fsl_desc->vdesc, flags); } -EXPORT_SYMBOL_GPL(fsl_edma_prep_dma_cyclic); struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( struct dma_chan *chan, struct scatterlist *sgl, @@ -589,7 +580,6 @@ struct dma_async_tx_descriptor *fsl_edma_prep_slave_sg( return vchan_tx_prep(&fsl_chan->vchan, &fsl_desc->vdesc, flags); } -EXPORT_SYMBOL_GPL(fsl_edma_prep_slave_sg); struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan, dma_addr_t dma_dst, dma_addr_t dma_src, @@ -612,7 +602,6 @@ struct dma_async_tx_descriptor *fsl_edma_prep_memcpy(struct dma_chan *chan, return vchan_tx_prep(&fsl_chan->vchan, &fsl_desc->vdesc, flags); } -EXPORT_SYMBOL_GPL(fsl_edma_prep_memcpy); void fsl_edma_xfer_desc(struct fsl_edma_chan *fsl_chan) { @@ -629,7 +618,6 @@ void fsl_edma_xfer_desc(struct fsl_edma_chan *fsl_chan) fsl_chan->status = DMA_IN_PROGRESS; fsl_chan->idle = false; } -EXPORT_SYMBOL_GPL(fsl_edma_xfer_desc); void fsl_edma_issue_pending(struct dma_chan *chan) { @@ -649,7 +637,6 @@ void fsl_edma_issue_pending(struct dma_chan *chan) spin_unlock_irqrestore(&fsl_chan->vchan.lock, flags); } -EXPORT_SYMBOL_GPL(fsl_edma_issue_pending); int fsl_edma_alloc_chan_resources(struct dma_chan *chan) { @@ -660,7 +647,6 @@ int fsl_edma_alloc_chan_resources(struct dma_chan *chan) 32, 0); return 0; } -EXPORT_SYMBOL_GPL(fsl_edma_alloc_chan_resources); void fsl_edma_free_chan_resources(struct dma_chan *chan) { @@ -683,7 +669,6 @@ void fsl_edma_free_chan_resources(struct dma_chan *chan) fsl_chan->tcd_pool = NULL; fsl_chan->is_sw = false; } -EXPORT_SYMBOL_GPL(fsl_edma_free_chan_resources); void fsl_edma_cleanup_vchan(struct dma_device *dmadev) { @@ -695,7 +680,6 @@ void fsl_edma_cleanup_vchan(struct dma_device *dmadev) tasklet_kill(&chan->vchan.task); } } -EXPORT_SYMBOL_GPL(fsl_edma_cleanup_vchan); /* * On the 32 channels Vybrid/mpc577x edma version (here called "v1"), @@ -743,6 +727,4 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) edma->regs.tcd = edma->membase + EDMA_TCD; } -EXPORT_SYMBOL_GPL(fsl_edma_setup_regs); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma-main.c similarity index 100% rename from drivers/dma/fsl-edma.c rename to drivers/dma/fsl-edma-main.c diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma-main.c similarity index 100% rename from drivers/dma/mcf-edma.c rename to drivers/dma/mcf-edma-main.c From patchwork Tue Jun 20 20:12:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 694603 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BAC2EB64D7 for ; Tue, 20 Jun 2023 20:13:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230033AbjFTUNb (ORCPT ); Tue, 20 Jun 2023 16:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230196AbjFTUND (ORCPT ); Tue, 20 Jun 2023 16:13:03 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2045.outbound.protection.outlook.com [40.107.6.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C27B19B2; Tue, 20 Jun 2023 13:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NQnAmdkPBiwl9eBgju5XXL/XKVnjgeYrd+q0Em1vc0m7f22KCnvvTgf9ASYBh4lB6+Z4t8fRm9Xlno4lk4nIXCpLZ49us2M4XgUoIsV7JnYAfFKv0EXUxX4kJ6QxCpKgqg9l7l1hT8pFXxxia0/l/ZtV1rvoDODth9AGIdTRGhy9uA11domaIMSIFZ6UiwU6MBUF+mGvDgPD7rnNb0vF46if+NwfCDsvhdAlXr+cPLNbm+wCN5uskdAPY2SFS+bD1biVUVaeRGUyZrzeBEhcIK6psgVPNM8ZorTIGIo3h6QLEqcyzXd2BDJA7KaB15hhofpeXlPhusIS0gCdsQvrJQ== 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=qtVmb2w/gc4SRB2f37IwBcHKtbBBAdft6k4Ina+w9xI=; b=npvlVuE0t21KGizOZ1v2RLAX1vb8sY1F9DIJ9RG7aA/bhxMbGKx2v2Bz86XfMA5Msp4yZwyFYc3Sda3azAvSsXuncNlFp0d34SCQA+UiPJhBjvOayh64y8sITJidwHQE1FTr7NjJILIiUDvuIAWrJj5UkeqgutOYt8vP0zWYCo09r2WPsZPptVF0IjdCCdy3kExajUGn83HBbqPj2AzhDYHTecwJzX1Tsh9e3StjgvFL2gU1LSWCW8syrZaOuvYZsZ9yOs7djRrbW73JQUqifjrOtcmMLj0zKIlSWEkp6qO7OSaOMWFwaZavSkDmJpoHKwkTcslANmulMkLwBJ25TQ== 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=qtVmb2w/gc4SRB2f37IwBcHKtbBBAdft6k4Ina+w9xI=; b=YlP+dS9ON4dwxUnqowDyXKDDPm5F0/UpVhjns+prpdkqwJ/SpwqewnnSszU7+wEPP6lpVP4W02XHz6f1vVU4VS2blu/wIwwhWsSHLGHcFSDGZyjDcn6AoTsVlvSBv+CZlzbA4gAvXiMVVzrzt4KpFlV39YH3JENTxUrNQ3e3PXw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 20:12:51 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6500.036; Tue, 20 Jun 2023 20:12:51 +0000 From: Frank Li To: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev Subject: [PATCH v9 05/13] dmaengine: fsl-edma: Remove enum edma_version Date: Tue, 20 Jun 2023 16:12:13 -0400 Message-Id: <20230620201221.2580428-6-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620201221.2580428-1-Frank.Li@nxp.com> References: <20230620201221.2580428-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0086.namprd13.prod.outlook.com (2603:10b6:a03:2c4::31) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB8903:EE_ X-MS-Office365-Filtering-Correlation-Id: 77ae3abb-3004-4a1e-546f-08db71cab964 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qhNbVE0oDsVguqaP6xvtrEpQNteteW7H43ZNOKkEka5sP2FrstSpoAk30jWnGcmMzSCov3kdPb7F5FbfHDI1TJX2y8/8Fkkq+giJANiuRqb2sAuD0QCSfp2JgIy9UCRMNpoWjo6N8X7UN11UQKYtJWC3xIxtoyPSMkNzWD2yWY0ljkTaajvbnq3O8udE4GO4fr3hZk3FFvoxVOAMCpQpqJJgb7bvCHEdCoXEG5g8fctzFzjyqibJAft0RwNk2FGoVMCdJ2cCLmSETsRGBfC7yUFmi7Wd+g2/z5RVWnri5Lg4jlbCDVhdmwieD30F+uKQQ4xJUOdigR1mMoREDK8lozmlt2cSJ0YwkPjVyddBQG4EP/GKMRkFiL4vgDUey63lJvaTk+Zs19hWlmLWCouZFteD2mbuF5ME1vAHOkm0Qu+t6xNeMlYRS/RVqvPzzbGuKMbwW0BwEAZeTyfk6EsRHaAK0Iz+ScvgR4+MTesOEILRJA57MBY7/BNgswbRAV5BHgXG2lyMEMXLL1bAox7w47n+eKrcJqs2lQyQZ6yWSdRChs4k/5kxZLXU0LpaOZZ8tdp7a3VM5nMszxFzjplKwNCqJcfdqkTxtc9maIP7mCw3s3SbABpLmBS+Q1ZtZgTOVaUsdEKpITrRr8nBULfrZOkeevvumZQkCkC822dX00Q= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(376002)(396003)(366004)(451199021)(83380400001)(66556008)(316002)(41300700001)(66946007)(66476007)(36756003)(1076003)(6506007)(2906002)(8676002)(8936002)(5660300002)(86362001)(38100700002)(38350700002)(921005)(2616005)(6666004)(478600001)(6512007)(26005)(186003)(52116002)(6486002)(21314003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4CPMEJaeJzRzlhOVORV+hIJGsWsvRT6aUbzlVCHoT3HjlMUEjtGKwTHKrIR+Zks7UKtPaBe9/jCn0bqCfCi+GRUqhfsJ8AHu8EZtOIqAEaqyKMHydD73NU6XC7ezP8XXgnQubvySr96e67c2+OYCoSpS+moAMkSrejEZFg8Qg/BrFN7LJ+eWbny/Lv1Wrew3yJ0aUpxmyRuQy1wAKXL0KrDsUL1p/ocRWmel8lTA3lxN46xPxhAmpTPKdtG+//5HQt8DohbBBe5iWqTZlUuvSE79WoxoyiNATGy0r/HrDMK3rH1oyOnv5zalKYKeD0cr5eki5jvPuUh28EMcAgdXQqVqvB2ZQ6rNnDjuUc69tG0GXJNbBCDSpcq+k8SPcmfdBvHh13K6nQm34pj9eP4NKlAP9ooPIwH1DdnyD/nmiegKna02a0yi/Hou7K/ePM2pZ+KSC98KXIw9olbVHeZht5RnzjfgJUIrc/nHDMm9Vq/QzmCTNycXhz+8PhPfQTY4YuO2Kqx2a6xeNqY59VESK9RQQ9wKpLKLvMvhEE0p7PHPW9ZuqNnRmy8zglQdeO8wnwmp+vgBETm2xqqFTbJ2HahGsgpgIOmG3xoMIiGdYPQnmNpL7/8BuViBtb6pHCByCaW2UxyMKrtFFxIoQFH2d+GB08yato7XVQ+x7pa3zDrW0ElHUbtxuBOWvtUTEehgDdp/13S9XKk0jYw8KdaSOtZlztU8W4FXuyginO5SnmwHtEgATR5X4TY1wxpnr62mcw8X1tINU5HB8rsR0OOBzeed9lz6KituOJwkIP7cXSsjrtjFJ0uSGWtVk9T9msVbXonGH8AS9T7kFULf0Z0SuA4Uw1h8KbLIacLg5JldhgQkb+iIqUxtdGKqWXq/QqqHVkFp85xWrGLkETve+zLBmMHmPaMR/FcE37KyK5xvP99Lg8C63QEqQa6pDC7Grb2X+tlanAB32NTDro6vme50Mq3Ho7ZcuSTURQ968Qg1vLwS+ITBo2ZZtyUnzqnYvExrIt9d754sy86oS9ogDmrcNLoTtbHUABxHCS5HCKcMBSuDGdkcP94gEvksKN5wX7YQyDhguBfIACFIM6xEuruLiBVGm9RtQB6FpbXvZdeVUwLAVOO40/m5FDfzzDA7Ij0/88zpVx44r2J75edNHH0/GswI7DwCc4ntjuoAGeUJpuSftU0ehDcpezlbNwhEU4NQvmHce8QgirxSJxdXHpfrQkBwivfJCz4ByMnOvaR9Edb897bOjR2JE55u5Uin9ebpWLRoRJ96xcSELpHH9ItOL0jkrCd/iC+DWJ2rXXGvRNT75GZxJXDkOpe+xz1LHmxiR5wko+l9rjOAmQZe55ZnJwo6iWhW7YEidEBTJoA6jUBVuvzmwQvkYa17/zMejopbZSHO9k6L1ng478KC1/e+RQN+H7ITpe5uFHqEtTYtTNTwr0m11QSP30WXrKyPUNY9XO4zkQHybsEnwo9OZAv5I5SDGTBNTEZYRDHf+YLnIub0E+qSxRzHm7/Tq40pPRo4g8yn9D4Fr3UGE/mP8DXrB65u3R/YV7wktqHjgGgyzAlNCsKLTan0fsfdnWE7k4V1 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77ae3abb-3004-4a1e-546f-08db71cab964 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 20:12:51.2430 (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: gLfRWuZ1o1i5UcoyLjlNmM8/YKFqDAmeUH7JAVZb7dDO837KIHb4tkeGOG1wvYwVC9n2oIpiluEMhT0SJNlgpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The enum edma_version, which defines v1, v2, and v3, is a software concept used to distinguish IP differences. However, it is not aligned with the chip reference manual. According to the 7ulp reference manual, it should be edma2. In the future, there will be edma3, edma4, and edma5, which could cause confusion. To avoid this confusion, remove the edma_version and instead use drvdata->flags to distinguish the IP difference. Signed-off-by: Frank Li --- drivers/dma/fsl-edma-common.c | 47 ++++++++++++++--------------------- drivers/dma/fsl-edma-common.h | 10 +++----- drivers/dma/fsl-edma-main.c | 8 +++--- drivers/dma/mcf-edma-main.c | 2 +- 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index 10dcc1435d37..9948babcadf6 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -47,7 +47,7 @@ static void fsl_edma_enable_request(struct fsl_edma_chan *fsl_chan) struct edma_regs *regs = &fsl_chan->edma->regs; u32 ch = fsl_chan->vchan.chan.chan_id; - if (fsl_chan->edma->drvdata->version == v1) { + 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); } else { @@ -64,7 +64,7 @@ void fsl_edma_disable_request(struct fsl_edma_chan *fsl_chan) struct edma_regs *regs = &fsl_chan->edma->regs; u32 ch = fsl_chan->vchan.chan.chan_id; - if (fsl_chan->edma->drvdata->version == v1) { + 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); } else { @@ -120,7 +120,7 @@ void fsl_edma_chan_mux(struct fsl_edma_chan *fsl_chan, muxaddr = fsl_chan->edma->muxbase[ch / chans_per_mux]; slot = EDMAMUX_CHCFG_SOURCE(slot); - if (fsl_chan->edma->drvdata->version == v3) + if (fsl_chan->edma->drvdata->flags & FSL_EDMA_DRV_CONFIG32) mux_configure32(fsl_chan, muxaddr, ch_off, slot, enable); else mux_configure8(fsl_chan, muxaddr, ch_off, slot, enable); @@ -682,9 +682,8 @@ void fsl_edma_cleanup_vchan(struct dma_device *dmadev) } /* - * On the 32 channels Vybrid/mpc577x edma version (here called "v1"), - * register offsets are different compared to ColdFire mcf5441x 64 channels - * edma (here called "v2"). + * On the 32 channels Vybrid/mpc577x edma version, register offsets are + * different compared to ColdFire mcf5441x 64 channels edma. * * This function sets up register offsets as per proper declared version * so must be called in xxx_edma_probe() just after setting the @@ -692,33 +691,25 @@ void fsl_edma_cleanup_vchan(struct dma_device *dmadev) */ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) { + bool is64 = !!(edma->drvdata->flags & FSL_EDMA_DRV_EDMA64); + 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 + ((edma->drvdata->version == v2) ? - EDMA64_SERQ : EDMA_SERQ); - edma->regs.cerq = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_CERQ : EDMA_CERQ); - edma->regs.seei = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_SEEI : EDMA_SEEI); - edma->regs.ceei = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_CEEI : EDMA_CEEI); - edma->regs.cint = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_CINT : EDMA_CINT); - edma->regs.cerr = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_CERR : EDMA_CERR); - edma->regs.ssrt = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_SSRT : EDMA_SSRT); - edma->regs.cdne = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_CDNE : EDMA_CDNE); - edma->regs.intl = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_INTL : EDMA_INTR); - edma->regs.errl = edma->membase + ((edma->drvdata->version == v2) ? - EDMA64_ERRL : EDMA_ERR); - - if (edma->drvdata->version == v2) { + 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); + + if (is64) { edma->regs.erqh = edma->membase + EDMA64_ERQH; edma->regs.eeih = edma->membase + EDMA64_EEIH; edma->regs.errh = edma->membase + EDMA64_ERRH; diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index db137a8c558d..5f3fcb991b5e 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -138,16 +138,12 @@ struct fsl_edma_desc { struct fsl_edma_sw_tcd tcd[]; }; -enum edma_version { - v1, /* 32ch, Vybrid, mpc57x, etc */ - v2, /* 64ch Coldfire */ - v3, /* 32ch, i.mx7ulp */ -}; - #define FSL_EDMA_DRV_HAS_DMACLK BIT(0) #define FSL_EDMA_DRV_MUX_SWAP BIT(1) +#define FSL_EDMA_DRV_CONFIG32 BIT(2) +#define FSL_EDMA_DRV_WRAP_IO BIT(3) +#define FSL_EDMA_DRV_EDMA64 BIT(4) struct fsl_edma_drvdata { - enum edma_version version; u32 dmamuxs; u32 flags; int (*setup_irq)(struct platform_device *pdev, diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index f5cf95d185f8..47bfef1c562c 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -225,22 +225,20 @@ static void fsl_disable_clocks(struct fsl_edma_engine *fsl_edma, int nr_clocks) } static struct fsl_edma_drvdata vf610_data = { - .version = v1, .dmamuxs = DMAMUX_NR, + .flags = FSL_EDMA_DRV_WRAP_IO, .setup_irq = fsl_edma_irq_init, }; static struct fsl_edma_drvdata ls1028a_data = { - .version = v1, .dmamuxs = DMAMUX_NR, - .flags = FSL_EDMA_DRV_MUX_SWAP, + .flags = FSL_EDMA_DRV_MUX_SWAP | FSL_EDMA_DRV_WRAP_IO, .setup_irq = fsl_edma_irq_init, }; static struct fsl_edma_drvdata imx7ulp_data = { - .version = v3, .dmamuxs = 1, - .flags = FSL_EDMA_DRV_HAS_DMACLK, + .flags = FSL_EDMA_DRV_HAS_DMACLK | FSL_EDMA_DRV_CONFIG32, .setup_irq = fsl_edma2_irq_init, }; diff --git a/drivers/dma/mcf-edma-main.c b/drivers/dma/mcf-edma-main.c index ebd8733f72ad..7b05e303ba51 100644 --- a/drivers/dma/mcf-edma-main.c +++ b/drivers/dma/mcf-edma-main.c @@ -172,7 +172,7 @@ static void mcf_edma_irq_free(struct platform_device *pdev, } static struct fsl_edma_drvdata mcf_data = { - .version = v2, + .flags = FSL_EDMA_DRV_EDMA64, .setup_irq = mcf_edma_irq_init, }; From patchwork Tue Jun 20 20:12:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 694602 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2C34C001DE for ; Tue, 20 Jun 2023 20:14:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229740AbjFTUOE (ORCPT ); Tue, 20 Jun 2023 16:14:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230301AbjFTUNw (ORCPT ); Tue, 20 Jun 2023 16:13:52 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2045.outbound.protection.outlook.com [40.107.6.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91A9B19B4; Tue, 20 Jun 2023 13:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GXECgD2N7sH8xZyLqWGJjO0qZV4yUJZPIQF+QA3u5KqhtKD4L10QRAyXZv8D0RCeCV5Vabh8EBCBEAevIX+t/hFJI2QBEH3ujrNDnetnBp7aaUhMY7qzqAdfkDUFbsbEzhEDsobRjqo2EBIUrRywaJZbSawatEljJNB2Pyivh30m6id63a1+Zl8dv5TJ86YafoIjfJsfLg4wowfRztzVXhzOqSVxDUuVaCOeNShNnFeB+Y8/EdcaovLG3WQBpRFm2OowH6RQka3BigQTc1TVqSnoN556Cp7KvWaspCDholddZ7FRX8e1roshOHf3gskX/o84t7R/NbmiDuupjP+USg== 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=EWGw4Zf+HBff2ktpvDNTKgNM3Qy6tvNMDZ1fjELGovU=; b=kgX00qiUW7aPuRiq+jm3KOOcaazOyktzxdFh/8RTu35rJo8G+8qq23woY2madGhpJXIRejDZMdvcWRtufYCCGQ87K1fl05JLrPUB+M525G2brHUbaVwyz+ob2uFrjF89d5xbZoEYGHTy3cdSjVZE/0LODiqJ37MN7A26w8+kI5Sh4PqCYBohaERlSDiqijP6n7EWO4sKm/N6rjr/Lo1mwpWL358g/TrCQvOmUQtlR5vu4XirwU+66tMWzYKyQtwyb5wytoAkNCEDGYyFbN4eVSOuGmCTRa8MDOFiU09gO/1/2z8D3Ogq9dpEM2dNpbXhZDJrr+rrg7OwBzAyG3R5Cg== 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=EWGw4Zf+HBff2ktpvDNTKgNM3Qy6tvNMDZ1fjELGovU=; b=oA5JEksnC8CUKDb89laKFIvF4WQLGS9oVaeXVYAey7zeUX3CUVe9soPSk1Yd2rHXIFHYHhKSn04DfqY9AT8iAXWAOPn65U6y2wT1MJbMUtkEqY4o95HuE6/On316xwKjgDMbbXY+oGZp4oktJfDLdYeTlMtmiHxxYg52uIiFBRo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 20:12:59 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6500.036; Tue, 20 Jun 2023 20:12:59 +0000 From: Frank Li To: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev Subject: [PATCH v9 08/13] dmaengine: fsl-edma: refactor using devm_clk_get_enabled Date: Tue, 20 Jun 2023 16:12:16 -0400 Message-Id: <20230620201221.2580428-9-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620201221.2580428-1-Frank.Li@nxp.com> References: <20230620201221.2580428-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0086.namprd13.prod.outlook.com (2603:10b6:a03:2c4::31) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB8903:EE_ X-MS-Office365-Filtering-Correlation-Id: f91d0883-339b-450b-3c92-08db71cabe56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ANxSQzmW7ct/55eQXo2QQh1u63sGTCKSEaRnPLh4Gw36KH3XS6xZpJdruOeLFzrYw3bGIwsW0GC48tINDidYxnevQQnJr1OnD/OzI8G8172Ojgn9u//5bwmOjolbbckeoJs7guvG2zPU8dF+wvYt0fgbC0Pe0Af/jbTVQVRBqLvC3ZIcIrpPHVgnDoL0WO4UuqaKDXPKOopGjLoK1JGcyxcc0SoWo+tYm5taO3ikVLS5HL6CDJ/vasaQvnCUPXz6ceYefHJNUfg3X2L2+9iDM67xoNzgTN5pHY5bsyVTecxo51odavkIb6TyS49EqizpwjDrLFkDoOrzJ0kkJ0HGlAVBC7OWKXzFbzPkM1HVuBQOSW0VXKpZwFvIBw3Lh4UMRPzIp+WbM8PiL2pLLCElu5r9ga3T1EIYBky1KVFo/ZRaziCs4LK4agc8AXT4GbWynpbhnCDgXaNzpgXDRqSY/Rw/X/aWss3Zi3/H5TutVXRwFinuUVi5LOOua2dB+qz3DGGVDfVHf2My64ytPUxYQ5HMykEGqAALXDn4GnP3x1e8X19neuw0tFRb8YT7NdyeZBTY1bfWN8YRwGmcUIOROfYDTp+ftdiuwsbBdJLWwDLQ1l4NBL0FQmiUf7PCdtCrGI12G4DmOdCgdH57iljC+A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(376002)(396003)(366004)(451199021)(83380400001)(66556008)(316002)(41300700001)(66946007)(66476007)(36756003)(1076003)(6506007)(2906002)(8676002)(8936002)(5660300002)(86362001)(38100700002)(38350700002)(921005)(2616005)(6666004)(478600001)(6512007)(26005)(186003)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Be56q2rBeaMeoEc7Lm0/h7P8O9mfNt+mGU3gIdk7GOiiHdglzEi5TXKBcaeoDsFVJUEplvOpe1z70m0HhJa9rFrQ1uMosQ05titnCSlON+vnR4sufr0gH7217bFYS7iSrPGyEnuJBOiOJDduJR8DtYcatvwmg3qLESp3BbmyfnVGGfB9jGJsbuSIcgS/Ub5Q7TWb/MZsb0Xs+h0Zb/tY2LIaupUFoQylczvcZ+757G2j9FlOaXsu37nFUyWTIbgBadAe6agQm6VyEHa8z1lzm2sTAOoe5ykQ3JfynNEkLQm91ds71OYTFFG7VaGTOBAXMMLxoDAM1GcEjGNDdjAJkXW67O+uT94zH0VXn/af4abXz1nSCOve7A4Dv/eGphlvyNuawu9vfR5a5l10yxOdkDO1TVa0KgZ+q4UWVHMJSiJ8uRdQya6ingqt7q7xKLLt5dm5gtGpCR4dbzGa87sTiOc9/9ZVJXG2saRM1ynaz0QUS7fotWbvarjcp4MfRVWy1g6IXEuCM4mPYldzGo0B5ZJOF2kDSHZeOdUqX/jEPbO7Ep602P4gXKzkkdGsB39B2vY8qXxAqco9N5AKcMEbUXkeL5U8QDwmahumd9J2hdSIjSyuirbE4ufx8AUfhnMoDZoEmp1Zsmnxe5U6LO259zftLNRhLClMiVPaNUibrShaBfeLsznoHYEAk3ZYkWsO+Hw/1RJI2ZcaT9AdXen++cQs7DLx8g/dZMAiufcraT+PCmyKtjK+TGWReTk0QHEcQWSSQ8hLUa1Qxlel/yb/X8WwTCOtvVQqYUTFg8/m0uyrMyjUR0aEokhwEu6gSR1lK/E1PPJg9QL704Uaxuk4ZqRLkJAYBj58f4qjPY8TN8+gFfOsPYhWLdJDqmGPR7fEYXsQXLl7npX5Pw5HDVT8FjP/AVnsDud0mkazmE+Ll3U0yYwHIMsPLiwy6wdETLG36GnlBSSwRMjFoZOyybea4SKM3vIULEtZPp7xsmLyhVCfKm/wJSJsRzoHle2mUQba3mKcKGfjX/fs0MgNGdqTXAZBaRrsELh6q6Ow0AXMLx0Wa6wAIGgh0Rr9z88fJE38hnQZDSMGpOP5owbDXc9p+DQZ1vKI349UhCYMHzNygYIUCjlOI25s3hhnTYv6kKxX41d5DDrKCU3zeCYBjhsBIJOfPQCZ7VP/rpkZqB6jZFdWJ2fbiJnXvC9TqscqNgmeH6DX80L4bSFx/UgZA7HkdohRlYzjHwvBrj9hBEQw8oTZHw9TIibHpLtskzPbhsec+FCWNanA1pB1LhUvtEdv/FMVektyIOdiEt9HT81rE74r+5nbLvECnZIbGcy+Oqy3j+BxvQwWr8jSeEUBprmvcmAKc6MP4MiNQnnQ+qbCw4Flw8EDz4BVHaGH4f6+gWpFpbpDGG2rT2ZTc8RJxLkTwa9/kNGAuQ9tTjcoizqx/CMsmDWyZBJFwlOdG0lAnk01mi1imltgA3ybDjG5Ltuwmej16jW2KjFJjjz6UoFlbFzIel+Ck6YkzrM/mUxCM2c8048jPgOSc+coyT+p6fdwAKyed4yMWhLV9O6FWXleGogkLRVjdqy7VGINPIlgrrfZ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f91d0883-339b-450b-3c92-08db71cabe56 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 20:12:59.5444 (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: 45i2ZZX/ppklSfioFlg+xeAIPfkng1D0vVujvswdc2QawaPQRjZ6R42sGFtPtV9cjo0JVk1jt71fQA4cVAMSQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Use devm_clk_get_enabled in probe code to reduce error checks, thereby enhancing readability Signed-off-by: Frank Li --- drivers/dma/fsl-edma-main.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index a0e54ca4893c..503e5ad5a8dd 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -266,17 +266,11 @@ static int fsl_edma_probe(struct platform_device *pdev) regs = &fsl_edma->regs; if (drvdata->flags & FSL_EDMA_DRV_HAS_DMACLK) { - fsl_edma->dmaclk = devm_clk_get(&pdev->dev, "dma"); + fsl_edma->dmaclk = devm_clk_get_enabled(&pdev->dev, "dma"); if (IS_ERR(fsl_edma->dmaclk)) { dev_err(&pdev->dev, "Missing DMA block clock.\n"); return PTR_ERR(fsl_edma->dmaclk); } - - ret = clk_prepare_enable(fsl_edma->dmaclk); - if (ret) { - dev_err(&pdev->dev, "DMA clk block failed.\n"); - return ret; - } } for (i = 0; i < fsl_edma->drvdata->dmamuxs; i++) { @@ -291,19 +285,12 @@ static int fsl_edma_probe(struct platform_device *pdev) } sprintf(clkname, "dmamux%d", i); - fsl_edma->muxclk[i] = devm_clk_get(&pdev->dev, clkname); + fsl_edma->muxclk[i] = devm_clk_get_enabled(&pdev->dev, clkname); if (IS_ERR(fsl_edma->muxclk[i])) { dev_err(&pdev->dev, "Missing DMAMUX block clock.\n"); /* on error: disable all previously enabled clks */ - fsl_disable_clocks(fsl_edma, i); return PTR_ERR(fsl_edma->muxclk[i]); } - - ret = clk_prepare_enable(fsl_edma->muxclk[i]); - if (ret) - /* on error: disable all previously enabled clks */ - fsl_disable_clocks(fsl_edma, i); - } fsl_edma->big_endian = of_property_read_bool(np, "big-endian"); @@ -364,7 +351,6 @@ static int fsl_edma_probe(struct platform_device *pdev) if (ret) { dev_err(&pdev->dev, "Can't register Freescale eDMA engine. (%d)\n", ret); - fsl_disable_clocks(fsl_edma, fsl_edma->drvdata->dmamuxs); return ret; } @@ -373,7 +359,6 @@ static int fsl_edma_probe(struct platform_device *pdev) dev_err(&pdev->dev, "Can't register Freescale eDMA of_dma. (%d)\n", ret); dma_async_device_unregister(&fsl_edma->dma_dev); - fsl_disable_clocks(fsl_edma, fsl_edma->drvdata->dmamuxs); return ret; } From patchwork Tue Jun 20 20:12:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 694601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 206ECEB64DD for ; Tue, 20 Jun 2023 20:14:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbjFTUOe (ORCPT ); Tue, 20 Jun 2023 16:14:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbjFTUO0 (ORCPT ); Tue, 20 Jun 2023 16:14:26 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2056.outbound.protection.outlook.com [40.107.104.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F5FF1BF4; Tue, 20 Jun 2023 13:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e7QWUHvvhOTeCjJe/BqHAYUDcfSd6PuuolK4t/ESBTnHDVpsR0bQoPwceY6EUpzuc1Xq0zaRLUMKFYrKe44op1DRaUZL1OBGJ8ZVWE5bN7QWPn5cDP1qFIp1vXlhdP9672b3Y055/7AZ1cM9xS1UVIEMZQWYOvlx6Dowk0EEtArxdmFpvcuS+PyMaR13hK1dwju+SJ8Y8H0bwuFcpWWVOmCBHNTkgz24sxFxCykSujjE6rpwGg68753Wy8MCToPCuEkqCO/WQpqlC0wjODRgKL4fpIJ+U6qYJ1OcXactG17PgWfToX5iTD4lQkLUN2RPvJj4sFSEWS9bsC+diP1vNQ== 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=Q3jlBv0SLDnSXx5LFjozJINPkoX9ob6AsqXt6WuD2a0=; b=gFefSbbR/WPmJIyHaW0hGE/Og40aPpTGaKlkgMXXQSK8lPzBCC04B6fcdFl3sSqjPjwdeYXH6YpbpMrT7yR9xBDS1EEBJ2yWbTedJvPXKF2j7/x2x2b+8298rsBN50MnM6Ad5bfOyIyORPRT/B0LSNQAJxp+OU2CGEADzLSBUdhbqnhhmV/NcRv+PLc0S8KYLB8Cp69U+WnvMObR91fAs1YNp17JoAkAJYrM3mQ3nL3vsDYNcse34AdUvTa0HRkSoaOAepnIz2t6V49LSY74Sn6hA8q8AObByjW64LKt0jdYRmfzLU3j1j14Xte7O/+vDcdDxH0biIhmixDFWceoWA== 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=Q3jlBv0SLDnSXx5LFjozJINPkoX9ob6AsqXt6WuD2a0=; b=j7+4aH11eCFyVij5R1SKuN6A1q2kACxtTHX5JKxkcKLPUldlkdeEKvM3lFNU4QPj5GGd3TKhsfizc695+jp5g5Ya9hjjOkRMYyLXeA1LYNQKD8IogJ6ZNiGU6jmD7EA2/4YSdkITLfm5FlNvO0i/yknpWgLtRKfxCEtFB09wpmo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 20:13:02 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6500.036; Tue, 20 Jun 2023 20:13:02 +0000 From: Frank Li To: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev Subject: [PATCH v9 09/13] dmaengine: fsl-edma: move clearing of register interrupt into setup_irq function Date: Tue, 20 Jun 2023 16:12:17 -0400 Message-Id: <20230620201221.2580428-10-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620201221.2580428-1-Frank.Li@nxp.com> References: <20230620201221.2580428-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0086.namprd13.prod.outlook.com (2603:10b6:a03:2c4::31) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB8903:EE_ X-MS-Office365-Filtering-Correlation-Id: 10921907-3db5-436d-34b5-08db71cabffc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f5CS4KihdSdZeBKZQsd+bANubMvfPrfqPa58Dftilcfiypwx7wl6MlLDi7O5JR1AKSwPwgtRXakChqz3t7QrQ4nz6u6BcZ9LY7UUS39ZEEjvBp6jS3TSXxtsly+uiANOwzC7G3NEHlsa/feKIZmGjJ7APiM8bnQYu6AFCPag8Nzs9ovGGcaQMFOkLjwc8hJQ92kMXHe6CGA4SDhcruIy/tETizIrNSbMgaQmBBpAsFU66nmuf+b5i6FVYnhPKJs8GdrANrBG7jIdIFvsj/drKioJd+73lRHKZC1DLAPQyjgLGcqrbHc/vzxj3uVfz6Bnrupsf8MEHlX0aTf357dC/eCOos1EsrRpom29zQQCcCNy7y0AVWxrM6xeg88xrQI+2vQ9fk/AkUupxvAsHIVATqXq3ratqCZ0i3ZG3nk4HnA9QbN7s1os5Od/oyCz7/v8wKrzLQ2FUPF2DKQbRbV4Jgu6fe1bkZXHD0k6SUwJQYFRYokECsxnIZvag7FjDABgvfhNIbqspuA8gb828j4q+0b0ZC9+Z1wQBIAHb+ynMFAQDNXh1y8+QxfkCa182qA/Wvyx0S+V/0kIBmCZg7Jj3LXRArU0Kbd9jrwSmAtMbSr4aXKDGznTSC2t/TXRby9EfPrxjRGfb/xnb2JXqwOwzg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(376002)(396003)(366004)(451199021)(83380400001)(66556008)(316002)(41300700001)(66946007)(66476007)(36756003)(1076003)(6506007)(2906002)(8676002)(8936002)(5660300002)(86362001)(38100700002)(38350700002)(921005)(2616005)(6666004)(478600001)(6512007)(26005)(186003)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OLg+OuLYhjUU8RtTveseBeuMwfhcZt228ZUlFhiYRlPKCb4pvTGqh/gG5vp2NuyxlrIK04XFp/IvHYXrHXdEaZn26HzLptibJIWNflFitbwXOwrl3ofHKD+9MMk/GIZltqyFIvNrFxhmAZfRe1FCCHB7I/LjrtEhatLudvOSHC9GgnnyPHsKtujTJ76Mh5UJZePnuX+uB2yJT8hsf0E8XcpMYAsF5ZLTAMqCpwWAUHHEMLfGD/AZLlYHUByJ7zHrs4xItpQPyiI3NV8Ow7owYqVGBTJLOP9NFxzDQjyxoqa7Tmt4c5eM+gTugoUI0RTiEMxWM7ffQ1sRkfbR/RTVP+k2AEDon7wqOcpBr/LVBtZYfpmW3bb1zE3GgR64+tYyj4g73WAWYFf0vXqj7n4jzHygBI2ZqV5RCENtx/R8LM/0PGwC5zwC28Kdhe3gNuV02BMJ9602AcWx3P524rcuBTtL84vMUOxH/1+JTEFwuwlp24lYzbaj56U3ksako8q9yQC4t6etbAwozAlNp2mbk/FRmgaTrGPpiqC2M+N+aXNxbGJtDKC4XQIphWWMPCAoanZGjEGaUb6S4Zn9ShtMmCmtPrmffU6kcGV/NUlt7MclXCTMo5nxkiqU9ugsttL41Miv/ZKvrPxzsuZtvwd6QJHbCqBlpe0VRLAC5XaFkNyPPk/vfsmbK5aCWV1QdUZ2u7akVfPy4xSNbE8GDfUBCJ8oyyhQOy7n2vAsY81u2iSPCShnPzZcCB4SUZqMPz9jE+dIr5QS0myuHxZrZFALUWkYinLOkoL8Rsexw+aa+HTXrnrFq8NsrMrCYlB1ORUz53WcP8q/6R7YXYru6spalDX4eeTInWMNX08P40fcP08S3ALaF3EzQiu+8s2RdMQipHIEBdpB2MNPY66bJGdW+2lFNC8t8g2/CT1WskeQA+1b5w9PZgcMHkol+OouFSaCq1G5QumTzemVygCPG9sWbr4kpolDxmN1tGIZ2QbzsQpQGzzCRZdTBYtZmuB102AUvMFith1xPVIWavIC4GM50+cD9VNBRKhSeMAugG9TLYCoJ/DwhVIsLJrKvCLFk5VxTAY/KwR9gCJ041QadxUat3ZKaIsWHG7fm8ziXsJIhvlPBTUi9vTNkH0CGsfXvm2vFxrk26EghpvBj+42FoggdRo74wIdqUU+UUjYkyAvJ8ejKXhihyqUNlD0Rcs2M2LH/KjArRrOzGUz/hir2KBDDoc1N/lVp17G9W33f748tcTosbNr5VhgY2iVuABdyiuT2Fg7ow2CyxcviPNKorzZq46XPc1hnsppoJqmXVfdqDXyzM1bgxHKuQGSBGsjc9TMuF+oF76omE4hJ4rrcqlp4YzGZhTCD1Q2h7XIBsQ9gxiFfUKs7SiwmVyCFaaHxlGL97GRz1MOZxvZeGOQ90uq+5/0JzYPyFv8T5aHzbv+VwDGTNXzielDmrvI/wQLUhJRlFfE6KMNy51FZ5F1WwRBnJraH+dBBqPDyjNVm3t/sfe2Jk1gycsY5aWOYEBfkFGSnXzIwNOMvrCsocubGHdRH2jKVSMWpI+Fgl1GJDqUinPbfpaAuNNEXyo9bl9ju0DV X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10921907-3db5-436d-34b5-08db71cabffc X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 20:13:02.4308 (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: AsyjJus/7DXwJaUCq6GXbVrDHZf9Wwyj0RcrAEELGGqqIMvbYxVF4meYiUXwYFpM6SRit0jihMF10aJEusuZuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This accommodates differences in the register layout of EDMA v3 by moving the clearing of register interrupts into the platform-specific set_irq function. This should ensure better compatibility with EDMA v3. Signed-off-by: Frank Li --- drivers/dma/fsl-edma-main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 503e5ad5a8dd..e67aec3f76b5 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -113,6 +113,8 @@ 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); + fsl_edma->txirq = platform_get_irq_byname(pdev, "edma-tx"); if (fsl_edma->txirq < 0) return fsl_edma->txirq; @@ -154,6 +156,8 @@ fsl_edma2_irq_init(struct platform_device *pdev, int i, ret, irq; int count; + edma_writel(fsl_edma, ~0, fsl_edma->regs.intl); + count = platform_irq_count(pdev); dev_dbg(&pdev->dev, "%s Found %d interrupts\r\n", __func__, count); if (count <= 2) { @@ -311,7 +315,6 @@ static int fsl_edma_probe(struct platform_device *pdev) fsl_edma_chan_mux(fsl_chan, 0, false); } - edma_writel(fsl_edma, ~0, regs->intl); ret = fsl_edma->drvdata->setup_irq(pdev, fsl_edma); if (ret) return ret; From patchwork Tue Jun 20 20:12:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 694600 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B10DEB64D8 for ; Tue, 20 Jun 2023 20:15:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229923AbjFTUPH (ORCPT ); Tue, 20 Jun 2023 16:15:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbjFTUOo (ORCPT ); Tue, 20 Jun 2023 16:14:44 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2056.outbound.protection.outlook.com [40.107.104.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44A5F1FE1; Tue, 20 Jun 2023 13:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j9oyWpTYAvdaWVFBnFAX/buFOgwK2CD5+x7+ZmdcoouA6AqE7UBJUQb2cnprvKs0t0lxMya7U8zfNzxLRCl50fM6Mhgs0TtxSuYdV2h6++cLh2c/QdroLc9tCNeGZ0bmCXBNIeDxJj6o+v9qW1NZqTPGQSsT6NDVMb04bWtfLzrkEcU+kg4EYV9FVHxmVldfzXAHcOny2RTVQLFU5OXbvtGzbq3OEUHgie7oxzXADsnPLBgioJXvRS8yap9K82eV3zu+246hJUUyNv3X+hwZLDuI+4HGLrEGuVK8PhNvGKK7Bxmdbkaux5NI1o15V+O6gyJMd/PFIJ+OjGD8qXbVJQ== 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=LwWZJ1o2vN7Jj1Wd6gxZKukLqr0NduZpRCO/jcgnVtQ=; b=b6gd/iymS4AHdx0UaiIJa4UOASEVBBeUtkd+FyDwalaMKm+/383mf4HAU1AM9S4uPKVDSBQk9qDg3CKuENZ/jvAanTAbWD4jpUHdrifCfxfTA0WnOL+9gHn1wOs03sJ+ORC+tpalIkXNVKF2pWuXi5GYNkQS/JYTu1brMZC4M+LA3BiZKwUrvvui4fQKg193sfs2meLDuH7wpsJHpG4FYl27CmIO/03JUzSUPRgXzwhV27PE1B77uMLKrJ2HqUZVmnjSrmkB6QnD+L45ZAfq0hTZheYJCFwXuTrmMfLYtnkRaeql2caWoAPoxHKFKqk/7uyUR8qi239HltWNFGmevA== 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=LwWZJ1o2vN7Jj1Wd6gxZKukLqr0NduZpRCO/jcgnVtQ=; b=kTxt1VhQ+db6VbtGc40ufrw0utoksElyUyHJQr7HQiKpc2XmUZXrdwCL1Sl78iM1OkrDkfsSaSXm5Knf4ZHmv+Z5sTWlksLeaEaN8ABD9tIaIqXqbnehBzEr7JAn/TiT9pqn2U0i89ATIGOggWCdHQHQsTIzUTptfE51dXU1MF8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 20:13:08 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6500.036; Tue, 20 Jun 2023 20:13:07 +0000 From: Frank Li To: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev Subject: [PATCH v9 11/13] dmaengine: fsl-edma: move tcd into struct fsl_dma_chan Date: Tue, 20 Jun 2023 16:12:19 -0400 Message-Id: <20230620201221.2580428-12-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620201221.2580428-1-Frank.Li@nxp.com> References: <20230620201221.2580428-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0086.namprd13.prod.outlook.com (2603:10b6:a03:2c4::31) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB8903:EE_ X-MS-Office365-Filtering-Correlation-Id: 00f46712-0b54-44c9-99ac-08db71cac35d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qoiU76dCcJNPEYvMlMo8LwRxmaWgW9jQfLc+YbMOnZbh47/quN+kUAZ+cDcWf4Y5EzvdIG053Jbrk5LKk6Ix8XvrJiOsE0W0sLyBOCNG4cBbcdGOyTA9vjOiadWGuqUjDjZk3I6x8PfDbEdi4mFoOnm7nzeWqfuTIevfKKpyg1NSEkC1iAaOHitfz9GBvLQHQnIv916lF369uc2QO/cyqgSlcPM7VYTThDwae9Djjx4A+NwHY3RC4vOIr+h4dVbNcJukNT99jE0LjNO27FoXGG5Wz8uFdbn9GzvFFU9EI4yPPOxFEkCCgI6f9ZqpR1L2osR4jHaL01HziBGoiEuKZxyQNArTacRSIaXHwc2DyLHjtvkErukD5mY12RwupkHmbajWcuo4OEj0BhCX4p7ZSeQMS4OwM98JkzglvyqoJlsQvU9+U7zhJRbIB6LzQ/velNmtqYh9TyZpwz4+g8REQAUNlLcUotjm7xyd5jtrQrPC360xIQf2KBr7Wp7B5izg2riC8Dz+V0NlWOVfJiOJXM8L+ywLqt3W8SYvisrJr805xaEM/fAuOoLD2yh/ZFhwc8Cx1VeBxikeOgFBmkoNCHEuRDgvX+Sf+Sgibm0y6eKoBJ6NZnJYWJBT2Pl1nvK3 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(376002)(396003)(366004)(451199021)(83380400001)(66556008)(316002)(41300700001)(66946007)(66476007)(36756003)(1076003)(6506007)(2906002)(8676002)(8936002)(5660300002)(86362001)(38100700002)(38350700002)(921005)(2616005)(6666004)(478600001)(6512007)(26005)(186003)(966005)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9obVFexMGZpmAr+rUoprcQYlInxqZYjFh7iQtdY7eQrPIiHZfCJkA9XTl+pHLQaSxp0DvYBLIJPrQ+T2HPZkQjlqB7olp4FgzjGOOrYurmJrQnIs6avgg0WDdfVmwmh372+li3f37dLKDmwCtv6QDql/gmwNcHGe6vbEvsTaOC0URaJndy3W4qGvvkJzFHfY+tLM/iulXsksgRQcadVifb+nrakA/EqFIYJTI41D/4GLiRi10IeIuLfhdOTPvBV0GE3/wmq+VhZbu8z8QPTD29eHNOWWu+aov5UXyEC5DluKNQwRwAjWV2jHQP7utaTsZb93mkTLWQiKLmJrLhqrUnBnGhJEyJ4DA+lzII/q68FdRkt9CieoKsjCD1EQJLDXwR5xw/GYCF0lU5ENBybo/HiIWN6UQekecMzBgmsTm1QqaGiSPdAGLG64z6wLN44bNFXq7/HMtflvlJxXhE9hDeDB2qPtFc9Vy0j+cH88qGnjZJ35wKP70u51931CJQcVbuOof6H38d5oGVFOi1+wP7ukNrvIABPR2FkJS74GeY1FMCUQv165TepTY2DXSSNpz0CUp68IKKOLblePK3Ydf877QcQPOiKIjGgyCzrIREHISl6+JMYS1w17/PbkdX0ZrUE7QEkVzG7rGcZfuwD0sd6AzrM7AVWmWaOxer8eaIphQ6OZxrCudmR4T7QcyyrihNIS9v+qvRGV3dFOv1xJe5XQ0SMubMNxQ2B0GM7ljrmBVG5ixOBod+ee40bbntyU+GqvqUpSv8FPkkmNa9wQON3Jf4W3ulgvMV9XGvuxTTaHNO3yi2ffso825+M1dp3A1t293dCXoVgLm43SxRmM+L11gST2tAFCZ0FAnzvfYyU43MUPC1VargMD8d0WzttZNozluJvi9GVlH1daF7Z19438X7BRdDTUkQMOR/XisbdJnrWXPcXX/GwWlsKnPXdur7CJxx6ps6TxpfKcLjC36aeZhN4DrkDZzhzKEgi9wgeBSm6kBdYATfoTBbYXVIKUFVPzlvrxVCBjE8MGVghNSxQuA5P4jVCxs10ZPuhHKp6sOk8YSEIb54LxKl4z6BqEADRCkzp+yZvNgUyOMqHilleF0pdBgQyYWYQX6GtLLaFoddcQCXgOrjcNVyUiGAxROsf5c6Ty+NiYVOtCllTyNFackt24IfcGyau60S48HG56ClEtpaDYFpOlmoCmYknI1pPQRr0UpZDMEmdlubLspAQEjf8sEK59LIKSj61Ufvq/tKC2X9/D2isVivmoTEW5ywgX4IxsjTdnNo0Z+0dxLH/Yh52Y8ILLFeQrrjj0P3hF2I7gJlSJEpSUWxYqrjXRQBcazT4xjtAve0D5jvejbx3nrUFexkAt2LjGcyfUWcTZk2R/gBtLbzEow+dloTJdHKWpq/klqe+cymtSfeo4bX836vt4Aa+6I8lB6P9as/jPS6Knvb45bdENyXe/DDMQ4SrWKyREDim2DFPhV0FiHi7IQeKfFQ0uIP9J/ycBT+wX1mC31xV1ELnoKqgnLpVXFdar8wIaEkv5BiTK06CYlG8wiVybvmuQ2SvgNNHtMI69Cv30qd1Vv/nQUuJtkxUR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00f46712-0b54-44c9-99ac-08db71cac35d X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 20:13:07.9699 (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: DrMDcRJIEGKsmIgEEiO5QDdSIH8ypc+4AqB8+nvCqiBcamhJ3qR5zp6gSn9/2FQJjVWHQYn7acWJm50wHzwI/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Relocates the tcd into the fsl_dma_chan structure. This adjustment reduces the need to reference back to fsl_edma_engine, paving the way for EDMA V3 support. Unified the edma_writel and edma_writew functions for accessing TCD (Transfer Control Descriptor) registers. A new macro is added that can automatically detect whether a 32-bit or 16-bit access should be used based on the structure field definition. This provide better support 64-bit TCD with future v5 version. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305271951.gmRobs3a-lkp@intel.com/ Signed-off-by: Frank Li --- drivers/dma/fsl-edma-common.c | 38 +++++++++++++---------------------- drivers/dma/fsl-edma-common.h | 22 +++++++++++++++++++- drivers/dma/fsl-edma-main.c | 6 ++++-- drivers/dma/mcf-edma-main.c | 4 +++- 4 files changed, 42 insertions(+), 28 deletions(-) diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c index 51fbd7531c74..eead6a4765f7 100644 --- a/drivers/dma/fsl-edma-common.c +++ b/drivers/dma/fsl-edma-common.c @@ -40,8 +40,6 @@ #define EDMA64_ERRH 0x28 #define EDMA64_ERRL 0x2c -#define EDMA_TCD 0x1000 - void fsl_edma_tx_chan_handler(struct fsl_edma_chan *fsl_chan) { spin_lock(&fsl_chan->vchan.lock); @@ -285,8 +283,6 @@ static size_t fsl_edma_desc_residue(struct fsl_edma_chan *fsl_chan, struct virt_dma_desc *vdesc, bool in_progress) { struct fsl_edma_desc *edesc = fsl_chan->edesc; - struct edma_regs *regs = &fsl_chan->edma->regs; - u32 ch = fsl_chan->vchan.chan.chan_id; enum dma_transfer_direction dir = edesc->dirn; dma_addr_t cur_addr, dma_addr; size_t len, size; @@ -301,9 +297,9 @@ static size_t fsl_edma_desc_residue(struct fsl_edma_chan *fsl_chan, return len; if (dir == DMA_MEM_TO_DEV) - cur_addr = edma_readl(fsl_chan->edma, ®s->tcd[ch].saddr); + cur_addr = edma_read_tcdreg(fsl_chan, saddr); else - cur_addr = edma_readl(fsl_chan->edma, ®s->tcd[ch].daddr); + cur_addr = edma_read_tcdreg(fsl_chan, daddr); /* figure out the finished and calculate the residue */ for (i = 0; i < fsl_chan->edesc->n_tcds; i++) { @@ -358,9 +354,6 @@ enum dma_status fsl_edma_tx_status(struct dma_chan *chan, static void fsl_edma_set_tcd_regs(struct fsl_edma_chan *fsl_chan, struct fsl_edma_hw_tcd *tcd) { - struct fsl_edma_engine *edma = fsl_chan->edma; - struct edma_regs *regs = &fsl_chan->edma->regs; - u32 ch = fsl_chan->vchan.chan.chan_id; u16 csr = 0; /* @@ -369,23 +362,22 @@ static void fsl_edma_set_tcd_regs(struct fsl_edma_chan *fsl_chan, * big- or little-endian obeying the eDMA engine model endian, * and this is performed from specific edma_write functions */ - edma_writew(edma, 0, ®s->tcd[ch].csr); + edma_write_tcdreg(fsl_chan, 0, csr); - edma_writel(edma, (s32)tcd->saddr, ®s->tcd[ch].saddr); - edma_writel(edma, (s32)tcd->daddr, ®s->tcd[ch].daddr); + edma_write_tcdreg(fsl_chan, tcd->saddr, saddr); + edma_write_tcdreg(fsl_chan, tcd->daddr, daddr); - edma_writew(edma, (s16)tcd->attr, ®s->tcd[ch].attr); - edma_writew(edma, tcd->soff, ®s->tcd[ch].soff); + edma_write_tcdreg(fsl_chan, tcd->attr, attr); + edma_write_tcdreg(fsl_chan, tcd->soff, soff); - edma_writel(edma, (s32)tcd->nbytes, ®s->tcd[ch].nbytes); - edma_writel(edma, (s32)tcd->slast, ®s->tcd[ch].slast); + edma_write_tcdreg(fsl_chan, tcd->nbytes, nbytes); + edma_write_tcdreg(fsl_chan, tcd->slast, slast); - edma_writew(edma, (s16)tcd->citer, ®s->tcd[ch].citer); - edma_writew(edma, (s16)tcd->biter, ®s->tcd[ch].biter); - edma_writew(edma, (s16)tcd->doff, ®s->tcd[ch].doff); + edma_write_tcdreg(fsl_chan, tcd->citer, citer); + edma_write_tcdreg(fsl_chan, tcd->biter, biter); + edma_write_tcdreg(fsl_chan, tcd->doff, doff); - edma_writel(edma, (s32)tcd->dlast_sga, - ®s->tcd[ch].dlast_sga); + edma_write_tcdreg(fsl_chan, tcd->dlast_sga, dlast_sga); if (fsl_chan->is_sw) { csr = le16_to_cpu(tcd->csr); @@ -393,7 +385,7 @@ static void fsl_edma_set_tcd_regs(struct fsl_edma_chan *fsl_chan, tcd->csr = cpu_to_le16(csr); } - edma_writew(edma, (s16)tcd->csr, ®s->tcd[ch].csr); + edma_write_tcdreg(fsl_chan, tcd->csr, csr); } static inline @@ -736,7 +728,5 @@ void fsl_edma_setup_regs(struct fsl_edma_engine *edma) edma->regs.errh = edma->membase + EDMA64_ERRH; edma->regs.inth = edma->membase + EDMA64_INTH; } - - edma->regs.tcd = edma->membase + EDMA_TCD; } diff --git a/drivers/dma/fsl-edma-common.h b/drivers/dma/fsl-edma-common.h index 316df42ae5cb..cfc41915eaa1 100644 --- a/drivers/dma/fsl-edma-common.h +++ b/drivers/dma/fsl-edma-common.h @@ -48,6 +48,8 @@ #define DMAMUX_NR 2 +#define EDMA_TCD 0x1000 + #define FSL_EDMA_BUSWIDTHS (BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \ BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \ BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) | \ @@ -93,7 +95,6 @@ struct edma_regs { void __iomem *intl; void __iomem *errh; void __iomem *errl; - struct fsl_edma_hw_tcd __iomem *tcd; }; struct fsl_edma_sw_tcd { @@ -117,6 +118,7 @@ struct fsl_edma_chan { u32 dma_dev_size; enum dma_data_direction dma_dir; char chan_name[32]; + struct fsl_edma_hw_tcd __iomem *tcd; }; struct fsl_edma_desc { @@ -156,6 +158,16 @@ struct fsl_edma_engine { struct fsl_edma_chan chans[]; }; +#define edma_read_tcdreg(chan, __name) \ +(sizeof(chan->tcd->__name) == sizeof(u32) ? \ + edma_readl(chan->edma, &chan->tcd->__name) : \ + edma_readw(chan->edma, &chan->tcd->__name)) + +#define edma_write_tcdreg(chan, val, __name) \ +(sizeof(chan->tcd->__name) == sizeof(u32) ? \ + edma_writel(chan->edma, (u32 __force)val, &chan->tcd->__name) : \ + edma_writew(chan->edma, (u16 __force)val, &chan->tcd->__name)) + /* * R/W functions for big- or little-endian registers: * The eDMA controller's endian is independent of the CPU core's endian. @@ -170,6 +182,14 @@ static inline u32 edma_readl(struct fsl_edma_engine *edma, void __iomem *addr) return ioread32(addr); } +static inline u16 edma_readw(struct fsl_edma_engine *edma, void __iomem *addr) +{ + if (edma->big_endian) + return ioread16be(addr); + else + return ioread16(addr); +} + static inline void edma_writeb(struct fsl_edma_engine *edma, u8 val, void __iomem *addr) { diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index e2fbfaf9155d..8ba705080f5d 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -310,9 +310,11 @@ static int fsl_edma_probe(struct platform_device *pdev) fsl_chan->idle = true; fsl_chan->dma_dir = DMA_NONE; fsl_chan->vchan.desc_free = fsl_edma_free_desc; + fsl_chan->tcd = fsl_edma->membase + EDMA_TCD + + i * sizeof(struct fsl_edma_hw_tcd); vchan_init(&fsl_chan->vchan, &fsl_edma->dma_dev); - edma_writew(fsl_edma, 0x0, ®s->tcd[i].csr); + edma_write_tcdreg(fsl_chan, 0, csr); fsl_edma_chan_mux(fsl_chan, 0, false); } @@ -419,7 +421,7 @@ static int fsl_edma_resume_early(struct device *dev) for (i = 0; i < fsl_edma->n_chans; i++) { fsl_chan = &fsl_edma->chans[i]; fsl_chan->pm_state = RUNNING; - edma_writew(fsl_edma, 0x0, ®s->tcd[i].csr); + edma_write_tcdreg(fsl_chan, 0, csr); if (fsl_chan->slave_id != 0) fsl_edma_chan_mux(fsl_chan, fsl_chan->slave_id, true); } diff --git a/drivers/dma/mcf-edma-main.c b/drivers/dma/mcf-edma-main.c index 316e637b00c4..bccb5448e492 100644 --- a/drivers/dma/mcf-edma-main.c +++ b/drivers/dma/mcf-edma-main.c @@ -200,7 +200,9 @@ static int mcf_edma_probe(struct platform_device *pdev) mcf_chan->dma_dir = DMA_NONE; mcf_chan->vchan.desc_free = fsl_edma_free_desc; vchan_init(&mcf_chan->vchan, &mcf_edma->dma_dev); - iowrite32(0x0, ®s->tcd[i].csr); + mcf_chan->tcd = mcf_edma->membase + EDMA_TCD + + i * sizeof(struct fsl_edma_hw_tcd); + iowrite32(0x0, &mcf_chan->tcd->csr); } iowrite32(~0, regs->inth); From patchwork Tue Jun 20 20:12:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 694599 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D950EB64DB for ; Tue, 20 Jun 2023 20:15:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229883AbjFTUPi (ORCPT ); Tue, 20 Jun 2023 16:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230519AbjFTUPD (ORCPT ); Tue, 20 Jun 2023 16:15:03 -0400 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2056.outbound.protection.outlook.com [40.107.104.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37CE3198B; Tue, 20 Jun 2023 13:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y4/t0aPGuZ1L2zg98aiJF92nnagccoS/kO1Ad/6WrpA44F4hLywnK2JjHzrf8I+CSGxl5tERdkB5bRRe/WFwd57E4NyFrYVqhxepHo06+fcVE6RB7Qys+/9NQ3XZKvIE5EejPJ2s+JD8p5ZUWZp1kZK1FLOjskVe24b+zylqy+yUnaJFk5An1ugAZ6zssVMFjUkaToNCZG5jmW5WCv1ZJiZDK/Iaf9gDetTqQ2g2SfxrBIAp+0lu31QbEI/iqFZRFMcbT7jAPeFH+gR2WBOdWUPQ88u5dGARyYScmN73fJyLcWJon9YBK9udOXF1mh7sRQgJJZ2Yheva1a0lrrksqg== 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=xq4Iw/E/mh3cyEFC2hAms1m6XpyOfkMliNlCzrEMfG8=; b=INtcog2dUHCVj9Kd3E0SD81gCNgBAL6zMHNoRyghA288bn782HdpANGSwsfuN8Nz4UX+YoFsRN4S2X92C4O6cbSQ3zr3J3IhZbcZ2HZth12w5U7A6gMnqtKfm/NlNnbZzX5svnzQ8ZAXz4UimT/ZO+6R23TXCdK0BQRorqpxmbxn4cqxoO/6qgkaa0VcWb1OlZKEp4AaSAUzUlXztj1ub4F8HoZ96txlEZYWtTcCrqvip0oKctNGWVM2lLaPP/AAEaHC2cfZOw/kaHwt6r3pW8+5R2o86idlcAfANBc+S7LoeBj9WMM6XfsrH/OvDXcrXGGB6mFAmKu0UrEfYxaHaQ== 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=xq4Iw/E/mh3cyEFC2hAms1m6XpyOfkMliNlCzrEMfG8=; b=MlquFqCQmgYhoG7yNf+bwSAMGtV+1XwKSmovieC5VyjwkJ49Qpo2kyJZ3ACcuF4iWkUpExRmGavWk12+hN2BTidapLRBZAkjj2d/DoJv8p34H06gG7hIPizYTC8Fd9aMeOGt0z9maavuMy3hriSWT9qFLUgVmASfhi2ogNDJvy0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB8903.eurprd04.prod.outlook.com (2603:10a6:10:2e2::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.37; Tue, 20 Jun 2023 20:13:13 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::4a2a:262e:415f:e41c%7]) with mapi id 15.20.6500.036; Tue, 20 Jun 2023 20:13:13 +0000 From: Frank Li To: vkoul@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, peng.fan@nxp.com, joy.zou@nxp.com, shenwei.wang@nxp.com, imx@lists.linux.dev Subject: [PATCH v9 13/13] dt-bindings: fsl-dma: fsl-edma: add edma3 compatible string Date: Tue, 20 Jun 2023 16:12:21 -0400 Message-Id: <20230620201221.2580428-14-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620201221.2580428-1-Frank.Li@nxp.com> References: <20230620201221.2580428-1-Frank.Li@nxp.com> X-ClientProxiedBy: SJ0PR13CA0086.namprd13.prod.outlook.com (2603:10b6:a03:2c4::31) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB8903:EE_ X-MS-Office365-Filtering-Correlation-Id: e4cfeb69-81ee-4b53-610c-08db71cac6c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XX+y8EQbZ0pKO9RiqcCmY60IgE/Uxn+R1/2HIcomZ9iO6QRz1/UNZVcspNcdW8UMckOiBFMCPwdt7GR55vOVB3DL9tE1TyOCFs5jrxrFx6pUiuxgXG7E8kdL2ZWTe8hws14hqwBIXZES+N5+wKrgUlOeTCpypfN+FPA8AOHcbE6jg2u0DRWf2VSzycw0WR8ulsFTQnAJf2c8SdnxF4O/tjuqkC/kiR6QZ/gFLzQ8N82UC85zdMROpaFtMUdDA6uDAZaqosXJSgIfWvPi8eomvZwN2HwKtYolZq6W/DC1gXBLt4tffAFwAgenlzb2ch8lt6QRNjyiG4tD070MtPx5R8XLTa4MsZdsFx/K+JwPSUmPx47bRNWg6HakLfBMTZK9/YqGyE3qFT/HTQlZ++oQe3weqwqNGPn7LQdsltJvzV59TTxu2IZIdg5ukGUF8cvYqD+aeL7CC8RDleCY7tOsWoQ5sTJzDPURdCNo8/LbGs6kpp2waHMREom8l5pmD4LnIWoYja/SIrwohGAP+BcqLdKPRjLWTmz37BATBgbmhDzYGQskE2hIy3r8AIJ31OIERYFSTnFa8DwaIOzCTXaxV76HIEbSAhQTYoDRB1orNPQaYoK4S+MrwRkWpnz/Uuyw X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB4838.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(346002)(39860400002)(136003)(376002)(396003)(366004)(451199021)(83380400001)(66556008)(316002)(41300700001)(66946007)(66476007)(36756003)(1076003)(6506007)(2906002)(8676002)(8936002)(5660300002)(86362001)(38100700002)(38350700002)(921005)(2616005)(6666004)(478600001)(6512007)(26005)(186003)(52116002)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Okevdtol618Mw0GtHPrJJ8lNcEtacisCuaYxMTFeC0la9vkmsYsnMqRmCxBtV9th/CKrvPN/O0R0hEoKMIzcu6JUhhZo32daFSRgP4i+gGjTNZKeW+Wpi77Er3G+geLdtofzNrx2u36JwfJJ2S1wsleJTL3LCEk/jsRia3cIbnn54elTQdXjghbcCJ3kq/f9OvXdhflySE86TP7ulBs/LgTWYaaho39eMK+/+LbWU4wGwCjrPk/ciJBI1YUk2G5mq469W9591XN6Cd7FFYMar5u2cTR5E9V9zzyljo9aZjAuE9FJG3TWsWTmaakAC9t/74Uka70my8nilv2r5sgPffzglBYE4pRUv+4OLw1AolLpNgllQebN1I0TyEjHs9W4T7hqN7uN89rg1whOVOl21EfWBDqV5wtYqOO8eP22qWBT3yGDmWCDJU3VnuKggCowFv+RDfvwibhWpKDDnRJiLo7UjnRPfjKAcKnrq5B36+P6NU8XG/IhMZVL0GBtkP3MINxYR0eGS9mOqTUdiyL4QlVn7pk8WZVnPLLhGeBPMPRxv9Ol8T5cMyykCpsqqENL+N2goS9yior/512LkvUhw5uuLm3uRKjOI58rXsCrzSNqE25o3b3q9ydLE6eKTzu7u4OcHwU6YnZcfHMP6p8XCegt//CTp+c7XefnPmdiSQcKb4FRcz7DpzgIvYhkUFrP1EgYRtoVhJpmogzqva0u+yArJJ4EQ8UvEUO5Rk029e5ekBwdNnZDBey7h45gh+D5YkMljfb2UT/A9EfTlUD4weLteo10+ksUp7YN9/d7huaZyi7+1y5apLIAUXLRSof9oWf98E1yGe0YzV8zBoC071RMDz8L+W1ejZ7FM5/5z6ZZpVgBU2DsIQBHugfWCtN2P6cEmsI1yUWUcOfVMieB4lX4vi98WezaL25eQVba8JX/fw5Alw6EiTdqngGqZDZXjSB00HSGD286sagpqP96Uxcxk+1mbDNEDvxG318OQmzuW02myltU+5r8EBOeFlWF3PNea1mv2cllkrS2iOGkNnvXzX7a1wBDTVZOtPXE+fZEdChxZW5jdHq0AWo7KCmer+D35SoISLGYhkGu8bZif8wIqpM6STa/q+P6QXSP3ZO/cDLp7BvknEkf2R7yeDMBzZ60RkpSK7VPeRXkSMqCKAwzD4BS0QN1NhvDaPuUPGHVE9OlPr9To9qhYbvTx06Aj+XBxz2y1woICRGmeYtuq4fC4E5hAVidCg863zDq9TwHJ1I7Tp9sS7vSaxS0K3DJ2YMABZRV8bKWN+wF4hoywRofb/mcM/zUt8MnAEHVVYc10NkI61iaOM84fsCptvLIdNPOVBmbB9Zo0uZNndNa0gIIwUv7mjIzT81m4JaJR4R7l39cUI+bRxumNznBCA0WTQ5knbD3TlbySu+/S7hOaQjXzBAk5u4O8VJGTZC0kTK6BcrPIFuQMofW7lydfDHPbapF9yNQhu7X2awQU7e/NetOtrLbyjIMzva+H53RqprhP5vUKSwKhAiNJjLrTZxJ6frTHWT6aA2UFMy+i61WP345Do1u6bskoT0+DCmpIYvjmsyMzbTnoSM1PXDtW5S+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4cfeb69-81ee-4b53-610c-08db71cac6c1 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 20:13:13.6348 (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: IwQ+FotIqU4/Cwrcm5ravt9W4K/TjkZ39I+MB4xlgK2CgZYL8+JfCY7JfZGypQBmaVbpzNAJEbDRJqIrqQVs+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8903 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Extend Freescale eDMA driver bindings to support eDMA3 IP blocks in i.MX8QM and i.MX8QXP SoCs. In i.MX93, both eDMA3 and eDMA4 are now. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Frank Li --- .../devicetree/bindings/dma/fsl,edma.yaml | 106 ++++++++++++++++-- 1 file changed, 99 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml index 5fd8fc604261..437db0c62339 100644 --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml @@ -21,32 +21,41 @@ properties: - enum: - fsl,vf610-edma - fsl,imx7ulp-edma + - fsl,imx8qm-adma + - fsl,imx8qm-edma + - fsl,imx93-edma3 + - fsl,imx93-edma4 - items: - const: fsl,ls1028a-edma - const: fsl,vf610-edma reg: - minItems: 2 + minItems: 1 maxItems: 3 interrupts: - minItems: 2 - maxItems: 17 + minItems: 1 + maxItems: 64 interrupt-names: - minItems: 2 - maxItems: 17 + minItems: 1 + maxItems: 64 "#dma-cells": - const: 2 + enum: + - 2 + - 3 dma-channels: - const: 32 + minItems: 1 + maxItems: 64 clocks: + minItems: 1 maxItems: 2 clock-names: + minItems: 1 maxItems: 2 big-endian: @@ -65,6 +74,29 @@ required: allOf: - $ref: dma-controller.yaml# + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8qm-adma + - fsl,imx8qm-edma + - fsl,imx93-edma3 + - fsl,imx93-edma4 + then: + properties: + "#dma-cells": + const: 3 + # It is not necessary to write the interrupt name for each channel. + # instead, you can simply maintain the sequential IRQ numbers as + # defined for the DMA channels. + interrupt-names: false + clock-names: + items: + - const: dma + clocks: + maxItems: 1 + - if: properties: compatible: @@ -72,18 +104,26 @@ allOf: const: fsl,vf610-edma then: properties: + clocks: + minItems: 2 clock-names: items: - const: dmamux0 - const: dmamux1 interrupts: + minItems: 2 maxItems: 2 interrupt-names: items: - const: edma-tx - const: edma-err reg: + minItems: 2 maxItems: 3 + "#dma-cells": + const: 2 + dma-channels: + const: 32 - if: properties: @@ -92,14 +132,22 @@ allOf: const: fsl,imx7ulp-edma then: properties: + clock: + minItems: 2 clock-names: items: - const: dma - const: dmamux0 interrupts: + minItems: 2 maxItems: 17 reg: + minItems: 2 maxItems: 2 + "#dma-cells": + const: 2 + dma-channels: + const: 32 unevaluatedProperties: false @@ -153,3 +201,47 @@ examples: clock-names = "dma", "dmamux0"; clocks = <&pcc2 IMX7ULP_CLK_DMA1>, <&pcc2 IMX7ULP_CLK_DMA_MUX1>; }; + + - | + #include + #include + + dma-controller@44000000 { + compatible = "fsl,imx93-edma3"; + reg = <0x44000000 0x200000>; + #dma-cells = <3>; + dma-channels = <31>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + clocks = <&clk IMX93_CLK_EDMA1_GATE>; + clock-names = "dma"; + };