From patchwork Tue Jul 13 18:41:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 475027 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE291C07E95 for ; Tue, 13 Jul 2021 10:25:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9345361167 for ; Tue, 13 Jul 2021 10:25:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235596AbhGMK2a (ORCPT ); Tue, 13 Jul 2021 06:28:30 -0400 Received: from mail-eopbgr20072.outbound.protection.outlook.com ([40.107.2.72]:26754 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235475AbhGMK2a (ORCPT ); Tue, 13 Jul 2021 06:28:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lk8p+UUGzfNS4pvswg/A08uMzoqSDFvoQWbTzEVpdM+a7S1w2Wz7kHZL/oOJZCIN7Rg8y/pQ96sAa6/W8fpSM3T8lrKevBuEIarjJl5gDV6oIOBrdTjp9xvKogkrPuptdCXiNsoJmLlRh0I9o9nKZx45EPhfAFdSC8K9uFL9Yv5Nd2Z5sdoxFNgEJUdbl9JZSMbGXmPjX9hibKFbXDpJWDs3uDaTcBM+MYQdse4jUt9YB2fibGUnVH0tMYXGGwCAh6K/4DkFX9p0Nle09oTQQkMzMsr7trwb+ws8zjZjhEfT1y/uJFLOwSYBjL7Lx4K9DV9oAF3DJBewDRfczoGHqw== 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-SenderADCheck; bh=NohpbX1KCjpCzOGoRNYXm1GGmodOK5+pSXpQ//vTgpc=; b=aUJNP/JUaASGsvtbujDplHGbATj5pCE7DAMGLG2nEluMhzX5XDk+iZCyz25tYufe2Mlu28RwUh1e0D+Foc83YwYmgInEKFEt2AIh+VILTKXuD3JSzLmOI8/oaavsLQ3A2dj4JbrYhOCFLVCdmnE1DI4CfZLg79tB5JIjJX2G7PJDlceh00ww1wp+o/koGKH+dfCnBlt6gf/gSuL6cNCOCwPWQgnhySZJ3Tjo7oSjKkcC7qtl69X3h/3D0ccWVetY6d6uI/OCAVnc8PvU5jzVkdvxrfJVhyU7ZrEu4GgQOE5H9p20Dhh0OzuNdBuiOqQC9ibyeTG3/et2HtVHzkIYXA== 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=NohpbX1KCjpCzOGoRNYXm1GGmodOK5+pSXpQ//vTgpc=; b=X9Zqie/nXr+toYCm5awaB2BFXI0CjHsqeZ7k9fGb+8Om/+nrIVJUCZo1J4+56PJQAk1BX+lszY9I+rygfVlYvoXheNeu8n8zyYAz/mEnNmkVwYaMfdS5jeViGro31Ug0YfN8TVRDgo19pKMeaRhKNXfvwNzWt7x+DK425hYS+ZM= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:25:38 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:25:38 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 02/12] Revert "ARM: dts: imx6: Use correct SDMA script for SPI cores" Date: Wed, 14 Jul 2021 02:41:39 +0800 Message-Id: <1626201709-19643-3-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 032fb65a-68f1-472e-e923-08d945e88eac X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 47r6EzDbqOy9sLfgWzfRkOXY9m+5hH3whHnDqy7EKVp8g4bzLACC59FysmMVEbI314Y6NwUPpvdc37fLlFLk2ZuxsCFgNf0C6ZRPt680SPe5mQoZJ4H5My4Xz58OX38CRyMwb1dLMZxbvsABimnDuDXA7pYKJ7un0O4TrsWQQyT/ilqpvrQkgER99NPKfhf4vA84fH+FcNOEMGvuSJb8NI9xeXiyc3CDsdDVcZxEqHp1M6P5Y+x7a1R85uWJbUV71THG9cHcDAFCqarDQ68jGg+rxjMSJFoNj9Iv0pNq396Gw/49ngJa99XOuGBHQ44XW/RuqIPfAJB+g7JEUyGIulLKAmdO0iqyhZ4jFrkwihgFxU6/nCu82JiPOUZUfVKhndm8ZIvezR0BNaSFUQCKsXstfaj/7aSwjZq8nb6paBo+q8lOxHnMhP56i1QCNgf7W5f9UlwFgRjXXgJBAK46UXXmdTG3FKzKjBh1Pm8o1YOg2hs+2M6EeZ5gJ9//thr61++L4VS22dtyU1BfmAlfyCuEpGhLXJ6n78uRGyFezrHhsMgjitPT7sjsvS3iuNmV9UuMS8IMj2omxBnOxw9SFzolsUVfuc0LxYY9Wefk5E8O4oEDy0a9m6+biobS2agJRZ8xCgXqGO3chigxk6nLkGqAFo3QZZ220AgBLV2IrIz+hD/HtQ4rmHs6IxRevED2yMrF59cFrOjrV/4dI4Wn8faRQ4Ry+JWXIPP52vltURLS6uMR93oVgQRDNWrZvJ2Jy3rh2KjV2twk8uiNtZBtEBLdAu2GSbqW7ZP8npp+kdX5j8UYEgfGJNTSGVsu5YpQ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6512007)(316002)(83380400001)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /26cykMMDyh8zlIAh83pYxUucS1KvyRXdAcfms3z6HEyn+vhtTIneJPQTgSpoY2RpSLE6zkd1+OQ/jEcUNnPjzI23aHJHCfXxKgArbqrvp9J4fh9aAl6B8oXJ5ICWtB9t4D2YIqM2ooSlSZ3rRyQvsO2oxcf30sJDORSB1HfEoNTqmcBN5RkyJbk3gzqF8FoyVW1oDczY6qUn+bHrjs1qVcBD3BKCsk34T411gHIwxG3JdYXifZgylHDx9F15OonhMXcIq3Z02lS9A3LkbIoQdx9BUxtYBht2Mp1ip7kO6n20oGqKdq4MPslYPNVNOs9TuoYxBhZiWu4/7AZOzDGJE/oMuM9Xyy6bST8Bkp24uMQfrzDaYPEO/2CQ4dysJdcxce/SekN0JH3QAEZO31o3jLC8jjRM8dqg48y87tj1R0RIfWXvq1M0jJ7j3qGIbmsCeo3Wsd8KLyM0dq+xkNdw5WKZ7vPOyMR8qqNSzb1P89z+0HHI/tSa9dbXTFxG/OFbDxM9HjsvNVkGhNKsLxMptqCU5Um5kjl9i89Em3y83qHS9URnoV9dw4Mat0HdRkX5k0NdAjZkAk9brAtjjXQEMc3sCbArEu3mbGO2ADh1n3lomwyRZppKesjUY08/orC4ppjjUiysJIxnoXYKAaOaGSi7W3mL5rOEJXPsqGNijFBuDrbLr/D1vrLQ9r1/tSz9CuSVKLwA8jCKgsnJ73P19az0RzgrdfkWtE1LEBpk0zxpHJJwAn+rKqEnaHRmmC38Z19f/UxGnklJaGp3uVqDf2eY4GkZvLWHwFm55YQTulzH7u27ASj0F0R/tpTv3I9PyGHAftXuDSjKw4epds3Z55eG+sIaYs7zdbHCEiQYbnSN+yAmStulmtXFnmSHvEaU6EARpLifUdu2szh/UFTzE6c35V6CzmU81iQRfjSABhm3Su7jcJvQlwtQVWyZck2R4XzYAgkmiOfFLOEQ4C1EJmENvXPaVUtFi3gPrXmG8N9Lxp7kP53Bzhkshn+YnPB1lctfTWWIRmH4Y5FLWJAE/zsAPOMZhBIxWC1q72zW+Uir21Po4P3YcFtsCgqhae6Lz63qj8cRNRifU8q/dcxmw/Ylg8YD14908JPIHdBNIpH4jG0WE6HzCIKPy9AupcEpaT6IhtVsxRwQzJJ8Vw8JYCrVBHbcTvitx89pL3wbSdu/kw9R8rWjjSc6Ncbg/v5Vw+M8/qEDaIOZSr3RfHkXm2ffB4hIB1l/X1LN+TfxfojIOA22gDHCVmmGgdjYkrcLXtQ17hwNbYeUMYQmCYM3t5RaM51rTmwvyO09TVnNwHnhSAZPVopcpd3vQ9CdyCj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 032fb65a-68f1-472e-e923-08d945e88eac X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:25:37.9960 (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: Dlp3BC7fQRbPO57ww+bknQV+nawIbVFXXG3DZUmiryQlVEqw6tGZ2P8VlnTqB69lNKhqT4z2ekNVSM7OyR0jCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org There are two ways for SDMA accessing SPBA devices: one is SDMA->AIPS ->SPBA(masterA port), another is SDMA->SPBA(masterC port). Please refer to the 'Figure 58-1. i.MX 6Dual/6Quad SPBA connectivity' of i.mx6DQ Reference Manual. SDMA provide the corresponding app_2_mcu/mcu_2_app and shp_2_mcu/mcu_2_shp script for such two options. So both AIPS and SPBA scripts should keep the same behaviour, the issue only caught in AIPS script sounds not solide. The issue is more likely as the ecspi errata ERR009165(http://www.nxp.com/docs/en/errata/IMX6DQCE.pdf): eCSPI: TXFIFO empty flag glitch can cause the current FIFO transfer to be sent twice So revert commit 'dd4b487b32a3' firstly. Signed-off-by: Robin Gong Acked-by: Sascha Hauer --- arch/arm/boot/dts/imx6qdl.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 82e01ce..89c342f 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -334,7 +334,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI1>, <&clks IMX6QDL_CLK_ECSPI1>; clock-names = "ipg", "per"; - dmas = <&sdma 3 8 1>, <&sdma 4 8 2>; + dmas = <&sdma 3 7 1>, <&sdma 4 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -348,7 +348,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI2>, <&clks IMX6QDL_CLK_ECSPI2>; clock-names = "ipg", "per"; - dmas = <&sdma 5 8 1>, <&sdma 6 8 2>; + dmas = <&sdma 5 7 1>, <&sdma 6 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -362,7 +362,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI3>, <&clks IMX6QDL_CLK_ECSPI3>; clock-names = "ipg", "per"; - dmas = <&sdma 7 8 1>, <&sdma 8 8 2>; + dmas = <&sdma 7 7 1>, <&sdma 8 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -376,7 +376,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI4>, <&clks IMX6QDL_CLK_ECSPI4>; clock-names = "ipg", "per"; - dmas = <&sdma 9 8 1>, <&sdma 10 8 2>; + dmas = <&sdma 9 7 1>, <&sdma 10 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; From patchwork Tue Jul 13 18:41:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 475026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AB22C07E95 for ; Tue, 13 Jul 2021 10:25:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5362060FF0 for ; Tue, 13 Jul 2021 10:25:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235651AbhGMK2o (ORCPT ); Tue, 13 Jul 2021 06:28:44 -0400 Received: from mail-eopbgr20084.outbound.protection.outlook.com ([40.107.2.84]:5319 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235595AbhGMK2n (ORCPT ); Tue, 13 Jul 2021 06:28:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UbIT9zWX4fttyzNoPTf+ZHP5OapjmDaegm0t18vHIpi+7pqx7U4nzJ7foumX1FFQBKetQ/4wgbtWtn0ss0O5aeTPSTpDsT+VzrQvDdamO8piyVSUK7fofHRC4F7IsSdowvViIuRJD8H14EeoOqfuRRTwQ4+x4WYV0tAaXEqb3ZO+hXJfgrKEwdd5mQvJnblujXDC9+vPoqAVNav/CdLz6cCR2hnOWblSaMc2Pi6+TcbNxDBOLYBj5V6dY+LGh5rc6P46Ddt2UJGjIXZ4p6eyiTgnSSGuf9gMJ8fvmbEphPYXdn48gHv6yP03SQf1nIvPUZXrkpE79+WYrAMPUFKNVA== 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-SenderADCheck; bh=ckDPSsFVzv3NWjjrNqcD68iD8bHaj5KBipoUq89jOm0=; b=LSxUMQSe3R1l+yFMw6sH6TD59pIVkjssnuUP4Sk2URKRUfKf71SW1UL98ad4DuqWG6UKJ7Nf0+r9IirX+wSDMWdTzunaqvcXl68hOGRKcV2mezHkX6AHjbUflbOK7gFaEYrv3S/5wmsfwBT+7KWP1a2ZoF9uitd9P2r/JrDYA1Ed4LyPjDrYGqiRbwTs/vQoVUszkhr86sG1P3R+06k3Ci000Hx80sOPbR4XpcGSNRC+5FwO7ZwOzYM0YRiP2vZ4hiPgklzdbITm5C0erXlbt8+j08dzjGzSDX6QbaB/ggy1mV83FRo3Xozp1bNa5L0qkXJURUfFBCt6C8v1T9QqxA== 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=ckDPSsFVzv3NWjjrNqcD68iD8bHaj5KBipoUq89jOm0=; b=dTA391NdtttNgWHjBsbqfyHffEqbSQGg1xCRsPJ+gQOjxTVgUK8M3gj1orrbZZHtFebFG4IKXiZZPXgC3gHlDymiqpafPyNO3eddgP14+2LGFJjHRg2v8EK+S6MONQTnKi/3WOpjCh6/EyknphvX0t/OGJ7GsDSeycslFmgHirs= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:25:51 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:25:51 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 04/12] dmaengine: imx-sdma: remove duplicated sdma_load_context Date: Wed, 14 Jul 2021 02:41:41 +0800 Message-Id: <1626201709-19643-5-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c0387ef-e881-4164-ed83-08d945e8969b X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ez5Ef3PcwebbzjWH6MEjz8JzwouDTOjO7DxqfYgV6DuSncjSTbOHctjeiRjUCrwJ5pb6g4VDoWcjwyL64RUMycO3/MbaulnYnpZOKNly/HhVlDHZ+aUvQtpa5W9nF990kh3NC+ng3zMbY9n8JVlsEzZ/cV7gSsvb8AaEG8sahk7EVii6Jhx/aSu/hl9Q5IcUuHXAdtngJezgE4lnAp4JsbeGvMLwAA+7VgsV+cvMfGEcREEUIbsEQBdRaFVn1iNAoizJSPqvf59XQf/h1RguN9UP4a63GP43I/4VUi9SIGdAlWTWgMEei2s1wjrWVZifR1drl9tytLX+RC3WCUXrdXdO6CUDbbwAQLMy7ecK7TqaatvX6DrIJMGhPJ5ougLFDye5BF1qKDfsiQxKHhsZAaNegOumgdOpWT9cWn+qtiKZ9rIByKthZn2wyAmlf6q16rGrA7u+D9holgpsspy+eXtb99iG7DnSx3aFt7SWXWWsEAshCrXbv6t8ObP50FcBr4tMFFDbcLJSI8reE4x1krSw9tnvNIVsUKpYQlYk1xKluGmYu+hvooCoCoMR/SxLcZN1/9G2XkYimfcT0/VFYZtHbssth5OB8jWtvRe0wi42MbaGcKocm8XcAHH8NhPafTO8waeyiqTCdHNUxeRdnH1PGA0CiqBn9oam8gIXgQNXITkUyHmcLvrKYFXc18Zp+OZEIuZ7SFExTtjDj+O21Re1RW8/qgQ5Pe2NccIxHWQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(83380400001)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XzdLGHxl8pTxshZ3vTH8pbs4pqh4Ffhhkv3IFrYZHltFXWcrgYNmiJndiszrtiRpivC38pUWUPaZYrXnj+53FN7/ibFgXYXZHWXChxum5YpqDXuBDJbVvFxTrALPpwl2fDar7lbx9c5Y8FJnoltsiQrHcD7tjABAwEwTJXd9vWBMTfVtiRPA6yBHjCsLd8hv3cAPL0mQerSzOnZXEYoJltbSGyPwWnAPjXMYPkdMPe0zpt08iVumLltxmZxGgUviAyHNxd3ULwE+GWytq0AYY2IFscE1oZMi3Kal7q3V4AC2Q54t+qSopjxfQFSnEtCRmsbxhIhGjV4Ee4HCuovXrhBOjgEVVXNbvXTDOKi5sMMYIPevNMG9C+WTZSwXK4kHqGghjzpaR/c+F2WbDqeSwBFpoITnVEQmU9k6mC55sy52nVJmKGQrmAn8PKKEvd3DWLWtd47BjDIsV8M99S6VDr6NhAxdCJYscq1r3Ogj8nDt7xdVQhTPpjZH7/is6sWsAggSWBNEFY5ez4BDsS4MJGkl/EFIEV6z7yD/mlWULJ9/nQnM9J+OmAGA1MUQ1V+WNRuvl9uvUTKermQpjvu9bPcaNWQrcH+a1InJmw3phlXVrZCOJ2d6R+VNu0Lnj6AIZKvCuLWRp7siiOkyMCAqJYkYX5Fqw+B2621q4+zEyKe4tvyepxS9cHHEMVu+fdl3LabIOo8h4cQjLXcJKxofP8Tqw8UuorKmm2JQVkRyLxM7CJLJR2iBU8WH/3P7sJBYwTZjKJ4Zz1xVGekyErC79P19/u2Y54ETWsxkXzf3YxBnKNS9vd1nVbFBKeyBDyG/FR0DXDl+n+a7uTxbDXpkIZ97a7mnh4RT1y356/ediOquHo9TjrMGZYNfMDJRodDQacvbYJOpm2D4FHiGyBz4vpefdEkOyvelKJ0W1dI1OhKc6asy70PVnfgawIJhfabiwDaPqsCs/7ppHdHAxFoEkl/6ZtKOxLhhWylb8oReioPjt7IsOXReuKKhf0kKDVHki8ldLgsgzUKWsXnkZSxwNOwrZYqf4rcXX8JFv89CeY/YNkQOxAgpXrv6zXQXf9ijg+gBD4xIx3VJ4EwmM2+Km91for9xyvLZ8xb71u+3o4KxB37whHInlCHdalNt5Ba0JUJQdlrDBVwKIK8xwU2MSkZpCK0JZzZa+e3dd4yY5is4tOUOpTyK/gOD4zbmDzAWDtw0ANCrHQzg2A0A4CXj2KK4KydzHV5SadWCX9aLhoO2XQl5Xs33n8PX0YPQJaov2aevK5oukLkmjqYbNAo/zNOMDZiA9JdiprpA36VMACxzdD2KhSGCs4/vByKmrK58 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c0387ef-e881-4164-ed83-08d945e8969b X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:25:51.4204 (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: pHz4o1ERHJexjpu+avagBUAVQx9VCHNOiRWSk2jES6ej84Z3YY0VHjVHGktHFeyOKpEJcnAaQcJTWTDshnxW+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Since sdma_transfer_init() will do sdma_load_context before any sdma transfer, no need once more in sdma_config_channel(). Fixes: ad0d92d7ba6a ("dmaengine: imx-sdma: refine to load context only once") Cc: Signed-off-by: Robin Gong Acked-by: Vinod Koul Tested-by: Richard Leitner --- drivers/dma/imx-sdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index e510df0..665ccbf 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1161,7 +1161,6 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac) static int sdma_config_channel(struct dma_chan *chan) { struct sdma_channel *sdmac = to_sdma_chan(chan); - int ret; sdma_disable_channel(chan); @@ -1201,9 +1200,7 @@ static int sdma_config_channel(struct dma_chan *chan) sdmac->watermark_level = 0; /* FIXME: M3_BASE_ADDRESS */ } - ret = sdma_load_context(sdmac); - - return ret; + return 0; } static int sdma_set_channel_priority(struct sdma_channel *sdmac, From patchwork Tue Jul 13 18:41:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 475025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7FDFC07E96 for ; Tue, 13 Jul 2021 10:26:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C56216115B for ; Tue, 13 Jul 2021 10:26:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235677AbhGMK26 (ORCPT ); Tue, 13 Jul 2021 06:28:58 -0400 Received: from mail-eopbgr20085.outbound.protection.outlook.com ([40.107.2.85]:55623 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235285AbhGMK25 (ORCPT ); Tue, 13 Jul 2021 06:28:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F9QYQl+6fHbf+6AeqSZK899HqSymO3PvzSFdlwBxPPSwoY18/sfLbcMLCPaFgO/+WImozy74ocpGEv4kN4h02fudCRLi4nUlfYtd+x2op27ClugxPqiIpnEEomK4MmDIOMKUI3ALQPCvDCsADoKAVqqQ+juoNWOUuqayGwr9VYs9x0GkwK7G0eqrLocBWhD0nbi7ogahP5dNqgvc+fqJhO2jNQMJutrkGTzeX0o2CtcGDnGOPEuSVNL9Fz9PXQKFpI6uMZHmPk1Ir2LhuKgfPXonNSeUEQFVKJps2CNDiBj6hhVKaPpfDCbFHOPvDNfbhk8EWXPQ8eAVF7+CArsJoQ== 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-SenderADCheck; bh=5D2/Czfs1P7IlGvBqmpgpZj1U+vvrqQzpMQiJsL/4x8=; b=LlSuIr+DTVR+Pldl/undWtgi36knylMSxYm1ZyUPvnMnkAux2PLKOZBemiip396F250Alwzd5Hz9bfV4hPY3T3NX2yxrV7dQYTKgLvtmpnHBWMgUn+jK1fLNI/P6EMoEYStLK4V7b71z0UVs9D37HQwDSrt8WiUi3DEkXwBnnWDNJnSdOX6Qod5tJJcHD5qHYTUb5Nj7VpyE4duFrnZjqLVArChaUJYTHRDnx3c6BPs0vEk+xcwYnqhtNahg5WaTuPSxRrKmxgRcVeUrQtZInQL92xfvxE1V18IVh+zxjua5QnAL2pQiUbVxi6viHe+mNWxifwJ0Rw+5YzjlF16F0w== 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=5D2/Czfs1P7IlGvBqmpgpZj1U+vvrqQzpMQiJsL/4x8=; b=dQ2kHwt+K6QH0extTguJg/QfQQ1tOy0VPZbYJzEmjA5aGNM3/9kIGLgSFn8ubAERcA3rmNKClajHfFQMPwivx4betlmaLkpWN9Dyf3cGRA1YJ/Ad8n6kgvgg7uiOS8fF7/oRZ1hIXCJQ++AZiV9C4eQIvY+rFzB43S3ZSr+caSg= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:26:05 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:05 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 06/12] dmaengine: imx-sdma: add mcu_2_ecspi script Date: Wed, 14 Jul 2021 02:41:43 +0800 Message-Id: <1626201709-19643-7-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9de4c7f2-86d1-4efa-d14a-08d945e89eaa X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:361; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4zQcKeZcj8dhEZiAmEoMv4o+MgXKF16mcfCx4emFc5mTmV6pyae/qpVRlgmDo8dsdywfHibfY65dqAvyRlGfptRgxe3X8LFK7zi2WjyQvOeG74SzlO0m/VapkJauhaMrPDzyt1sKlWCiA3wEw98welyJyfVZ6hRUnd/LV5gwND7c+RiMmCxsR/VK+Vu5X8BiTjnYdXYHbLX2nO0hGu/Sj05L3edTLD7V5JIzNC+tVYaSMdCpKu0AVW0LxlXPIW5dyVskLvugaYPlI1TDS0nGlsQ4G5ZGi0M3LyIlmruFRQZa2Xv2BIV6feW5BVkc9Rr8nt4aHwTBHVAvsD2G7xH/u3+xo4p42LZQRCFYQxnUbpVc99qalNjyA6HriE4Oz+0VhrtuqWoP5J8kuJMQgQokr6DDUVeWisapz3gFvJdv8iH3ONhaVyNV6wUINPPa6tmICbfGeZ9H/syZMwiK9yrCyTEuzpReidagME7Ilh/VTH3iBfrLJGs21B/H7qrhpVmCJcDjjOLtVzwtH5I4ZasNqSktCyQg09pVVPHeN2ZzYCOUjhy9JHkAUc0c65utysYcxpg8rqkUJrQ2CWxjxFmQe0KHXkv95vml+O8+yQlev4vcmpC4lva3AnGyxyi3jrCkR5/QDXph405bqgLj4Lm69lpHThIC3cKZzTYG3EEdLaksf3eXKfAkDf2nu+SZ0Xm2RymKFIqvJsudkX4PZTBM66IqdOmh2Hg7wTdVSXBPCi8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(4744005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ukQcSG7j3zXW5VOzGIE7DLktOAWy0cuMJ4BThMnGHc+mTvRuvC9K5VwlbDj6Eexb2l45NEV4IvuyLfg9xVCYFTVypbqPx+wjb2iYXB14/UyHEu5A3VhAaa5RVD/H5ryg8icuXCEnfqmTbDLRpx9LNPcSmD1BdSvokUr1jPSsxODVtt8c5zd09qMrcw1YyuXBwc/NfA+ZT3A6u6OyqH236bTZdlJ7Z5gy27hJN+8suDLtLwZoovrA+Qil4Y6clVwe3h1E1R91Oh7VA8HzY7h2RjOL3wZdOFI2UGP90R9bTrHq8udrOXOoe7/Qe68wHTFUbsprG2ZNE+Q7sYF9QMyAeDSvn+xQpGLys+xVbnFzSgmSghYsyDeAGXA8EXLgKi6usPFNSAWUAdqsSKWGxeeT4+goDjyhdh9L8M7bNfYxzM+LWRHwndSShF8heyctwGvGzeVcfZ7DkvI+SPlUdcU8obTKOAvL6SW9gyUSmD45zUbXX/eM6OfvczyLPG9jeM1xCkbG0GjpIH/oaZ9eBl4Ljgqfs64gKvWeZPdLNH7TdxwpzQe2WmKRT078i/CfotbnwSC7vU2/ehdo/lwUPyDfBN6v0ZTOQB9EfEj6gZGbYdo5em9ZcnBn1U1Tiv0wCIkkcuhambFSemenOn6UHWHDkVDClo4jbMLQJJ+MSo0z0Z9Ga1V3cyD8zN34DImZj665WLuv0WkTCu/bJP/2j5ulbity8DGTXVHRbLoiGjZZefQbcf9XHe2QSPi1jDIMgJAUx/S/+I+7852OfvdudQpTIG7PKi2kDiiEBRGpXVufDjvTPp6Ew/AHfPjkjtUUUdVyN5tz2RpF5H0shKNqTHAhyr8GVxOMEoQsKTJ2Gwh9O1on5kXPjf3jskG7B4oiXLlkBfdMV06NJvjqlJaA+up/PCIxjQw0/2mKFQn6yqITj3WVjIz12PQ0BYwkvwt1bj9NtoN02PoLhwslCRDlaJlF8LEIlR+skZRMjy2y3xPreUe+hsxYWzZ/dAr3UpX4NCZEjZ4UdvnUYDml6ZtumSf/pUeCnaeWBvDX8bK+xtlpD1MKY/o/dXEkexEGNlstvKR2dGWKDIXr92ANWyEnRU9tapqi6XQHBN3yj2W5mxYiWN7C7N23h06Zbbv5oRFFI6uFyA6t6QPomdZm0ooNLY0O5x36fWjwdSEj80o0KjWeIPUFFsBIYU6sfJQPu4qpVMUCVWR92I3AHfmhMePSQn14t0/9ONQtt+27e1kewSV8vgWpFfa2Ekmke1D03K09kY35FZdE3YlK/EoXhBmwLJaZIEjK1D5uYeGGffUkA25ZQqRvdVpzxSXj1uEtoNmBwoja X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9de4c7f2-86d1-4efa-d14a-08d945e89eaa X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:04.9368 (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: zptVrS5cH7TMvVRhjgWvQNqg/yyzM+qncVn+j9DZ75NB3gQcFXJuYltCUobFxM6f21+OMxdOV7pVGEJI4NfYLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add mcu_2_ecspi script to fix ecspi errata ERR009165. Signed-off-by: Robin Gong Reviewed-by: Lucas Stach Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 639a783..4cb2e84 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -946,6 +946,10 @@ static void sdma_get_pc(struct sdma_channel *sdmac, emi_2_per = sdma->script_addrs->mcu_2_ata_addr; break; case IMX_DMATYPE_CSPI: + per_2_emi = sdma->script_addrs->app_2_mcu_addr; + emi_2_per = sdma->script_addrs->mcu_2_ecspi_addr; + sdmac->is_ram_script = true; + break; case IMX_DMATYPE_EXT: case IMX_DMATYPE_SSI: case IMX_DMATYPE_SAI: From patchwork Tue Jul 13 18:41:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 475024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 789A4C11F66 for ; Tue, 13 Jul 2021 10:26:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 666766115B for ; Tue, 13 Jul 2021 10:26:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235529AbhGMK3S (ORCPT ); Tue, 13 Jul 2021 06:29:18 -0400 Received: from mail-eopbgr20053.outbound.protection.outlook.com ([40.107.2.53]:28903 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235730AbhGMK3K (ORCPT ); Tue, 13 Jul 2021 06:29:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEO7YItxXInSgDbfOHlQRdpl9O7IYG2xeWDZNstNipUCv3FTNHdTz48elLDKBm6OjRLwlkvb81tORTTGDSgx7JmrUGNiYRr/gYZ4xkx+80RD+XJDkc6vsUJdZcgRcSKUJV1Olw36aZkd4P0uy8CuToZN8kXMdzncEPW17nJsxOzROfQGVXJy6BUb+RsZtf4F22ELBWdZPolHHWDFZwe6PZsuFeH/AbOGrQH9wWQeTaCwCrmY+ndtgkraCY8kKk1Faxheufq7TwnjUUAX5XhYfQZzVcBm4MGd49v3tqn1i1CS8h8FRC6PZgG/MxB4IcZ6Lmvwe93yId7cj9H1SKBZjw== 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-SenderADCheck; bh=idwxBfwcWMgbvSDKmIijITAOmdmaYljkCXfE7OYchws=; b=DWLGTG29EgXsB25CFnvUhzTIkeKvC0Gtfw35PqVJ+uy8dt63yiRvdublx9H0neGZXrnPQJzF2wdjTdUd08+gPmCHlCWjsJhmccno4arTdf0uwPIwQLGXBhDhtfMxgwiKKa5WK/Ei1B6jDJKZePS6+Al18zMV/7bOHvnDAPBxTSGq2uLoSNF+U9dJAxdFyVdfwmLVnJMGRrdaqF0W1Efe0bC2krJ4dEPnvWH3C5gCZLU2tWpwhs9ovAyKlP5ElyvUwM8S1+byNB0YkKK+P9WfvuJpfg44Pxmw+BgGp4uX+kBdY9RRMvsCDGP9SPv7qe84zch/kmzBam6RVNRvMWng6g== 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=idwxBfwcWMgbvSDKmIijITAOmdmaYljkCXfE7OYchws=; b=lnIevpDoGT9eFWgodTXsYISSoTYhgyWjTizYUfffgck2MGayBcD9FfQBl2CRGJ6CiSbuD6mMU3fodjigrX5pVrKfQnHrhIY3sdpPKUmtmPhelQKQtFxRQ8RLkhJ6vTM8/T6KLFvU+LUrZxnDQpqf2JGTMchzwAkSl9dTlWXVPU0= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:26:18 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:18 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 08/12] spi: imx: remove ERR009165 workaround on i.mx6ul Date: Wed, 14 Jul 2021 02:41:45 +0800 Message-Id: <1626201709-19643-9-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 073d1d5f-1e87-4e89-7e93-08d945e8a69d X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kUEKxUYjJg73ENXslLwhm1+R5pKBXcUciOGuahaEMUt/CDOty/srCwhC4jBmtZgkfzCnCi8VwXoOdm//xoffhHHvZjfrj+RoPN36JqjWpu2NKuAo2UI4ES95I7YRTSBm7dPHhwBlGgw3KZlRO2ditzRpUq7GnZzMNQzvUWlA5jkf8RP1WKp1sBsV+M7r8qgInug/nGBYUN4GtgGECsAS5dIwn6rxvosjBZE3Xi+dzGtB9cR/IRz/amCJu5pk3mjOUNTELhShKEGB3iuXl7xcYzO2FZS1qix+wiflG2hSYz4sPgt+Sp68627gBat/hyKz89GrFF14MJlDUlTaigvrml26PHT2g7iIrx4cZ9WWkZUpsZQ0vzRYgGLjJAcxsyUbTOEoe9PZAOp7CZfrfIFYwuOnBMuCupNPYIIv/waCfQ94J4OZucTLaAAwcPgEhuPVLba4AZA6zQTt3tfa4TL6iPrvnuRjS0JdMcSnCYTFvU8Dm38T5zwWrwW+YNT9LhMIcaVm8cKxxvyOzlrWxyH5Luy/uJsQshruZolcJTwb+GKUoXZElRKF4Ggfakq68kvd/LFIqJ1mENHdgg0LNTXuHxdUfEbKy82w5sLPzPgNPXMabyHlHMvLo6V9TEUyAwa2xBa8eHVAVqdMrHl1wuwenus0cZy3anDJbhEh6+cgp/AabsJOK+QkHgOJtxccC8kpIHqLtCoh/DUwhY7ifHhvzlE8cliMlOZ7eR4S6oCWQ+KX4ic5/byKTPSa6N1Hxqvp4Vh+kLSgo02Mn+zmsygHEnTbnp18TwEnHDbSzc816vEteNUM6DNzXEWgMhvjA0xV49zKaHlMb7F1FYNE9arCodH8Fgl9pxP0fZqNJqTje+Q= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(83380400001)(66476007)(966005)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AOj3l9qaouTEr77MJWlZbxXLnD6qqXrQMD3jDzG89WSCgezn4ym0h1rhYwG64KAzCAj9aYZ6TLPQE3oCN1gmSUoYiK4J/AdAXOmKhTUohFhA+7S3m55NU81GTbYMBZlHlAPCQ8O2LwMZ0YeAsdz9JBRHryJhAwfjN/FGtHaCTUJ0LLm2qsTviKH5KORoC9tXr8xUk+EmXUBTsNrf+kqdavlLyzY+0SoeLfpt+YaKSowH1QatiV5eLuYfQRAlyu7XR4Vda579YKRrtfO90jqIK7QbxMb/io0qdE94D0+klEAeJ64z5CJwe3bcoDAz5VGa9Sb8bYI7dniLCrdRwf718BI5wUjaa0TpYCaCFlnrzIBThDGMLmPcY9Bs2S21zhA9BWHJB+9pePseXNyycvS430lxeK0KSY2hpJFNth1GNiuN0Xhxk6n56IM1fTjfG5R8af2l5F7gslOTyk0naW1GspG0FgzYZm2kRzz48ybqQUMY2Klab78n54vruzuRQMZOW3FuGCnn0CzHXqrsNH4aBGvQMdaqNhNUyNRMzMEC8u+CXELXnXYyBKpKzeJNaRmYARwRN19eYqfJNQyCCseLvm7bjY6xh+CqlluTv1norJsZEjmRiHKKi3L4BMFH4lHVGSTZtN1+f6nPhjkT0iAldwUALnyWj2VUetznNK4ZdTyuvXMnPuuQ25e3xyHKfNQwChx5I7NMILf9C1m47YRa13x6Uw1V/r5JL/u4NEVi1rBsWKr1DDctAbotV9cwtc71ao/Tp/jnaBsO2eERXoCVgtUfXBuAB68233rVWRQNGq6aOW+lGLBuYXp7UmkrOzuvyzVpKBpJoh6pdajf80wfeVqzxTA8sABxTT7HITpqEJByVaZMZFPL6kz8HQnUVoKPKMTc4SjxqA7tK20mCyFjICjj+pzqp6Fd8AEdpteYvTZYebM3L2/J0AyN+1wKM6qhEOx4pW3LMiSlQ7LkVNeqhjDNRFQ4xI9YZW/aXj9AR2W39QdRVq16uxkeVEq5W+J4dD3kCEV17tecnxJ0njb9e1AKOIcUwCYZKpIpugeVrTSUPsQ3vqLALRQNEiQHd4lU2DTeask8NSt7uCma1JgdmZKH5Nk+OymRIlMDXbLRlZpCQfYBS5UT22ZHzabZabLl9SI3c1T9Ai5nmH0c+H2TWIDMOwlU3YfOQSgAG62swErFopgEusH1+Wh6v6f73dqpsCy7oGUOklqEn9aIV5TnDbAGBPNHJBVKtotMPOEDv8iyAc8ERhrvsIdhVwT/PT6feNbU29HEgGiicu0vgvV92c0UHS29lu4X0Rny6JxwWa+1BmihoFRd52KiFxtJPsM9 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 073d1d5f-1e87-4e89-7e93-08d945e8a69d X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:18.2143 (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: YvFy0sHplrNiy8QI3N9MAi5/8lZT+ZNMb30pKFYIpSTQ10IkYs7f3ygZsoEoQCRjiSg7cCKfDDoJUbE5kScSrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org ERR009165 fixed on i.mx6ul/6ull/6sll. All other i.mx6/7 and i.mx8m/8mm still need this errata. Please refer to nxp official errata document from https://www.nxp.com/ . For removing workaround on those chips. Add new i.mx6ul type. Signed-off-by: Robin Gong Acked-by: Mark Brown Reviewed-by: Lucas Stach --- drivers/spi/spi-imx.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 61e4fa0..63a8d7b 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -77,6 +77,11 @@ struct spi_imx_devtype_data { bool has_slavemode; unsigned int fifo_size; bool dynamic_burst; + /* + * ERR009165 fixed or not: + * https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf + */ + bool tx_glitch_fixed; enum spi_imx_devtype devtype; }; @@ -608,8 +613,14 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, ctrl |= mx51_ecspi_clkdiv(spi_imx, spi_imx->spi_bus_clk, &clk); spi_imx->spi_bus_clk = clk; - /* ERR009165: work in XHC mode as PIO */ - ctrl &= ~MX51_ECSPI_CTRL_SMC; + /* + * ERR009165: work in XHC mode instead of SMC as PIO on the chips + * before i.mx6ul. + */ + if (spi_imx->usedma && spi_imx->devtype_data->tx_glitch_fixed) + ctrl |= MX51_ECSPI_CTRL_SMC; + else + ctrl &= ~MX51_ECSPI_CTRL_SMC; writel(ctrl, spi_imx->base + MX51_ECSPI_CTRL); @@ -618,12 +629,16 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, static void mx51_setup_wml(struct spi_imx_data *spi_imx) { + u32 tx_wml = 0; + + if (spi_imx->devtype_data->tx_glitch_fixed) + tx_wml = spi_imx->wml; /* * Configure the DMA register: setup the watermark * and enable DMA request. */ writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) | - MX51_ECSPI_DMA_TX_WML(0) | + MX51_ECSPI_DMA_TX_WML(tx_wml) | MX51_ECSPI_DMA_RXT_WML(spi_imx->wml) | MX51_ECSPI_DMA_TEDEN | MX51_ECSPI_DMA_RXDEN | MX51_ECSPI_DMA_RXTDEN, spi_imx->base + MX51_ECSPI_DMA); @@ -1014,6 +1029,23 @@ static struct spi_imx_devtype_data imx53_ecspi_devtype_data = { .devtype = IMX53_ECSPI, }; +static struct spi_imx_devtype_data imx6ul_ecspi_devtype_data = { + .intctrl = mx51_ecspi_intctrl, + .prepare_message = mx51_ecspi_prepare_message, + .prepare_transfer = mx51_ecspi_prepare_transfer, + .trigger = mx51_ecspi_trigger, + .rx_available = mx51_ecspi_rx_available, + .reset = mx51_ecspi_reset, + .setup_wml = mx51_setup_wml, + .fifo_size = 64, + .has_dmamode = true, + .dynamic_burst = true, + .has_slavemode = true, + .tx_glitch_fixed = true, + .disable = mx51_ecspi_disable, + .devtype = IMX51_ECSPI, +}; + static const struct of_device_id spi_imx_dt_ids[] = { { .compatible = "fsl,imx1-cspi", .data = &imx1_cspi_devtype_data, }, { .compatible = "fsl,imx21-cspi", .data = &imx21_cspi_devtype_data, }, @@ -1022,6 +1054,7 @@ static const struct of_device_id spi_imx_dt_ids[] = { { .compatible = "fsl,imx35-cspi", .data = &imx35_cspi_devtype_data, }, { .compatible = "fsl,imx51-ecspi", .data = &imx51_ecspi_devtype_data, }, { .compatible = "fsl,imx53-ecspi", .data = &imx53_ecspi_devtype_data, }, + { .compatible = "fsl,imx6ul-ecspi", .data = &imx6ul_ecspi_devtype_data, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, spi_imx_dt_ids); From patchwork Tue Jul 13 18:41:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 475023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76CB1C07E96 for ; Tue, 13 Jul 2021 10:26:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5CC4A61167 for ; Tue, 13 Jul 2021 10:26:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235727AbhGMK30 (ORCPT ); Tue, 13 Jul 2021 06:29:26 -0400 Received: from mail-db8eur05on2073.outbound.protection.outlook.com ([40.107.20.73]:3041 "EHLO EUR05-DB8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235760AbhGMK3Y (ORCPT ); Tue, 13 Jul 2021 06:29:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UAFrVqhyEJWRvIRTtjl5D7DS1D6EhgUmYjmAGobLLXrfCyCKJeYJMDqxz0xuN3Chu/Xi+p4+DEfiANBRDG4xbSzGp8+K92BKBbZp95ezv80bZXixLYAMQI3zIzpCnzf7ynhTaRD32jBVSKf48RibIICtG1Bdm4yfUzNHWleNbgNe841Yw5080m5WCbRewEDXKlUt1cp/dEOFECY4bzauTMOwB2ktKfVq8+Y9pvUt2X70bBIXVKTLf72BVMwXXtuY80cJ5YrLZPKFo3w/IEgMz5qvu0yJB9yo2Arfy71ldrF2qecD23C3tc2AG+zNqLnAKEjn9JbZBpL9lzWpXN8nuQ== 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-SenderADCheck; bh=sZvU3VGhVcTeYxe4fB6geATT0prKN/x1vEpROhK8pVc=; b=Rl09HtVaoHD5Ykvw51b7L+xLoPdSzbQUHCBjN+8N6iFUldaNh0SO2bra5F+rQskFjMrP9LRov5ea0ElYMEejsRJapxYxkeajGhtZxMNgQjJOaczaveQglpJJwqrzUUSWHDgfh7pKsSwMyMEc5tvqIQtqQDcTO9b3XF5Pap2Ql6lajsM1Lxk5HiRi/iR0QG6IruJgVvKSYeM9rpdMgypc3USVvsgls6ohs9QbP3oGdTZuEJ42bcyXqQoQqKmigSx+qNGGB0lcCt9Hr1eX7J4+RIUt+hmaJtu1NO0Dwq29NQ9D7QiagYcXrQTTiPX3N+/hxdlQQvaVPIil8KgtJygOPQ== 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=sZvU3VGhVcTeYxe4fB6geATT0prKN/x1vEpROhK8pVc=; b=QGbG4dHQsefA1DtcvAVWTztuhyzihxji6CIt8wsXrw1Phhw++itAFPFqjAZHqlhqGgRJ1k68I7F/FPpTwLUJWtKmr60Jp3N2HPPgCNxdYniPRPrTWG3B6Cm53f58HABbdGiZa4kDNefiuSUiKIa51A+YjjRoM8fWrXAC/g7kfB8= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0402MB3344.eurprd04.prod.outlook.com (2603:10a6:803:10::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23; Tue, 13 Jul 2021 10:26:31 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:31 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 10/12] dma: imx-sdma: add i.mx6ul compatible name Date: Wed, 14 Jul 2021 02:41:47 +0800 Message-Id: <1626201709-19643-11-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0cc3677-d14e-42fd-b2ea-08d945e8ae88 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3344: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:632; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aiUi93zxXB2e0GuoD27lnL/Up2eSrS4K5USoYaPqn0nsi60vktOaF3fNQO7UpKW2jD7DYHTDgRfFZMHr72LeUwBTYHIckJnFnZQd9SaCpWdJ6rZWOLojyRgb7q7Wxs20r7mSt+kDz7fz2ZNSA44ygfUcXSXw2YfOvQRMNETvz0P48Nb+XrMjmVcHNZ+1svgshruTZlhKLn0TEflJRTg7+gCrR7YAt6AoMfMz4kHrI2Ur6TJNvLl6gNgUj7UuraxIQxA1QBgIPYoAbmSqLokXJIYVGXrdBAISo11LMhQrlzLKh+9GySDsPAngJEuGF5/nhYe6eqnDUetxVsHz1gyyQVKJqHNiS1/X604z3fmqXXseDSNcjp4jUQvD/5+TUZMNjZtdVgplvcRiFXisKbCBImz/pTNyu/uzVbhf6WlVpRFuHwZ8SLACU8L2FQlQQf362R1vk7sYp9yyazJVD/I315abyIbBi1DO3jGjzpGVC4k0hzVyd5dftqKByUfvw9XfPMnVxulUSVtre5CTQr5IjyMkbl7wG81Kzz0+MZbWaK4QeGrJWLWe1eDhIgSzSLnwSGDb1yx4tbk5GjoumIgvVQXFaYs2pxNA1ruScsyBkgcTttYo5nTD6l8bFU5kRxBDJ4IococzMICxjSxNGVscjpSBuwfRC+uCcsLdkOFS2S1lT9CwI6qP2u6lUqBQWOp40DJg3DDaYB3rHvy+wPK8cARI8yVLzybswpXbJGRmBZQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(346002)(376002)(39840400004)(4326008)(4744005)(26005)(66476007)(956004)(36756003)(8936002)(6486002)(478600001)(5660300002)(6512007)(86362001)(7416002)(2616005)(6666004)(66946007)(8676002)(66556008)(316002)(38100700002)(38350700002)(6636002)(2906002)(921005)(6506007)(186003)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1ClTsWv/nVMdlyEe39bbdaNc+g50NfBaa0HyskYlKy+QhdP76SEKTaUG6P8sNiYYVaFnoT0cFJSJzoBsth1ETXc+pR1ShWr8soCR+usMAdX0XDVhU2mx1eS9q5v6IooyJ0hNRt8UAN3IB8meEbYPdRvTgAp0LF6CL7pcX63CptJ97SxsAgJBwiGO/TXrx4uRcJi32uP4255GtMSafPwmr8neDqFlyot+AFjEECwNiOvmk2EbMOrKCHveLYKJNcRya0/c0SYcLEkzKfLlnuX3UUVI9tUKdatpB0HnYD+QioFJ162LpYAT6VlPBa7kg9X2Scg3nroR1Yuxeq3SOM6V4oDVhM9VFHIAJi2q3VUFxgFbzXZ1IYJl37ECy+qqlwuGf9O0kqiz2B5sKEB0EdUR3og5RCln89sl3B765jyFsBs0pE+27bibwI3heYcJMZYPzBb2KFX4dSvMmHhbygUvrTNuEEo7JO4ezMfNTnKz2+0B7UNOBGxOrEws+6K0osDuhOXWKJD7JX/ObH9LzHiyLFyBiA+gwecJ+GjpZKkXbv/KBgJl2iaoODlSu4N8i7URAJIhxsFVWZsGEXLB0bOjp5Hq75/rEVghVSRWdCh4jnJKmJ933Bh5u5KKXxEmhtIPNr8s6mbZgcBsrpLnq4hKE9hAuGl79rXeHFOw8I4/ZuhVmpTjtLLFPh4qfzfgDZZHEFXfEsUj7BvBwIXuxevzgqjDTNyLhw98rs+/UWDvwdQ8o5Ci3/WFJLCJBQNahXad1LCUM8JWnSyUEPPFy9vFjGcMo5uViRvEQ8jfb5/J+//UkTkjt3L5tEDjACOFTlMdwPnov0XIn430vu7yToF7M5Kkj4qMun+ESTaaseB3XVmU2P019JGE+is1ERpNJHuFIFnuD1GX81CCGRnfxoJ0C3X3TT5QYr5VF92ux4okK9rQFZb6yGyfsovbPxabGsjKOHFFXbQftHJ8sALmLn3p6icv0JmsQfFIX4Gl+lqC9JyoU4U7uKjiqyT6QW2jNCVxhJ4OZRSvVn4hLWezjIMRBVw+HG/Iia2kXLi+NeEsKKCUJ9BQEJO3drAlWZ/k6V4UZRPztFqRDaJV1+aJPWui/Lq8baGr206y6BG0NNrNKuc1fXYVk4KNq8bdjxtjmkZtZMgyrkwcI0wGE143BnbUCry+Pa6BelpB0szISntDREFqGc6nuhHY+1R3Y88jMYeYciEL0ymS/gyRb3dHuDjl2ycRKFx+Y4CBD53fQagWa8fJDBMQYaHnHNFfYEb6P/YXW+pX8oUg7XKxTTHAaTTGbvDxufWIVhDuEtFJJs8g+cg2eGy66+FEKsjLm8eiHvWw X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0cc3677-d14e-42fd-b2ea-08d945e8ae88 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:31.6457 (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: SlK2v8ZpXpoUcE5Muo5PjzX8iYa99EqUG24pNti1qFRqfQKP7D3kAxNbZLZL6MZD8E1dKjY+AlQbD76oOn9IbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3344 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add i.mx6ul compatible name in binding doc. Signed-off-by: Robin Gong Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt index c9e9740..12c316f 100644 --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt @@ -9,6 +9,7 @@ Required properties: "fsl,imx53-sdma" "fsl,imx6q-sdma" "fsl,imx7d-sdma" + "fsl,imx6ul-sdma" "fsl,imx8mq-sdma" "fsl,imx8mm-sdma" "fsl,imx8mn-sdma" From patchwork Tue Jul 13 18:41:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 475022 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8C43C07E96 for ; Tue, 13 Jul 2021 10:26:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3E3A6120A for ; Tue, 13 Jul 2021 10:26:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235803AbhGMK3h (ORCPT ); Tue, 13 Jul 2021 06:29:37 -0400 Received: from mail-vi1eur05on2081.outbound.protection.outlook.com ([40.107.21.81]:57953 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235535AbhGMK3g (ORCPT ); Tue, 13 Jul 2021 06:29:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lw9JzuuB9vT4M0OTgliRus5AOFxWU6P3hmI2mRox34uIY23yxHxyXRFg2rzdmEtqqwxDPUJv19BZprfxfgYl7p/BhteOqMMohT4iZyNGLqhSeLmiP0j4dLM5vbJ/tPNuOJad5AZi9b+4fl6g6n1OI60z1VD0DcpMlrEOkj0ADwUt0IFEFGjjQaXvWcTKpzKdb9655RLc9nbvtvrLNEcyDjIOaSAkcGJLqs3wTRxcR2S4AUmdyISQQ5vg8tNQHBeiPkivO+nAHDKvuz0SJUkg5MG3b24t+5Np8nkP+F0ay62hjlBP8PuAmSJguyN/BfqDwSGfmmlJ/MqWho3yQaoM8g== 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-SenderADCheck; bh=tW5lZMEUKTmo+F4zrVNicpKnImo9kdoACV6FdhIqYE8=; b=bPSvVzu1u0J1OLwgAamw9BfM/NsfPCeCaIlr1VdYf9t/YqbcalQBJV0DV2WHCt9tzMNko6SyBhpxSvUNnYmifdg3k4x/9WKb3ZHe4akgSLJ2qlQKBw2wxZF+jcRavYyi5xHaGtVQR1IzgRMBLfWKdDYcwrsHBaFpvrGLkzvXaY7YxiL9j829GOFTtvuo1KOaaAMia6As2RnpJ2CE7uQYQJl9tYcuPjEMS0tptg8agpBLqOuHSVM0mmrrme28CWt4GNCt3K9dhhd3CImi2qyyEIJkIjHn0clHznwwHsUlV9ICUlovG1vJR0I5r6Lm0lfQNs5c45mwtC8PsO6ZBa7NSQ== 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=tW5lZMEUKTmo+F4zrVNicpKnImo9kdoACV6FdhIqYE8=; b=RM/5rz7EWZZmjThDXt9vPsoO/nvs3GpCM3hzCYsN3QIihOcAzLnAWf1jTUkTRdBqrF+UWYx2vDT/V6vMT89WTVP3xjLSSmk+ZST1yag7xFqILxgWPbbEOV7aukE13YNlL24tiNHa9wYecmNKBzwZQxCW8vpl0FQjHV2HNCOfscA= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0402MB3344.eurprd04.prod.outlook.com (2603:10a6:803:10::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23; Tue, 13 Jul 2021 10:26:45 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:45 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 12/12] dmaengine: imx-sdma: add terminated list for freed descriptor in worker Date: Wed, 14 Jul 2021 02:41:49 +0800 Message-Id: <1626201709-19643-13-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 15601e84-2593-4bb7-c239-08d945e8b695 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3344: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n/lmkUxoYbV/s+9mcZN9UN6Hzmk8yzE+sYF6ifJzcQO5aNKZSXEqToho+dvEWP0gNLHeOiNe0dMsiishgMVPAdWRX10eM6PX0bWNk8aXhCGmNH+RNaowHGg9SbjzuqXHlqrYfmn9qpmebf2qkcPiPfTbWXbMYS39tMsMRrA6Aj2gJyi+YJgtgkaTsle1XNxWdvy3pgmzEr1Ka7sYjYGWX/JgJ6eq+2A7aoJL6V8E/lcIkQrz8m8Jlh3q5D4SuoivrqPCuvYCDIteHo0wrXSaiTXBmvhjDrpb7hDTyGi65UOtGmxbuu+ifxCUccjVcRIC2VM3B68rGAse7f4ixInssuegImLD9jy4f1COuyOLRcr8MyUuNNchbbaRS+x9AFsGQMOD6Krn06iw1/K7RocGsrlHKnF00/4Yh7S1smw43y+xYor07ECS5vR6iGM780kr3jjfL+5l8GIEOD2nE7dfKiqI2HLtjxZmcZqPR3/zUG6WpNh7K/LqVG7WUDSyvLu7sUIUPSEX+JSA2n9fwLTofIboKgSer3QulM8e5noa0DqepWLS4/mTVa0vPz1RYV+mMdReofdrKe85oTvY0oT/x7O/QHRekYFRfs5MqhuB66hJWmmder/thdhTYxd/qBvNAP0VWSozmrYzQfiecUjQdqgZ8P93h2MsVZj1euqmNsuAOXpdjrFxCk0AEzks9c6HFDBpNeJaJ5bkg8bV72Uy3KHxaVQa+nnA7liBUw0HWJywqpS/BxJZ50oGYHyUGUhjwapeC7xSpABrc6OEfiySqPORU/vIlC2RlRzH3tDoTbwOjmEivr+RtnRteVotUwVX X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(346002)(376002)(39850400004)(4326008)(26005)(66476007)(956004)(36756003)(8936002)(6486002)(478600001)(5660300002)(6512007)(86362001)(83380400001)(7416002)(2616005)(6666004)(966005)(66946007)(8676002)(66556008)(316002)(38100700002)(38350700002)(6636002)(2906002)(921005)(6506007)(186003)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oDX9Kw3I+oQ9ya6O+g2zgsMah7CU9WmeNcsPKsN9IVNS3JAXe5zUaodonXXbMlku0IY2LOVsQaUeE43gLJe2e2KqJ+vCylbAtUkEzRaeSHwoYaK2aDGJTQc6dQ9VArP1P3gnIVxWKATbxpK/Tt5/Nc8LGAxcd7wxbwyLmcOMTDjeK6lVT5+NElRbXgia8LAvX7qYaZ+2740m3Wp6CQlU2/poGnS+sUdQ5JWQRCJpEEoWBnBqLHfqzvn8aFMHWZ7IoNUuCzmeNvmu9VZvngVwFZHf3PkRO5ZyRrHTuRG7vGe0+bb4Hv1L4D/KxTr8WhV8lFZ4NMpZ3pwiIJyCQtpFRna2jgyPPqQLQcVg2CcR2rnZW+Zqut/N1RXItOYq6vprRl4nlMQbnr+rPj55wh4G7Yb0r0ccXtZhqhALHdiOgbn2ZNYjUogNTZQJ3oNjlFO2C7MwxlL9nNm2XFStCE2RqQyKFNlwklD9Ct2ioIgJxbXXLA7x1m//tontxmM+iIvPfXPhAvqHyQ5HB0jfKYSABaln5fWLdzS8t/15AiXuRIMjD221w2mOQaHNYHpLVyac3WGZkUAgL5Bz9NCyFTX7m5mgusRtPEbZP+huYjP8iuzU2JiK1slGYuqVPivHa1MhyQHr1V95AeVYKOPY/ebZ/hDcIKDbdz+hKveYQSAi62keO/tUYKr4R6OrMaBBZ7wt2p3MvPBOeQe6MbTUjpeYfquhE0AiK/JtQc8qYB66Wr/RSyicDsroGwUyRsnPza5gecWnBwgof+qpF//+YUzKB99jALg59VhuJ2miC7+2MySW7L4SsQJCATwE4WDdPClUQ869iGO7Mj/QO/T8nMRfSn5BhihV6vikUDLomvlHpoIT7kzkfoJM/fBG/6xlAj2YSDhZaYB0UQZ7AHhSgxrLkg4osqv5G583ONA4F+V5EyfV0Uk1Bz5e4NIRhgPXO6kBRJlSRNJkV8kYKJC0igQYg8vkApxhgV2/QsJ2EOji5uViOqD7HKS+HLTlpunJbhgnJ3jaeV5d56vReWIf+xtyWdfTvRGMMCMu/auec+cSErqnFz2NdUkh5efOQPNxrnHZ0LTzPoHSD4Red7EWnypQxRoUeXSvCxQxBCT9dl8s/FLHCuJ7YTjCZZMA1beU17/2X7JuPuzDUVKwSan6mOsnWhXuEk26lwmqq+xfHKnvV3Gm1zOTgK5AnTUhr56uwK/sQEYkDBdaUA77spiVzLvnWa2x+lnuaOh0cLt8PslOFt8m+1Z1PBPnwM8W9XfjpdWl3sR8nUCxGS5teWKikJHW/2P31RHjKejQHtskiE47I0KPFv4eAqerp+F+VPnaV7Y+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15601e84-2593-4bb7-c239-08d945e8b695 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:44.9232 (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: CKfROocsmD6Ng9WVnQTop8begq4dmyfZXtZCXuP5szBcVysqKAc1v6y2pVj/o4lKiYPqQYddhVAN81Avufc6EA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3344 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add terminated list for keeping descriptor so that it could be freed in worker without any potential involving next descriptor raised up before this descriptor freed, because vchan_get_all_descriptors get all descriptors including the last terminated descriptor and the next descriptor, hence, the next descriptor maybe freed unexpectly when it's done in worker without this patch. https://www.spinics.net/lists/dmaengine/msg23367.html Signed-off-by: Robin Gong Reported-by: Richard Leitner Reviewed-by: Lucas Stach --- drivers/dma/imx-sdma.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index c449755..6e0490d 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -439,6 +439,7 @@ struct sdma_channel { enum dma_status status; struct imx_dma_data data; struct work_struct terminate_worker; + struct list_head terminated; bool is_ram_script; }; @@ -1107,9 +1108,6 @@ static void sdma_channel_terminate_work(struct work_struct *work) { struct sdma_channel *sdmac = container_of(work, struct sdma_channel, terminate_worker); - unsigned long flags; - LIST_HEAD(head); - /* * According to NXP R&D team a delay of one BD SDMA cost time * (maximum is 1ms) should be added after disable of the channel @@ -1118,10 +1116,7 @@ static void sdma_channel_terminate_work(struct work_struct *work) */ usleep_range(1000, 2000); - spin_lock_irqsave(&sdmac->vc.lock, flags); - vchan_get_all_descriptors(&sdmac->vc, &head); - spin_unlock_irqrestore(&sdmac->vc.lock, flags); - vchan_dma_desc_free_list(&sdmac->vc, &head); + vchan_dma_desc_free_list(&sdmac->vc, &sdmac->terminated); } static int sdma_terminate_all(struct dma_chan *chan) @@ -1135,6 +1130,13 @@ static int sdma_terminate_all(struct dma_chan *chan) if (sdmac->desc) { vchan_terminate_vdesc(&sdmac->desc->vd); + /* + * move out current descriptor into terminated list so that + * it could be free in sdma_channel_terminate_work alone + * later without potential involving next descriptor raised + * up before the last descriptor terminated. + */ + vchan_get_all_descriptors(&sdmac->vc, &sdmac->terminated); sdmac->desc = NULL; schedule_work(&sdmac->terminate_worker); } @@ -2132,6 +2134,7 @@ static int sdma_probe(struct platform_device *pdev) sdmac->channel = i; sdmac->vc.desc_free = sdma_desc_free; + INIT_LIST_HEAD(&sdmac->terminated); INIT_WORK(&sdmac->terminate_worker, sdma_channel_terminate_work); /*