From patchwork Tue Aug 11 15:53:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708731 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03593913 for ; Tue, 11 Aug 2020 07:39:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D950F20838 for ; Tue, 11 Aug 2020 07:39:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="mdQFsGwy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728133AbgHKHj6 (ORCPT ); Tue, 11 Aug 2020 03:39:58 -0400 Received: from mail-eopbgr130053.outbound.protection.outlook.com ([40.107.13.53]:41888 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726397AbgHKHj5 (ORCPT ); Tue, 11 Aug 2020 03:39:57 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ktjXDfHiKq61L9slI9MoU2ovofMGIxoOPRzJL/QXfc87Jk8UjworAsfDVnGtA7+rrokubchGARgmQSMExCzHPQoKr7SUejGH3cvHgYCsEgmx8FyMST2grTQ7JvTvya2meapjnFqwSZQtR3T2jpsoq3BZfYdFPNJ1HO1xOqx0r8Mu8pQ5VwRdVTYFaoue3siWk2QyyHu72/pHIY0DWQQo4dapJmfxJABZ2+P8Ijdpa2MUcWQd1BbWPlbagl58iQPGjHM4HAon9UDfsWeM7AJck0bNl6JnGkHGqXHdHf8QUzRrjBNpDyu57sFFwhRPyfKVcHd4+1qRpQBi/IFfFkaiMQ== 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=0izcWiIsFhbVumJfO4SdrrpucrmDe3nP9In+ncyqnZw=; b=Rx/mhYkevhtKrNzpvVAK469V1a0YOHnWWeuhNOMmIBfmAc273mFxBaZGiH29R8m+cGfGeNtopNV8yvfjCoZodC4tI9MS+oLrSV9IMnWUY3KEWtPCG5uBwSxY4NWStvbjSJKlTlw+QbV5V6L5mmCfr43PmIn8RGCqamtDyYIx08mO4rPqicRc//7YPY12WX778FKGf0/XBxG15DqpuNoGU0N0YPfkEREnLPYFLWEKKgjJkxIJ4Knl15JKKHVVC0wAgZGinusMJSPc3Q4tvO96WiWL356ovCRynRKAkFiHjrhsTG1eq7rlbqvD3uRYN1N6UVMyBSkCUfjSXDsdGsEdBw== 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=0izcWiIsFhbVumJfO4SdrrpucrmDe3nP9In+ncyqnZw=; b=mdQFsGwy1wYCqFdEdcS7dE1y2uSLA9neqkOugvjs8FePy+YkAwer+j+BV9uuuoevg1uPxioRebmcB1fbq9lG43RJ8mcQ7M9tTh2jV9pTEtOAYUTi/upHQrr3oEtQ3olcaviYJLKxY1Y/leUB/PzSPll2B5+6d4NGBX/R/1+pGbo= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:39:51 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:39:51 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 01/12] Revert "ARM: dts: imx6q: Use correct SDMA script for SPI5 core" Date: Tue, 11 Aug 2020 23:53:40 +0800 Message-Id: <1597161231-32303-2-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:39:45 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f653e61c-1519-4fe2-2210-08d83dc9bafb X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr 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: fCEny4/mic2ItOoag4CkeXKhrnDLBEYvKqa0wDhdv+347+5whNkwIqPAVlYzCJsbYuCI/h+zD35eNZAMMwcrfT9+/j0WBvKktUc77Mt1wI+SgLnCgHRnJNidd5PUNm35huuc4ySSRAV4vCc0pp3CALDw7YbhffAUB5i2Hre+eXlEGyiYWdP9qTtQD5x2a2TxH34GTsnftsaj/Rrlkma8V2kF35PnhQU5LuKtNbo60Dcm+GxqrPzc5NQufVC0j5QcyFq9jZ26FnPFgIYXOPMg6fc9IVfQsMql4C5d+H/P5h2t4hYaNYTImNRmoBE+2UOHP+0eiX/9Qyw/733neO2unMLcvZNANXqDau4QgIk9rZNlsTwvXPpp7Lfbmvw90s7GN1R3hjwg30NKOTtNktW9t8YfxXgjK7BaT/F/HybdrT87PkSRWTHp6EP7W2yh9hkzakZxOcpZrGyfu5YM/Mg9kq5UEo272/2aBlgAsEUYV+g= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(83380400001)(16526019)(921003)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: j48tDAU/VVbvc5l6vioumq4swUdi00kvQt7uZe/QbwcJ1dBwQXMIIEy3bZdgJOXXpBvW4rF2ZtKDcuHCTC8qdrzEv99cmB2FKyyNEiHOPZIpHZvgsh59XxqEDakdouc+wH3rCv/q92ooudgB0EGbzOJsHgS3WNBkDP5X6lXvV2rebzgP9nvdz6OtrLER68A4wduEeSgnDrJmt+Vk8HTL1bdTP8sMjQsBs+cvJVYIPlEiup+LQEH/eEmiYUZYTmV//S5ne/WXXu3JUptxmIePLxcgI71VQwb0l+9cBcVdn4ZAQrS+YJw2AqK20O2LyX+BUwsXSe6pfmDS8Up/W2ch5rSQWavI2prOq1CBtFvCzN9G42URTlkzeY7s9JlFXUlu5m4/36xSTwq1gB7oTycoR8YWEbmtqgVvt4gS/gGkpGO/+XLS0FoNud9JhNJBSQ7u7m8Uv6Q7/X0Dj/dUnAAVnMAfG2WPQMguLNv3gSm8sJ+hWIbZV7Gy0YZsodUxGhJzh8dMPy0+WfkhcenVqDahoXuWbYwdUiDhW8whIPQjPMbAUEYvLZybGlbubDJ48JuGhbx+3ZPbT9VH5yQbQEvTTrWJbAigDPrwSL1Avh8bimNeUEC6uocpib+MX0vvonkzAMrI2MFbsS8QojlH/n6f8w== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f653e61c-1519-4fe2-2210-08d83dc9bafb X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:39:51.1094 (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: s+jv6SH5PJHTBj+ktOpYGxkhqChzj3SG/0kcYbLNt8HdcdXY42F62BXlEjZ7CZ5mQG05P1hSZDQzNq/mTrvz3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 'df07101e1c4a' firstly. Signed-off-by: Robin Gong Acked-by: Sascha Hauer --- arch/arm/boot/dts/imx6q.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 78a4d64..afdd9eb 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -177,7 +177,7 @@ clocks = <&clks IMX6Q_CLK_ECSPI5>, <&clks IMX6Q_CLK_ECSPI5>; clock-names = "ipg", "per"; - dmas = <&sdma 11 8 1>, <&sdma 12 8 2>; + dmas = <&sdma 11 7 1>, <&sdma 12 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; From patchwork Tue Aug 11 15:53:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708735 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0191F618 for ; Tue, 11 Aug 2020 07:40:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D794C20781 for ; Tue, 11 Aug 2020 07:40:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="dB4OeSBP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728101AbgHKHkE (ORCPT ); Tue, 11 Aug 2020 03:40:04 -0400 Received: from mail-eopbgr130074.outbound.protection.outlook.com ([40.107.13.74]:49159 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726397AbgHKHkD (ORCPT ); Tue, 11 Aug 2020 03:40:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VUQJgkSkCinawk6+D6g1BEiavKbfjaYuoWxBUX4cn1WEo6ka+lEnaTxXnNZbVXpQT5W2DDKCP9d8TJyBpakDyMhER8m8PzHyo96u8m3e88WEQQhmZ8evEMs6Cfh+UnL0aJz5vpd9le/LmZLhzjPya7U9OrERmUqg7VU3CURvE4q/JD2XcA3v/zX4aZM7dd73qp1AxSjKSCcBj/Bf5NgH8hdw/Xw1NWl0ySIec8L6t7ErHkZWo1VXDCqyZwRJymf6XYhdCz3LVp2L+n1v+/JRQg6LAQJvNS4Of198vv88Cjb3Wz8w+HXUv+yaoY9D/W5zTqymWBDZE0tXdEcMQdu9Fg== 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=VfdptsqF/BWMVGMcs2QnzmQDQwBwZuTq/BYSygQZL8U=; b=h0viw+xVGxmQp6ORIadM5p0rDf4SS+Y1J1bSEd5K4wCxqKWJ9obxkYw5lfpXOn6jeQJ42T4c/UfAl3DH0gfNytKgsG0HIkOhbT/JWso5iFV2Ko0LT134XjosqRRKB7/1TiF2nkNougT9b/eClZRIxNTd/CjkQzZxWRkUqOk6Y3w8rZ2bKjhUjrnN8fKC/YRxlqOKmGA7T5HNIry1WGvPk1NMChQSgAmEwZXESjd6v8s5F3Qne4ETG4ma9XiBV8P5wLFlI4BQ6FBd8Q8+1P7pw8xzltx5FTY7gL7p0on1LOvo3hrsUOagZxQuXqZL8KTF+wSBBy8NGIbyGd+o/209Yg== 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=VfdptsqF/BWMVGMcs2QnzmQDQwBwZuTq/BYSygQZL8U=; b=dB4OeSBPpIRCnUmKilQFdu7K8irSBo5p35VvkEaYo05UqPtLh/w+e4Wj1fPWcIDJ8OMe4/pP+NHzx7EhNvz9Ou90SjXiJ3GDhMUfc9C0PSx21A6nuSJ3+prWuSxjuox9oc5z+Klu+i6jl2Wqhz5PRnBi7W15LxYWDKiN3YP1MdA= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:39:57 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:39:57 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 02/12] Revert "ARM: dts: imx6: Use correct SDMA script for SPI cores" Date: Tue, 11 Aug 2020 23:53:41 +0800 Message-Id: <1597161231-32303-3-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:39:51 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0c849331-6e68-4f94-3308-08d83dc9bebc X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr 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: Zq8BF4piUfrjHy4F6/JL0iYVvlgIKTPrWW/LcMGRkaqznMGhxQyGPZI/WoFjdA+5LLPhDrxYFqwxthT9s1i0OvCl8J9o6/nTGFeEyXm+QMt2v0FIwDfbDxZ7ukOmu4dcRb5fUtW5VbgfhnL0rNT3ZnKO5SggAcYx9+ZZDrl28Mi2U98E5galOF0fpDUgSK0+HA6iC4gHE8amoJRd1D0tJkeW/XUKVPTkeHRC23+S3F8CHLZi3AmJGB6xc7qLkKTkQ0wZZ0rVgoYNUfkTsA9JcUoIZCWCpB53V2GCkzlZAyYP4Nq4c6Y/mjel1ny8SIeeGOti8n1H7pTBxAKmcfeBWSsULdHSH84unxOzt0WgtwOcxKimHZdqWFzeaaEP3gdgr1ItxuBpOBcyJsk9fiUO7LPpTh8lzR+QqSJVTAHPhcj6ozXY4Hx5Gapy0i57w95gWPu3hDu13N8va0yz2iETEw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(83380400001)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: vi1DXK1h/6fimEf4DlolF+SDoNIyV127GaJ0Gsa6/zDQ2j3FKYnsMQBSn5fANYPj19ztmPNDITsirvYr7LFUFJxd7cgUCuFsPHuvbtbfvzXOeLOukimdOXSRa7+woLOtUqvuKmu88xooTlPtUxhwSHw4fP3XL2zqqD4gJIKBUAjtxjyv+Eg5fDfvdy1mdCKvNYlFBAIlhQ8MEH7s/YW/Ynjt1YvIMhb+qW6XCE364W/LUo+dv8txKu0aT4qmrcIYctlzVuA3oLg6Smaj4G9BTlwUK7pZp2Puaz81Ez1Eo2HyB6jQ0WsBUy7BGqAuXflQ7wzxHeKPu+FTP3lZh8Hrud6H3NfFH3Gs7IeOPf0CzeD4SigM3LCGGxuh4mSAB1TsLtM/DiovCPdnXsvDD+X/DJB8jbDMC+gwszGkymZqCEcfnQQ4tvccL8ZNSRNYQSMQWdIGaDlOHaF5v4Z50T79lH3UL3QTMgsX4p2lx4VhHGBBZH5TAjJb+J/bmV7bphzwNA9sw+kjDxjVPzUnexq93Py55/PgVYKlkjVDdhG//0fbwIpy0ANNLaxC1YBpEigrQ33hQ8gHMG7GgpU6+4E0B8CsY7FkBxuupvGf7Gzkhx3mnEHbTtx110kaNQh768efAhlj+Qk9/nqNHn+e0xnuAg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c849331-6e68-4f94-3308-08d83dc9bebc X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:39:57.2439 (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: m2FpfwAz9gA44Z2MyKVL/qR1gasvGOGu9xzKOicjb9/t9Td1LlokjLDI9PCpX9Lpi0H/w6g4yuFjHEudLBzf9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 346a52f..a8dedeb 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -327,7 +327,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"; }; @@ -341,7 +341,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"; }; @@ -355,7 +355,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"; }; @@ -369,7 +369,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 Aug 11 15:53:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708739 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B21EB913 for ; Tue, 11 Aug 2020 07:40:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85ADC206B2 for ; Tue, 11 Aug 2020 07:40:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="U0fGc4PF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728254AbgHKHkL (ORCPT ); Tue, 11 Aug 2020 03:40:11 -0400 Received: from mail-eopbgr130041.outbound.protection.outlook.com ([40.107.13.41]:10209 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726397AbgHKHkK (ORCPT ); Tue, 11 Aug 2020 03:40:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E7Jun8DpPYZ8cmoAAAu6NoRZIDQ24jX5l/EE4RP2iAUs2tWxNR3MSm8zWd+f/V8yD/zu5aT1Dgj9QAYM2NhyJ6eW1wl94hC0hoc55n3oDFWFLS5FUtyONUeRl8a1B/W+CwlEiX40SGj+6g1kxkxDKZB2GnbbFzeFgn5E0Ls2p4jjEU1D8IjQb3zXBFSQuzWZagADWagidgSD+hPINOnfAWd368Hi1ubUBLKXj3xRCssw0g/F0A8LpVGaNiZ16OBeuXl+yqwINOVVoLRu0L9HD8+ODRlSkliRjgnZnhxPicmJSH/tzHLUYCMMrDp9bX8Vo5YNqigPHdFRm3jSQd1nGw== 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=e/QmptLzISEg8XISPPONCPgPblgFAEAKYoqgWtaOmaQ=; b=Y3aWCyLR0I8pGKDBsRTp8CVkA+/MKMSEP8CtS1Y+8vISaeLjHPzZ0gOis5o6bN3ke9I8D6b7m0JNFeOzfXxy+Z9Rlyy6pAw4/hceQHaAk7OwC47XuFL/9XCLHAC/N3E2PLD1WlW3+ADubX9F60wJOdBc0Le/xssSUz+A3Z1Hdzd44Jv1av/d6AtAD+Nil0Aacyy5TLPpwB2n5R+TUIAeBRuvagYzf5loS0u4z2mvnOrm5AEBrRcqSlhZjN8KaRzLjPpc+jvfOYo1wJBEuExVW0JQSK3ZS4m7aERXgvNgm1mmVIceeIMOWOnT1sNeGLQRygjdwanztDhy1IAhZoMCwA== 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=e/QmptLzISEg8XISPPONCPgPblgFAEAKYoqgWtaOmaQ=; b=U0fGc4PFuQ1NoYIPTW3vhHLOo3rWOZWqwiCT8mmFOwl+/iAA6edHuiHjMpGXBd3MCsTJU9epFGtwo0xpL6QqRnuEGtWuJ+gxS6WwVvn2d50gZjy+VL4H7x3JE2miwuRohEqzfyOgxGZzGxaP57gRRqwopJPZufEJi/MY8soL+bo= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:04 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:04 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 03/12] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Tue, 11 Aug 2020 23:53:42 +0800 Message-Id: <1597161231-32303-4-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:39:57 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7d11a531-25a5-4cdb-8729-08d83dc9c25f X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:119; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BkSrftn3pruWRwo6pw8022GkqbaQRhsuKPVZioE5/XKUqEJzJNEOvsKClatY4m+NRddyXvBohV4xG5CXQDmEled2sVABh6yWGIeNTr+HEdPhV/kcBHtvdyG5Kkd4739hxOSfBL4p6gk8mbnJcJccW+Tt/ga8IbVJ/SRJcK70aRHkL8G5c3Z27XmjFbqd7r6BJyI6w5FX+ANTYAWNL3nD4X5u4ToLm+XPqU14HH6zeHkJz03HusYwc2tPD8WmAG1IMsOTXYrRJE/LyXqqf7E+gWXLLTMHdaMsHvsFxnbNiUwmLSeMaKS1fv7WLRsXazyC+XgKVqq6Dbmo91zwGKpYY5pS78giuPalsqhd+nNiYWmrdInb2K9irBfk+zVukTDF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(83380400001)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: C+VAUbduZMlV96bkZ7xPgHvHDfRc9zqgNiMptTVQOxl+4mUkkhkgnc7OZPUVhUCgWYcjlxPLfJ0+y7bLyzYmiW+ayE8PE0E+bKdfc+9UbmXlUg4AD4R1OavAIMp3Vc0QCcs25YjkwkAhPT4b5oL6uvn+oApFj1GAk80mm1Ell65e315/IUPDV2Ty/7tig8QGoav5NMKMfD3gjqY6h1KWIBsOIASCS8SddOw2ZIifagxq6P+bOkJnMPUwNOh1g50s7QxuigRJ5300Sy/cSL/NY7bxgY7K3Gyc2pR+y72IYDBYRHZY4kDecuCa+axxoXVgSjLvu8Nq7epnVA5goNh4rtEClRLbh97d3uVAgQxVGm+Ap/3a/jHl47zl3uSjrFGbB34ENIxWqs/v+dAwtYpN3lOmxyI1Y6mLliHHRTpOYuPUrGSSgkzO9/hZQJX80fkEReVuuOJorQe1pgoWauzOKhryktZqYNNid7PjU4Y1CPnf01QQIDXLV9rIuMebrmVemrLy0yxoeI+K/QZ1Zgo+mfajpfFSz6fQlz5eEW6ud5les3lDYRjtgzrpNANmO7Mx//LyT14Lbe45URygzBOvEAHiMCfSNn/I5D7LdCZvsu/24YwBzoILmg5cm/JUXBeY5ob6m+qzuyGpE3FsjYK7hA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7d11a531-25a5-4cdb-8729-08d83dc9c25f X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:03.6763 (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: WwJrd2ft0rbljO14RIIvNre6qUfNJ6izKDr8XuuLg2gS4g7CZw3j6mU5sdjRD2YQw+OVYBofdVRIDJooZR9CSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org This reverts commit ad0d92d7ba6aecbe2705907c38ff8d8be4da1e9c, because in spi-imx case, burst length may be changed dynamically. Signed-off-by: Robin Gong Acked-by: Sascha Hauer Tested-by: Richard Leitner --- drivers/dma/imx-sdma.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 270992c..d305b80 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -377,7 +377,6 @@ struct sdma_channel { unsigned long watermark_level; u32 shp_addr, per_addr; enum dma_status status; - bool context_loaded; struct imx_dma_data data; struct work_struct terminate_worker; }; @@ -984,9 +983,6 @@ static int sdma_load_context(struct sdma_channel *sdmac) int ret; unsigned long flags; - if (sdmac->context_loaded) - return 0; - if (sdmac->direction == DMA_DEV_TO_MEM) load_address = sdmac->pc_from_device; else if (sdmac->direction == DMA_DEV_TO_DEV) @@ -1029,8 +1025,6 @@ static int sdma_load_context(struct sdma_channel *sdmac) spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - sdmac->context_loaded = true; - return ret; } @@ -1069,7 +1063,6 @@ static void sdma_channel_terminate_work(struct work_struct *work) vchan_get_all_descriptors(&sdmac->vc, &head); spin_unlock_irqrestore(&sdmac->vc.lock, flags); vchan_dma_desc_free_list(&sdmac->vc, &head); - sdmac->context_loaded = false; } static int sdma_terminate_all(struct dma_chan *chan) @@ -1337,7 +1330,6 @@ static void sdma_free_chan_resources(struct dma_chan *chan) sdmac->event_id0 = 0; sdmac->event_id1 = 0; - sdmac->context_loaded = false; sdma_set_channel_priority(sdmac, 0); From patchwork Tue Aug 11 15:53:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708749 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7682A913 for ; Tue, 11 Aug 2020 07:40:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50DA220855 for ; Tue, 11 Aug 2020 07:40:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="gx8nj12T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728287AbgHKHkS (ORCPT ); Tue, 11 Aug 2020 03:40:18 -0400 Received: from mail-eopbgr130078.outbound.protection.outlook.com ([40.107.13.78]:64065 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726397AbgHKHkR (ORCPT ); Tue, 11 Aug 2020 03:40:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PgAGv+BR86JLSG4w4Dha8F5omVMDZ2xyYXAafD6LelkXvTwIVzpIIkCCUAMgQ6LP9Zo4PGOPiPEcGSH6I0/D4/HqC4C7OUMnvY8nYxrAgB6rUCtss8pKf54IC8FSowj7iMIQhumrxeh3RLAUMs5cfQO4UOZeTm8UXAxa5aaU/uM/pDQ/Q39o2sRSj7Ua57bLaUxJMaXK5c4xm/4TKzgj1CqMVdgSNNKTIzWKE1IPVWUB+iHnb4IfDvaQEiH/Z50QEVdySVVPNiRVWe3UtimM54mN+vU6Tp1eQvToPJflgASngBNy0x/it4bOfBhfnjEo5N52L0mXSAlso0TEhR9Bng== 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=IN1fRToEmGvcd3mguKJujHggzOr4K2gVkDIrU6mwPNY=; b=glNNGssq8AOkYxRYmMj1s+uQ7hL/dVgRjv0ssMI1sLoYzmlYmvElhldQxFgohl2O6gu83wvNGNCbDxDxmnllNIf+q6FwG9nsxotkxeaoFAXKEURZvXDT+mhkuHt2PzQfjKE1xzREeVYM3vJ06HfEP5dmB4nmuhTR1xOQMsZISJj3JjDy3wGSthcEK27AefA5CMiTZiootOSDH1k1uCNAOlS32Z3MZONSBbDyy54DVfWTrnWZEYz08WPhdZiObVHdqWfBOvZehxvEIaaVdCMo/KeIrBEmI97deGkwMZ1Q5XTzX3EQZfvVAzeZB6IoheSXhI1prr68XPq2V4v/QlikKg== 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=IN1fRToEmGvcd3mguKJujHggzOr4K2gVkDIrU6mwPNY=; b=gx8nj12TUk72xuqJVzKEPBDsfHECZjBmKVh1ntjHGDJNtlyysBOhgVbT/RoXSD0tcPfIfHuMXU6bkJhB0EVx3vioIyKNEYejh15/xAWAIKgXKesjfJrU9T7ZCgRGyEluxFOMQuB7MqdAHREmalO7JWbxMCG4WWfz0A0vTtdgrlE= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:11 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:11 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 04/12] dmaengine: imx-sdma: remove duplicated sdma_load_context Date: Tue, 11 Aug 2020 23:53:43 +0800 Message-Id: <1597161231-32303-5-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:04 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1d04907a-23c8-4539-3a9a-08d83dc9c6c4 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Id2RyEoHTTDmzhQANEz+Iy/JI4pvtPjBn9RDI8KFw3R0pGnSk9dIPen4yRwkknn9GdqaTomWSZPmajtjsw+4q282p9BjrNnhxCOtzVUoQ9oVo2pYfU4giyBBcXzvMoB/yv39Kolx5OtZhF4h0kqIfPm3X9Iwfy/lyVrIIwR7v6RKM5n/jWeXuZ2xL1Alzd5hBtSKkNsLe7liur4oS4GN3RD9fCNt7hUTRrQIZWKu3bwhRZ7T/YS9U6CyCG9ZXG1Zmjnz+kzlewTjLyEop0mvyu99H+ZJBU3FUTqKtLerqHo3nA20nVc08e0hmsPXsyhh/RR4Kh2qfAwR0R4y/0DlCBVjPOpgD2bb/b9Lv8dPsO6FaFcumVMfvOTIdDjeF5Ad X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(83380400001)(4744005)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Bq1j8zHdILiNv03h+mTYEkmbHK7T9YH5y8A95eFFx3lBD5K2WB2exXJYhQxCmEZcVrRZLhJTJ6ABwfMW2hzYQZ5Fa8bKnGE4NzYYyGSUIo0dD1I1VDU9I8BS9dtoIUAKgsBV07z0dvof2mLd+DKW35yuJYrUWl1T1nTfIIfuna4qIxjNQ8tliMAH71tzHJOUHnGnKM6xqNX7eeo9KfUzx6anaNv7VN+Pu5ALVWXuQXq+f+XKxdcFOkvGFLxhEXREr3vURJsLvJ0/XGGyt7e+W7vBfMi5JpFV56ZS3kXF/6Pk/VdGDlKty5SQUfMje0rJ4fPGiyTbMeS73onwc7+YQHhPFJBQTqyf2ICkl1EYzYOz45gXi8ZmyVQ2wTBkEHvxbFCs0SYKaVBE2dOBbpQZAbNE1bu0bxUbrt724uyAuV5x8FgyC0OD0J4JbMAMsjb/8NuwTG4HubmUNXIAbDN0Bah0GAK5TMhOUHKo4Eva+aAx4edw5FPYic+JFaTQOH8mPgI4yie6Xmf2FyXRU9FgpwmZgy+i0xjGU7kaQa0PVZVMlEnDePzYdaTGk+16m9J+HHRP2612tYJjfJlmldCi7xoX5erN2Ctiur9BvTXAGr9qRQTJsQ3i2CEmB6wj2tPSTD4mbZMYZgjaY7/uIz+xNQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d04907a-23c8-4539-3a9a-08d83dc9c6c4 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:11.2390 (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: TSrxAgY2uThdyUnio+zbtcHGpL5TmvAl6YQ3oOGtBnBP0VJSZpozeR51so3q7Y3s1wSqIc3X3VNjslt6BgA4Qw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Since sdma_transfer_init() will do sdma_load_context before any sdma transfer, no need once more in sdma_config_channel(). 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 d305b80..5411e01e 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1137,7 +1137,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); @@ -1177,9 +1176,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 Aug 11 15:53:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708757 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EFC3C913 for ; Tue, 11 Aug 2020 07:40:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D201B2054F for ; Tue, 11 Aug 2020 07:40:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="QZg+Pdp8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728315AbgHKHkY (ORCPT ); Tue, 11 Aug 2020 03:40:24 -0400 Received: from mail-eopbgr00042.outbound.protection.outlook.com ([40.107.0.42]:37583 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728275AbgHKHkY (ORCPT ); Tue, 11 Aug 2020 03:40:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xbrqi/b1T+Do0OC5tvrLdX7ha2UNOKC74V6jC215ay+z0JMGNuNEJulxjuuDO1aXtPNGdF9pyzucvDHZuVEd8X1Qgt3k4fpJE3bcSEji4CrK2mfWZzRhrM7LFtdviFlKMQNVVH7yBAY4XeY73/hHe5wsv3AwmoaL4JSVaW9XIJV+P0Q4T2/oiAByZs3eqfD1Xx0bMyJArBgLc7EACLCZrpRizcOYx6W8osXe75VmHQuL9HPCeaeshBBlemgd2ScU/xH7FCD7tkiUgwmwXk9vJ0Ds3+C6kJvRdhIuqtGL6oA/GqvZu9hz0U86nczZnsDpHueW9N6R/gG+HG+FuQ8R1A== 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=zYO4eeCkCaKtyLBE/p41QWBbs0n+/LC0JXhKC1GhFac=; b=lC/ok5XlP229BX6SObOHwxA5qZzRVijmUIA+0nZ907BYIAEs9cLaiMOW4PGeUVoMe3Yya8f4LtvXvdbUSSjVMtMl2kim0gSy4K7j6Rc4UL8WdH2/Yr6/PS8fStxCDUrL2ubE3rPjVV0O60XtcJqgG/Ea0FHDGmAPk0xEGAdDlQCIkOLyw2wUaukQ8nJsN7+7YHgq19PpfmbKQtUwwph63s7SEKX9599LkD6rxxG4NVFMJOnhLDC7qBKb3y3ZctwvxnaRHZUaHckpalXA1qhLiQn3H6hKLdDk96yA+RW+J1kH3YSWshXaRlTwgNMsZdIERbUh6Rx0HJ2s87L6g44ncQ== 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=zYO4eeCkCaKtyLBE/p41QWBbs0n+/LC0JXhKC1GhFac=; b=QZg+Pdp8xM61fpJJ+U7IpGUJqRmP8xDt5+vOgpmVBdtMRR+xQU3b0wp4taFcLFEBZCULb7OEwTwShdTt2qkMW5KRifAMfrfr97/0ZG/GCi6ydXLY2MvMRVrQ9t+qC/gfW9K6S9EQC37ZyWupTq51XDeuWPg5/trGoJIlKHhF7QQ= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:18 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:18 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 05/12] dmaengine: dma: imx-sdma: add fw_loaded and is_ram_script Date: Tue, 11 Aug 2020 23:53:44 +0800 Message-Id: <1597161231-32303-6-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:11 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 65d42803-d3e1-4039-3436-08d83dc9cade X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2AMXFGkgM6Hrrynfilg+XSbAA8QClWNdD/QPxPM4J5NWFx0humpwE8vNvrQn4+7sxsEfFzemVIO43k8IhFXJ2/4kpxRJCWi73XMVYTXvOmLvW4sKNR42ATUADn2Ul66j5L8o00IMDaWaFCns9Gg15xga2kxa4/4fkXDxTE8tirFkjOMclRG1kTW4WHogFEl9RuWyeCHvMgIGZT/RhvXUs76Net7qr0iWIGgjO76JGGEtXG9zI33AD2ercCfRWDZznuU5LwMVDygkpUG0YD62kH11GfEFZgF4dqQh5ZLL/CLVV2hlfknLX+H+WkeoQ5jCA7i+TJlkx/0Tg8TWYxD477iuIdbVNFWcdlljtlrrvlZN6ke/bGzN1E/HsielkAU2 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(83380400001)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: mP+9ROooT7Br+dn6AEhLs3eKoPVnj9dxgU9AoWuxjGWzi+cOnUiu2YEOeM+aRXe9zLkCDhFGedpXQwrXTpcADycNOAFzivVnAuFGV1WUMKDzdRk53KpWiK/RZ6o6+t5wRYJH5Fhv1sBmyYDjGPLFlun9tvenCqXi9aCJz0gUioP8aI4hC3TmrkAiKcM8Ma5p2SvFBRwn9CpIsf/iKTPK1Ajl6eCImD9kxWF8AgZCX2+0pH4kVxWHO7vhxmgkIguHH0D24w9+UbUsMgR7Fcbp+3urbGSmS30xr6t2gUWCANGVv/3STnl3BeMiLXF4Z5HpTgNkjfMdM+5zu1ooXKoAf9kElap5IB/SLEcF60A4HkrFBfMEQM0oJbvSAsnHy4ZzI6j8IEJk8UTOUwmM9jJk7WV+ehE2SmWWw/fwAg7umQ1nUr78vK307tn5YM1QA9xVrY83sBd2ppOyu8w81mmMDOBYCsZrjkJEEKP/GfBHZo2d8xq9GmiEhSMx1Vps0zH76mScmKD1/a3OSLU0EXLwj4jYiuKshARHEtgaAnG9FkCLrWLTPwN738onCXmewbbNKN/4ZaGQidLY3dc4m25YavYeRGovNtYpM+j4Oqa0vwNNYAv2+H0PKddWicrknaWbUtsBzMBNb5KAAkeuoQAqbg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65d42803-d3e1-4039-3436-08d83dc9cade X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:17.9283 (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: MkEJgc++KmHgJ7sG7uNtAkqVOksw2PxSnbZtawPGtmQ77EnWmdVY8RKNSoMZUaBF3vP/UOCDeUWMFpg5+Dnl4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Add 'fw_loaded' and 'is_ram_script' to check if the script used by channel is ram script and it's loaded or not, so that could prevent meaningless following malloc dma descriptor and bd allocate in sdma_transfer_init(), otherwise memory may be consumed out potentially without free in case that spi fallback into pio while dma transfer failed by sdma firmware not ready(next ERR009165 patch depends on sdma RAM scripts/firmware). Signed-off-by: Robin Gong Acked-By: Vinod Koul --- drivers/dma/imx-sdma.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 5411e01e..cf02c3e 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -379,6 +379,7 @@ struct sdma_channel { enum dma_status status; struct imx_dma_data data; struct work_struct terminate_worker; + bool is_ram_script; }; #define IMX_DMA_SG_LOOP BIT(0) @@ -443,6 +444,7 @@ struct sdma_engine { struct sdma_buffer_descriptor *bd0; /* clock ratio for AHB:SDMA core. 1:1 is 1, 2:1 is 0*/ bool clk_ratio; + bool fw_loaded; }; static int sdma_config_write(struct dma_chan *chan, @@ -929,6 +931,7 @@ static void sdma_get_pc(struct sdma_channel *sdmac, case IMX_DMATYPE_SSI_DUAL: per_2_emi = sdma->script_addrs->ssish_2_mcu_addr; emi_2_per = sdma->script_addrs->mcu_2_ssish_addr; + sdmac->is_ram_script = true; break; case IMX_DMATYPE_SSI_SP: case IMX_DMATYPE_MMC: @@ -943,6 +946,7 @@ static void sdma_get_pc(struct sdma_channel *sdmac, per_2_emi = sdma->script_addrs->asrc_2_mcu_addr; emi_2_per = sdma->script_addrs->asrc_2_mcu_addr; per_2_per = sdma->script_addrs->per_2_per_addr; + sdmac->is_ram_script = true; break; case IMX_DMATYPE_ASRC_SP: per_2_emi = sdma->script_addrs->shp_2_mcu_addr; @@ -1339,6 +1343,11 @@ static struct sdma_desc *sdma_transfer_init(struct sdma_channel *sdmac, { struct sdma_desc *desc; + if (!sdmac->sdma->fw_loaded && sdmac->is_ram_script) { + dev_warn_once(sdmac->sdma->dev, "sdma firmware not ready!\n"); + goto err_out; + } + desc = kzalloc((sizeof(*desc)), GFP_NOWAIT); if (!desc) goto err_out; @@ -1589,6 +1598,8 @@ static int sdma_config_write(struct dma_chan *chan, { struct sdma_channel *sdmac = to_sdma_chan(chan); + sdmac->is_ram_script = false; + if (direction == DMA_DEV_TO_MEM) { sdmac->per_address = dmaengine_cfg->src_addr; sdmac->watermark_level = dmaengine_cfg->src_maxburst * @@ -1768,6 +1779,8 @@ static void sdma_load_firmware(const struct firmware *fw, void *context) sdma_add_scripts(sdma, addr); + sdma->fw_loaded = true; + dev_info(sdma->dev, "loaded firmware %d.%d\n", header->version_major, header->version_minor); From patchwork Tue Aug 11 15:53:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708761 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B98E618 for ; Tue, 11 Aug 2020 07:40:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1E3920829 for ; Tue, 11 Aug 2020 07:40:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="l3pUHYpg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728346AbgHKHk3 (ORCPT ); Tue, 11 Aug 2020 03:40:29 -0400 Received: from mail-eopbgr00040.outbound.protection.outlook.com ([40.107.0.40]:13806 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728275AbgHKHk3 (ORCPT ); Tue, 11 Aug 2020 03:40:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XWkrl6L++20m5xgYrYSvBPJhKk8RdJuXh4atMyySsxTfHGtE7kEBihMXsW1yWdqAS4fqgnr1hzHuxunDkD1xageWqkgiSPLYiOs2x2y3Lpi3ZftaNFr1B4kBjq1RtdZTSZoxJctYh+S3ABMao1mljGylMXGBN7yLdi+sIt8YXnUbm7SStcQxV6hIHTa0kIeIiFI+6ND6GVXUx0+tVZY9BxDBoWTDVh4fvll5mdImNbBF9G/05hIO1ixSoiIK+8pBW2KKbMdqoA7sIZOHRf9qPaf3qL1GSFGFoZd8tSuPtGl++nUur93vYwY9upJZ2W2lSbYEt4lRFBjDq0DpfccSbg== 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=UZKBPwv3h3QlWAM24YnwpxiPhRgJFyrgSksGB04gjZs=; b=bQphhvVq0SAPk5U9Kg4q9fApNiBC+c59ALhOZd1/luJUYpGmBzOLcXhW0G6B4IYMQOUvuSJzfCBYrg639v4Ky7AXOcp7Zt4GezYiYprE+R4y9EcFWKO2X/JwXx5eRIf/M0dFCJ2SelgQP4KpUoAh6gTzdvHkiRzeusKURhYeHR08EDxaTu/9kzo4PV4Dy3xr7+VbLCl6rPiwNLup1+NZnGailKRNbnmTGik9vvlO//GelBETTa15ZvNCh/DMl2WljgrlyDBWqBNp1Q3HfBIAKlncvYUUSvLFYdZ+IoCyfrRLLIW6u5+q7CW3W/HF7xCmaUpEGOE23WgP3cNd2VMnjA== 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=UZKBPwv3h3QlWAM24YnwpxiPhRgJFyrgSksGB04gjZs=; b=l3pUHYpgJaa6wH0MD6cT94sZa2OQCcdrHomyoJlJL9i/i9a0EijD6iNds2fzobQ5XjWZcPUMCSn7jWY599pd0m43qppU4rho5a/OB5gRgz+9A3/Tf6O78WjWvuTkpDgBIsYaZFmx7uiMkqZu5fbCV7X8fyYPKdne5uXrC5lZsEY= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:24 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:24 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 06/12] dmaengine: imx-sdma: add mcu_2_ecspi script Date: Tue, 11 Aug 2020 23:53:45 +0800 Message-Id: <1597161231-32303-7-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:18 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 671d6b29-223e-4bb2-3f16-08d83dc9cef9 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr 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: gDPvHKFB6qqUWMvO5BFj1xMaRvcOGHlsPHb4NkhNOkTuOjWKrwyw8kvQD9KCexUtYas10Kv5MBApOZ/d8S7iUaj4+SBhnIiBM+UUE5b83BNBcrDPDLGbQZvJwhMGh0BFqNvcxT1HUrOKK88/SMrf/MioP9U+ImYyLrgRJxbOF8tZix6FYwG3ZW6DdVOMA5qYhiOarMpuFqHp+J8KMVTm65pHk/jAOkOn8f4bQ/31hLrdawy2v3inde2P7WHhhlrLSn6DurDHKnN5nV53zZ5DrniKVXA+fZqNnyxNU2ca+FD/Swyn1149RaU3LZft3JZFyWJZzmLft7J4vV+pWxsVqRa9EvurBlQ713BYDLiiNMK/TG23IWPO4eFIPQDETseK X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(4744005)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: onPNCK1q8f1rvh5FHQz9MKcK0rGzfIy6DaSe4n/WNo0PBYI1/OIYq6kD4bLVSye4dsmbXIvtbRQkHan6rnaYBpEVIkSr7TOX+2loqZKUMHMJLSDbQJMC1c/MbMf9vs3JIZUZrOHk28CEQ64RVKpLNpmVEqz35OMrrs1aQW3f9zeW5SWkwPMS+gsoFr+1BRHkKYruQCzqM74qA0SRb1TkOBUd4MqXJpHtJVxEpoNWzXIRw7Ke+7A3geREsnUAG30ycnMk1oJk2R6R9KnGpwdVz/RqC69F4lyexwcr41EVGQCdgwhw+ZW5/CBT92w75Ht4C5lRDikFhDb3TKIOc6Zpw3zO5saRzeCD9u3wHSHySZDhKMLl2Sy8cBd2nIeW6cU3pJ0Odf46MiWxxZ+6EnRYbdyzzmIywBVtTuEj5RExg+CeDQrm+r5iwOwLKGTN9bAPGzyiimB03SRDHYHiemyJk1Q5Jw6eOYkGdyRIfHmmfzQ0YtLj2EJ/2yXFH2qcXWXaa93SDaNB8M7eXHowdEhyljjq+JS1x+oRGy1LYo/zz5EzB4vmy97qrq1PoAEpts729ciA5zw9o8Dm8gsLQ41bsKYbbgWj2YuTIEoh5SDFFUL+28GcnBz+PnASE0NDSHeI7u05FD7sDYRLF5oHMoF05Q== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 671d6b29-223e-4bb2-3f16-08d83dc9cef9 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:24.6425 (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: FFQN1UKVXafHl7r6P80iej5ZZfZqHdgbD+nLhH8gEnatQYSagJW4AHTQ6STo90XEHWgdMCiLUkHTMF442QIGCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Add mcu_2_ecspi script to fix ecspi errata ERR009165. Signed-off-by: Robin Gong 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 cf02c3e..d5d5d40 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -922,6 +922,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 Aug 11 15:53:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708767 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 16481618 for ; Tue, 11 Aug 2020 07:40:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E361D205CB for ; Tue, 11 Aug 2020 07:40:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="WhrAXHIa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728342AbgHKHki (ORCPT ); Tue, 11 Aug 2020 03:40:38 -0400 Received: from mail-eopbgr130054.outbound.protection.outlook.com ([40.107.13.54]:60589 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728275AbgHKHkh (ORCPT ); Tue, 11 Aug 2020 03:40:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EBa1JnavbaI5/nn0c4Vw/HeyFy/4hdl5n+/D9m9g+A86uAW6KF/pPBox3JKL0TfdywmVlFV2g0H4L6f3RA8LEbvwNswO5o01fKW4G1PejnAcWSsjMsS7i5LxgUZEbDEGVPTz1FBdHIfFPougRyqXQ6IIZHpI4vxtr6ttt9DLKV+U839z7ThfvhdKqJ/ayU8Fs17i0vB48N/3Zu4OVSHlUGxRcfyRZC2luXltocvZusDB13Rq0+owMe3DGeh+8Bko9DoUQfOxW1SPE8WE0GBY/MCEjQRn5XhQrJX4iJjgND6E+6trNLsYOyJg/I69yU/w7cVkPY8nr1A01HXcfQnVzw== 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=+7wglQdCBx4vybuSP0CcjtoW8ZOV8IUohKb+Ye4yy8I=; b=j4DL33NtyRdYmal9HBr5ysC0EQ4iUTk5kyiWCNyn1kIZlzf+L969vcn3xsjExy0UCNahS88tzEd3IngWs2blCpGHp2zv7D/HPANwzDI4BlCwNWw2bIiHW7ORp7MHyv39RcQOmtn4K9PdY2jUOiEAiEhxQc6RIeJDNb3UOrnJgVRt3WH4/zygfbUlb5L7Le8SWVlzCxtf06k/2eQc1NTRZdwTLaxbECRK3l5xHG2Me5jcSjUu4h81o3SI4VZy2CSTCLrzbW0i3rTwQebVFogFWepFhB7NgjgSLvS1C8MmrWoIAbwlb29UlfhkNV1V4tnewTLNuWpb7AQnHPJ9463DZQ== 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=+7wglQdCBx4vybuSP0CcjtoW8ZOV8IUohKb+Ye4yy8I=; b=WhrAXHIazubA4L8mGITvGEqP6p14x3iDkKxjMniQN5ZQysESMXLJwqw8CBgUTonSC0gUWRig9oyXSRZ4TmYgI+HrW2y1zLLyRa0oVH4IEdUaHSt8WI/WfZnmEKSvRB2A2yJdV1WktHd8rXm1vrpoof+mkIRAq5j1EGGGULKpeqk= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:31 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:31 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 07/12] spi: imx: fix ERR009165 Date: Tue, 11 Aug 2020 23:53:46 +0800 Message-Id: <1597161231-32303-8-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:25 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 245fdb99-6b3a-42dd-8ef5-08d83dc9d2db X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vkixeMoeylYQMRkWfsPDd9BL4/coImsXcTTNJprU6EAXGHStQfElVCZ8u6OwX4+/gkv5ZNCpe1N1zIvoC3xGA7MquRfGFlgbvUFhG+SupAvP3Px2Z5EACYo+7pVw0CZK8rvKKLSUch2D1SWR8BA3+A0heUdBxLEWcYgmxDeN+yNtVt3O5msbcQwOQEZyxYZb5F/DKZlI7fphDygUaWidU06SsGI13Zit4KZAcAuKweGcKhr5495bpG+mwnpZHYAQGJX8jHve27EAlQUUU+rdScsdQ6BVpZ3o9B/U6hYCiO4wM4ylU6vIYXDiHdDhQ0h+FIQInsiLpW3KStXQSEzbbrfRi0SDQj9F25ab+MXsi1gNpMJRD0GkuRIAREpPbIfxoV53t5d+W13erlXtjC0ij2vyVIf5N8lHXXeDtiap2Y4le7f6OZKDgbiXl57T5NQowNQ8sDf+4mj0+FsqPOhYTQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(966005)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(83380400001)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: zKcm9oS00WtLeC/9JCw+hSG1q8HsMynsNSCZ5rXcV8fVoXStGUamJ8r+KNVUg3OpIOLIwjTe076dCb3RD3YhfrrRlAru996spo18RU3srLxJvcS6MJeZTMHUaY5Ep5XF9SiQAjKoRUCbKx2DgXkCxvrJwsWevYg4RrOqFgiZEYTo0sqEK5b+snPfmFjWLFge8CL7TMJrwf85KvrBY1rzLloW/UmZ37enDYRgru/GBbirW6IPHfJsP9IYPYGxeFniB+aLpw6WW77TkZwx4EJSwwpLqioMVr3obEduf/OycfAdJSyJkKv9U5dRCCstVu4Dtef1hQ748wEaw7v1RICyiEbfgZnNnuoqBmIhyf4r+BkW6MuV1Nyd8g42TvXEC7pQ6J18D9gs6Df/ZU6NzAytCUlCfULNLXr7tDiX+KgIMwR9jiCtYPXpk6/6vYq6OlZ6S3PzJlI0rl+OHnS1P5go1Hv83sFwW3k/QY/gwcs0aoVSO6lVQPZI240i/xyxoZRTPUrk81onnigiyjDIuPsOAuGETSHMEUq6ObXBchroQ//n+RTWGVZEFH933jJ0p5ZgJrx4gaQzTAHhmdGswy/PS3tUM3jcZi2M1LfWfUiOrvNvrHuyqWnf3inQoHC6NaZAeclY1y9sTiN8gZdTxA+3nQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 245fdb99-6b3a-42dd-8ef5-08d83dc9d2db X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:31.0419 (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: eVO+BGZLivzoyXrqq9Dg2pcosA/pCzguESwE76DmTtFxjWesno2ZRWCVkVz6heltcWeTVRGVtaaG91XxnWRb8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Change to XCH mode even in dma mode, please refer to the below errata: https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf Signed-off-by: Robin Gong Acked-by: Mark Brown --- drivers/spi/spi-imx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 2b8d339..873be5e 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -591,8 +591,8 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, ctrl |= mx51_ecspi_clkdiv(spi_imx, t->speed_hz, &clk); spi_imx->spi_bus_clk = clk; - if (spi_imx->usedma) - ctrl |= MX51_ECSPI_CTRL_SMC; + /* ERR009165: work in XHC mode as PIO */ + ctrl &= ~MX51_ECSPI_CTRL_SMC; writel(ctrl, spi_imx->base + MX51_ECSPI_CTRL); @@ -623,7 +623,7 @@ static void mx51_setup_wml(struct spi_imx_data *spi_imx) * and enable DMA request. */ writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) | - MX51_ECSPI_DMA_TX_WML(spi_imx->wml) | + MX51_ECSPI_DMA_TX_WML(0) | 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); @@ -1273,10 +1273,6 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx, { int ret; - /* use pio mode for i.mx6dl chip TKT238285 */ - if (of_machine_is_compatible("fsl,imx6dl")) - return 0; - spi_imx->wml = spi_imx->devtype_data->fifo_size / 2; /* Prepare for TX DMA: */ From patchwork Tue Aug 11 15:53:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708771 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77A56618 for ; Tue, 11 Aug 2020 07:40:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 510C02054F for ; Tue, 11 Aug 2020 07:40:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="N4j6q1aF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728380AbgHKHkp (ORCPT ); Tue, 11 Aug 2020 03:40:45 -0400 Received: from mail-eopbgr130047.outbound.protection.outlook.com ([40.107.13.47]:31297 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728275AbgHKHko (ORCPT ); Tue, 11 Aug 2020 03:40:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FSt6148a7K5M+/zQAh0hh3AXf2dzCQ+grkfrC3RqRAe0lnwzC5ut+7F0f5bCSjWQSUKDYbCOuCdqsahV1kAYSGizIsMhqYUxZhN3LyXNMiAXhKYtlao/I36U3tjTwUVjvD+W++jMaowQRiqoo8VLEqq8zwCdyf96P6VCsWv6xbZ8pRzeytn4+IU+IdknkxTV44bhATFUgiBpY1w+cXeJMO7H82rGXAlQj/z7HalfUM4tBN7o4IqY6NS7drvP2mo6lllBnO/QCZCxKbgfaGpNBNJThDlMogy06UcsZ54cfPletcGxOm/bZtKkRDmPR2fkFpPhtzAwv66ptKgLuRgykQ== 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=UIdg0TAYR1sjIrLOlt2s+rn1Vm6gjVIRKwp3FX6c2sQ=; b=Ky/m6HxlhfOFk7GaPA0mRoMOe/ZdupJNTCxtOVXDKnQdRw+8wZxCidFCLLQqF3LEmVwZu5kMJLw3zytIcINNrQm3aaXFSSE0XK2DPSYfRBVU4zU0JnefoNSJf5szTmhMvQYmB1TPqVvMYQMmA8poxe3e8ep4j1R6d6CsaEz27MZKffh9zdcOCiRPdCnWeI8P10ZAGoflM2IXytPODltgWqKv6fAQ0G1xkUtignyFlaraSbDPIf8IS9lvwE2LHbyySXsOa+uFqRoOfZpf8ioNixkWkJ0/c3g/z06om9Jn3mnb/01WlKg9B/d4uWOs/LHcziGppWGiiKDtONGonnravw== 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=UIdg0TAYR1sjIrLOlt2s+rn1Vm6gjVIRKwp3FX6c2sQ=; b=N4j6q1aFq6qoh4VFdkJ2ysX6u2D6taJyLJbtzV9RF8+O/DeeQRdW9m9LghG1cPqV2SLkHcYweGcLJoOQwFKx6/tNShS/E5Jv4wDasVmMrCtxt5wAdwd33k0Qj6mT8CF5oB91BkMOqF9MMoAraE4YF1zKaxxjjQWK5RwGqSFhed4= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:37 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:37 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 08/12] spi: imx: remove ERR009165 workaround on i.mx6ul Date: Tue, 11 Aug 2020 23:53:47 +0800 Message-Id: <1597161231-32303-9-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:31 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9b8ea2fd-adf0-4cf2-dd6b-08d83dc9d692 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr 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: zU2sb50otW1ScYkq7ihsPk5+zV3ILRM3G0JNI7NGdIDgBesNsZ9EMKtbrVrnWpQop2WocQ5MkRyiN66UMkBRjafrDu+0lGe6FcwbULvT/BYuW2ibKTUMpCyfLdTVB5a5gwq3jy0GknpBxRTpd+QfzMtYv9G4bn1X0r1JAv6gzy9akn/eYMTwpyt5JNCtbCJ5YaBPQh28w1/8Epod5VPUGnSOrKGb3/3N2nD9mszzPznpE2XHA3EVu+M2VboRnOqyCA3gMY69z+sozVFIydTC8PZyShjJV4cyefgMNyY0qA8tq4lYrVCT4JB7E22qpfHo0CTrT95jhxfQx7pSO54iTkU2xFlugwHEXOADIFYBZifTsWk1C1uZKm+C2bJEcoPRNQhNdoT+x0t85piMmu2WojsrHFZ4i9O7gGEIHIcH9fnJiat3mi2tJrDvVUsY3sTT0Nvr2N6JlYSOr5XrqoiDig== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(966005)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(83380400001)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: hMAMdxpGunGQPRM46KttD//iSQksBZKHkLhTFN9yCp4kw4tejEFqGvhqWldu+c6Oq2QbLK7SM7kM/r5vycyI6B32ZSPtIxS4HfmfLscO3biIviKLTyyRVZW9VXFG+NkMW1HULWmBIqu4LWByn9J7UUc+auppc71lesbLDlnCgmou0gpWceckJRicD+TJ2HpiZGHs04hJMd3unigagGF28BNVPpwDWeod8Bnmr/6gJ5/W5qDri+SW/dhEyIow48mBeaUkZWZIGfxMXixjajUG4+cmVZqoHRHc97L6OQda/j7uWOri0u3Th3aaCRAT0VURrxV2B8xtds7D5H9BERuJyubK8I+/UQFUIbET7YzY7ScFv/PosxnU+IB74T7fcJbANFSTzqXzF+tnyUmyJmf+ZvBNB+cwB3uxhzQi4GJo1Sx+alCX+9dHqsnjZNVBdaA8FcHHP2UcYI3Zasktbq5rX9sgzb+HJabx9vAhJ0ySRn8UTDcYuO1+GcC2/ErPnsY+IXX6F9tVbUYuFNru5digGRdQs0+foqTvAqprfzUNprg85B2bw7VB+DLAu2PiadjaB8Xf2fQjA087f0Z2tH7zvCTOE4vSjawJY+WxwPlVDIR4Vm22rvC8uo3I6A0b87fEMzBgOgUAGCs77TPsLKLx3A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b8ea2fd-adf0-4cf2-dd6b-08d83dc9d692 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:37.2823 (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: bBbmilcteoQrWFsqgQveNseDT6GWtkYVoaXZFHyIwf27hbzHziYOrywV+KNZfPax/A2LZuR2EmaZnYg4aX0uIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 --- drivers/spi/spi-imx.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 873be5e..f3049c7 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -57,6 +57,7 @@ enum spi_imx_devtype { IMX35_CSPI, /* CSPI on all i.mx except above */ IMX51_ECSPI, /* ECSPI on i.mx51 */ IMX53_ECSPI, /* ECSPI on i.mx53 and later */ + IMX6UL_ECSPI, /* ERR009165 fix from i.mx6ul */ }; struct spi_imx_data; @@ -76,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; }; @@ -132,6 +138,11 @@ static inline int is_imx51_ecspi(struct spi_imx_data *d) return d->devtype_data->devtype == IMX51_ECSPI; } +static inline int is_imx6ul_ecspi(struct spi_imx_data *d) +{ + return d->devtype_data->devtype == IMX6UL_ECSPI; +} + static inline int is_imx53_ecspi(struct spi_imx_data *d) { return d->devtype_data->devtype == IMX53_ECSPI; @@ -591,8 +602,14 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, ctrl |= mx51_ecspi_clkdiv(spi_imx, t->speed_hz, &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 +635,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); @@ -1017,6 +1038,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 = IMX6UL_ECSPI, +}; + static const struct platform_device_id spi_imx_devtype[] = { { .name = "imx1-cspi", @@ -1040,6 +1078,9 @@ static const struct platform_device_id spi_imx_devtype[] = { .name = "imx53-ecspi", .driver_data = (kernel_ulong_t) &imx53_ecspi_devtype_data, }, { + .name = "imx6ul-ecspi", + .driver_data = (kernel_ulong_t) &imx6ul_ecspi_devtype_data, + }, { /* sentinel */ } }; @@ -1052,6 +1093,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); @@ -1671,7 +1713,7 @@ static int spi_imx_probe(struct platform_device *pdev) spi_imx->bitbang.master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH \ | SPI_NO_CS; if (is_imx35_cspi(spi_imx) || is_imx51_ecspi(spi_imx) || - is_imx53_ecspi(spi_imx)) + is_imx53_ecspi(spi_imx) || is_imx6ul_ecspi(spi_imx)) spi_imx->bitbang.master->mode_bits |= SPI_LOOP | SPI_READY; spi_imx->spi_drctl = spi_drctl; From patchwork Tue Aug 11 15:53:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708775 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D0ABD618 for ; Tue, 11 Aug 2020 07:40:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B2FA0208B3 for ; Tue, 11 Aug 2020 07:40:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="UmHJHpI0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728399AbgHKHkv (ORCPT ); Tue, 11 Aug 2020 03:40:51 -0400 Received: from mail-eopbgr00073.outbound.protection.outlook.com ([40.107.0.73]:25216 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728382AbgHKHku (ORCPT ); Tue, 11 Aug 2020 03:40:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gEjOrJVBVnOZSzUxRKve2ZEYQzWJiUdtUKy/X8Cc9mNqVSxrfjYRHkrtKAnda+fpRr4IrG1bD8qKiMpiYKSH8G9lfJ7L6MfxPhSFb+kTVT473R1qPvZtW/MJd0jyWJBKdKBwPjsTQ9WymC8T8CY/GELviBK5lm15Tf/Qaw5uCtz72A4k7ZjzFRg4IhRwk0/5XovNIHuiih/Lvzw5MlK8ZwA1gqcl2X2Air9HGgiAKqjhNjtilh/NkLgS9Ch4PjvyQF5T2FCdkVaPw9XjzAi9mPQfn+TK8ZqBv7DyD/IW1EUfqfmkl7VdhrdfEuhedRLZU/t53OPreuhCZoSt9/P3Mg== 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=5jxJdGqHBF995O2koMhPVubVtg1S3gV8z8tbdE75gTs=; b=FxLEpxrD+yBPQi6jARTv3COtjSvTTCdE/dRe+A91XNGH/mcdm/aiAeSyCLmlmJMpMVxXgoZQJRQT3xs/fJXPK7GXkHNEdlYz56HY2qJgpwlSt0mm2XBG6YdJI41pU6t9jfaGEUKLorbLsktNNJtj/qMqdIgVMa6bfKqSHV6FS3WeTrjq+vzMG2KWCXhdMS8wHbCaPmApPu8Oet/TvG9hO15Qhs2T3s4kQxJ+3djNx26dhu7IiUnDi+n02lIRw8XWtOmRr4Ugz2qfiQPnW/tYrSLCq1sPHwHAjz2lO7DqBHJ7FaSBHiMa6feM7lX5S9MnuTqwHlPjA/CQZ9B52qGKxw== 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=5jxJdGqHBF995O2koMhPVubVtg1S3gV8z8tbdE75gTs=; b=UmHJHpI0/nRYK1KvGuRuJsjpBv4dGOmra+97XBxgDED/h5D3abFKZ8FoH1fbk+PF78uOFUx8JmRfQig8BoR6pE/EoPnOLI89Em84fnKTxUSp48mFGuRZARfHIaXiGF4EKer5Z5/gYJwkkIsgQt4USO0tZYSRfOHZkAM17wHbbNM= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:44 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:44 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 09/12] spi: imx: add new i.mx6ul compatible name in binding doc Date: Tue, 11 Aug 2020 23:53:48 +0800 Message-Id: <1597161231-32303-10-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:37 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 40d7cae5-b522-4986-1ca0-08d83dc9da6b X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4LvQqk7FsdSGDJFMxtuNB8P/EByKMvhUTZVO+4VjJLx9tn4ouv3/nMX8ErR9zLty7AJkL24xHDJGU1mnOMTOigKmrZDCCHNUxy4m79UHLo7K+PG+OjdrCXce7dmtUhM7ZVUhZvoUDqyDTlq5J5tqWEznpQVpO9pVJBN/F9wGFAwR0EJzelkLtFE1yo+7MnOROmQ6GfVyHLEfIXlF0AA2057BG5jV8e3S5Tl1Rkd6EMVK9PuE/v33D1PHCkmjRrN3QqdsyZOvN9P8HjbvLZH7ORtBb1TYIWhIP5HzTUIXZVQ5nnBrEa4BXrFBNHgxElkdifIzmUu2gD3RAMmmFzHHXkej0TjZq24jXTtwn1fUjPydgBeTRGAeg4o101Gjf51t X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qsEkQ5ItCA6qZDsVI3njo/t+tFIG9D4kNwK8XttBZmfoENOLLB+MjTiRf7KNl62WRKe2dIK0a5cu75UpVegb6DZXJi504fqK9pBIknoqJkbIQrlFAde6Z9h12isaORnxbBNYs8ZVy77JXenN5SmWpar2ea1PlVcekZh4gzbifwh+oq6N/hRnfAPF6p8LHlEf582aVWAMLgGndavk8pge0EPmf0SFl6iw7YrxbRjdvNUbwVCsjK7wsQmKYttMgn2YVKEZe985DBG8+QnrjwcpB55/7o/NKRDLcsHGmJu/MprKggA/CXt4R3cOI38LLFg09qcClUBWnimtJurjquX9DKBCggTIvxN0521bn4t0omt8ELc+Ryo6PNL7om0kj1TGZx4qvlG8p9cLPZUxsDZ2NeZSV8najUZLvimE73vKSB/c8TsE2fd+TGmK7FlkENh7NHeydlQaGEnwuxd2F68LQGiUMMHz/ch3QQwqnDqb5BV9Urhlj1omntG7Y44gIJS4EJTFnOxrN3PhZbMqCWSRSbWle5oDCsxmrfrZchtZ0jZGezv8vF+u3vjfs4HV+aJxo9q1ujgX4s35XFj3y7o3JR7w9+g/h2BgvmmQYqxnqvf+GVPHECAEwhcoC3Vo4QwEIuUXuSu5dLnejDywaf2jNw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40d7cae5-b522-4986-1ca0-08d83dc9da6b X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:43.9466 (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: mmAXfZ+MiI0c0CLoudizylwBy+GmJjPjhjAxPuZSw90Yt+p1D8ZmrMBUEEu5SK4/TWpHydTGy92cYqgmg4z9zA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org ERR009165 fixed from i.mx6ul, add its compatible name in binding doc. Signed-off-by: Robin Gong Acked-by: Mark Brown Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt index 33bc58f..0a529ba 100644 --- a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt +++ b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt @@ -10,6 +10,7 @@ Required properties: - "fsl,imx35-cspi" for SPI compatible with the one integrated on i.MX35 - "fsl,imx51-ecspi" for SPI compatible with the one integrated on i.MX51 - "fsl,imx53-ecspi" for SPI compatible with the one integrated on i.MX53 and later Soc + - "fsl,imx6ul-ecspi" for SPI compatible with the one integrated on i.MX6UL and later Soc - "fsl,imx8mq-ecspi" for SPI compatible with the one integrated on i.MX8MQ - "fsl,imx8mm-ecspi" for SPI compatible with the one integrated on i.MX8MM - "fsl,imx8mn-ecspi" for SPI compatible with the one integrated on i.MX8MN From patchwork Tue Aug 11 15:53:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708781 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA8C7913 for ; Tue, 11 Aug 2020 07:41:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DE74206B2 for ; Tue, 11 Aug 2020 07:41:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="ch1Gfvyq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728413AbgHKHk7 (ORCPT ); Tue, 11 Aug 2020 03:40:59 -0400 Received: from mail-eopbgr130085.outbound.protection.outlook.com ([40.107.13.85]:61166 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728382AbgHKHk7 (ORCPT ); Tue, 11 Aug 2020 03:40:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sb+cFVaxW3fFNyJl9gTxE4y48IjEmD2hRoF6lyOjHcddVB/bnVkf+ekD5mw/yN7seZ2Eq4439VuprsHWHGXnS1NV5MJ/0E6r/EtvTUPJSxXtbw1echFnzVOxUVzE5JnH9bmDzwvMm2UXSSN1A/UfyS3uscjDTYtSF278lj8pxFbo0MwFC38uqLBtuu/1LKtzGbP1SkKHvnI0623IW1ut6LVh95B7FzY9bp7rU5vzs5lAGC/ujRRhWXivNWMd/shfxsYj75Pchzuwkt9g4hog/fRgvcZGoHJPguTV1tYn3J8+soAmZxBAyFyb9SM7RwJpQpvNIazPoH8duJjVTh7/rA== 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=uNKNXEEdPeOOlP0E3WJENUitoaKeApNIO0w0G7TvIl8=; b=Sdcg74YdC9E/+oLYq26a8SHY146mYtjuBmPRL2/nuCA+isuIqRaOIJjw+bX7Z12HQYXZU2YEpMYkOKM6xTpSKKWUJ/TCKEcgJ9tfdflXmJcpNSZPsjV2lpQSbGmS7yxjhLczKeyYE7MkxCHVHJ5yaKeLNlDycLOqWAQOrKBN+MhuDK4+TPPEpKy6Q5cYUBvRCR6YmB/f1S6ZLCpYnJItI+ZWj7AL1XADVrqRnbKfsi+HjURjtdN7wwcQ9rTfyGHXtA66OklD1wH4DxC6JDXjXzIWTWNBf6IcRMK5kVOS1Gi1GfaCjbp48BDI9NDF50WoW0s7RefK6cVr72S5W8rGZg== 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=uNKNXEEdPeOOlP0E3WJENUitoaKeApNIO0w0G7TvIl8=; b=ch1Gfvyq5rY/JwR0TzlvaWnqXmDzWPN0IasPPOvlwe80WidCuvOm28ahTsxzS7mlvFuCPz3qWYKMyjT3IqcgGdMrpOEh5iOVtg9e72awWx3QIffODyPbcOk4RY0Er7MWGaCzn0yMq0HFCFa9nQwMcqNJeu1LrHeeZ7Zs9PYuY4M= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:50 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:50 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 10/12] dmaengine: imx-sdma: remove ERR009165 on i.mx6ul Date: Tue, 11 Aug 2020 23:53:49 +0800 Message-Id: <1597161231-32303-11-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:44 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 649ce89c-dac9-4f07-c458-08d83dc9de7d X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zL9tzYCWxDcy1u16OE//kAq9GIfyP+oUHiG3ssQ+d2E1krGCXCCRqvW8/T7R1eJIlJzPJSWJEJEcEr/SiRTMYCslYAj1T1XR6fKpgN99c8P70sFbI6Ggj6kpvM9eUdr9A3diJYRLlDpb4aqHdKhigf8ZHOdorVmbBw/+KV6X5z+TKTTfPrIVuJ21riFMoM4xFrm69HPb9HsVSuEFiYyDklKTG3FWImz2QhREgIqqZyfaYXlkN1ykO6zDImLzXWwgNqWc9wiZZ+mtWZPoMHRbUIRflu1dAMmusxiaPmv37r+2Y3vo6kbdSa4YQK+tYPHDmxfvoc4JkWFs3NsrsxRvWzPDSb399HyBq7skjN4UYNVJqeBZvWHCW8DEz8maiJaWK+c5ZvJ4gHlgz/jMzE+HB2dtQPnm+ZGL/8KGcdYQNbqZFVaS0lV+xlM1p1JdeGGk X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(966005)(36756003)(186003)(2906002)(8676002)(6506007)(6512007)(8936002)(26005)(478600001)(83380400001)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: wgjhsf9JTd+5WtfSUMrP6cC64siUQVFQGyJ/8/zBazEM00lZd65zNnnAviyDGM8IOvdPtorOlSYGz//mreFtGGEAmT2oiMiqFiIcMmh7oYHlJIbE4vi5ha/UeYpUO+wBdp/gy6tMSZwSlmwlsg0RTTu+ZayxXqbbDY8NLlJW6RpIMB/8s8Z7dU5i21NDLIWvEZjL2dXA0Y45Q+6dAHJeWQpeyIgyM1Itpa48bKAugesqSpZhBmmyJIOfZLzGRS2zQTUAIJzn3iThPip6BobsdfC4zTFPRM2oGZzWxv9MI4WEvA3HKJ6j0/Kf93u0+RrU9lCMmNNjgNoCv8qsE5AB3uynlPTSLkPLkX0ODCil+CrVzUN1/lTZC80Bcmz0KsmmTNf+wqLvEvnDEFNJ7iZCOv8ifID32Z6sxrENnaefy9ETIkUVUk0IlFnq2tLwqssR4wjYnWbliXb1gnL3L1ANNx+NSGf3yIhFstSvLXFpP+RswByzKiihpcU+fsRbnEqlCIBxgUqK+GEaf0I4hSppcxAWgy6RRonJLwt+vCNXYatQ2HdSHg/SGOFfKMS1dPSfafWL824+THhL/0vKxTXHiJuzgq3Jdv8t/W1XC2hWmFHcmvoT8gkIACf2o4sxVOBHmoUBcfveBHWiwGeeFLsnCw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 649ce89c-dac9-4f07-c458-08d83dc9de7d X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:50.5479 (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: CMpQqUAm04dSfhpsBFPAZAYutPbEdM0kMF49vDKMj4Zjknc5ghzlA4KVw6L2bTvJDnnBdDA5NhYGbtbW+baOng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org ECSPI issue fixed from i.mx6ul at hardware level, no need ERR009165 anymore on those chips such as i.mx8mq. Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index d5d5d40..8735606 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -420,6 +420,13 @@ struct sdma_driver_data { int num_events; struct sdma_script_start_addrs *script_addrs; bool check_ratio; + /* + * ecspi ERR009165 fixed should be done in sdma script + * and it has been fixed in soc from i.mx6ul. + * please get more information from the below link: + * https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf + */ + bool ecspi_fixed; }; struct sdma_engine { @@ -541,6 +548,13 @@ static struct sdma_driver_data sdma_imx6q = { .script_addrs = &sdma_script_imx6q, }; +static struct sdma_driver_data sdma_imx6ul = { + .chnenbl0 = SDMA_CHNENBL0_IMX35, + .num_events = 48, + .script_addrs = &sdma_script_imx6q, + .ecspi_fixed = true, +}; + static struct sdma_script_start_addrs sdma_script_imx7d = { .ap_2_ap_addr = 644, .uart_2_mcu_addr = 819, @@ -589,6 +603,9 @@ static const struct platform_device_id sdma_devtypes[] = { .name = "imx7d-sdma", .driver_data = (unsigned long)&sdma_imx7d, }, { + .name = "imx6ul-sdma", + .driver_data = (unsigned long)&sdma_imx6ul, + }, { .name = "imx8mq-sdma", .driver_data = (unsigned long)&sdma_imx8mq, }, { @@ -605,6 +622,7 @@ static const struct of_device_id sdma_dt_ids[] = { { .compatible = "fsl,imx31-sdma", .data = &sdma_imx31, }, { .compatible = "fsl,imx25-sdma", .data = &sdma_imx25, }, { .compatible = "fsl,imx7d-sdma", .data = &sdma_imx7d, }, + { .compatible = "fsl,imx6ul-sdma", .data = &sdma_imx6ul, }, { .compatible = "fsl,imx8mq-sdma", .data = &sdma_imx8mq, }, { /* sentinel */ } }; @@ -1174,8 +1192,17 @@ static int sdma_config_channel(struct dma_chan *chan) if (sdmac->peripheral_type == IMX_DMATYPE_ASRC_SP || sdmac->peripheral_type == IMX_DMATYPE_ASRC) sdma_set_watermarklevel_for_p2p(sdmac); - } else + } else { + /* + * ERR009165 fixed from i.mx6ul, no errata need, + * set bit31 to let sdma script skip the errata. + */ + if (sdmac->peripheral_type == IMX_DMATYPE_CSPI && + sdmac->direction == DMA_MEM_TO_DEV && + sdmac->sdma->drvdata->ecspi_fixed) + __set_bit(31, &sdmac->watermark_level); __set_bit(sdmac->event_id0, sdmac->event_mask); + } /* Address */ sdmac->shp_addr = sdmac->per_address; From patchwork Tue Aug 11 15:53:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708783 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 85A36618 for ; Tue, 11 Aug 2020 07:41:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BE4B2054F for ; Tue, 11 Aug 2020 07:41:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="TnCg/XVk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728433AbgHKHlF (ORCPT ); Tue, 11 Aug 2020 03:41:05 -0400 Received: from mail-eopbgr130085.outbound.protection.outlook.com ([40.107.13.85]:61166 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728419AbgHKHlE (ORCPT ); Tue, 11 Aug 2020 03:41:04 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RlcUogF2ULVe+FT+wBWEoi07i3hFDRWgioBXn9pB0/BEG1+4Je7E57xlNqhxQtcDNRoUyO1C4H0239IAa5qUiTCb+NhgO+k2uyEf4wI50nZTR0swi9iafYf6qEqXlRQskyQ08vqkZCJqrp/UieMwwKgmjjqMpN85p7Pfsg0rfdmNRaVROCAQaIDKNyh1fmrobtK3txFAiJd/0jzlDPd+X/+cv0EMsujMEw+IgbOen/lSnAJwc2Puk0OBddYYRks6E7T4Djxxj6lVvYkum6HmjTqg3EeGUnsoPXyB0Orz2TFznuV2jyYAJzi9zPS67XhduGgBLC/7NmanatWDsQPmOg== 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=NVB3Kus6RmGqx8I3czvBTt3N6/S5flAydrVmSTQb/0K2nKuv8Kt+iI6mxtMcMiNXhcUBJuYzmMSwz3WTKGaooMnsJejQtxsSD1WQYcpOIcAM199pXatVBJfGRfAgDL9Hp31Qxzmu6Dz0iQJObe2Uchc3ibl0L8gztBhM6EgCBYqimDbBDfY+GCEQitmuTmdmCcFtL7O3rsMY8EZ747ScXPChCwh3+ICprnsOUrsOg1pCmjY4oPalpwgkysJ5Aztc0u5lDwZ/QhxZ1ut4nKbXB4TZpBWlPZWLpCMHinpYQsVMnGCBmFyZ3Qi7pd4sWQGjki+w/jHSIu7hsePIhk7YYQ== 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=TnCg/XVkK/N0OLr9jwKrVMdb42rC5fZ8jWn5w7wwPKSHO3M24zme091VYU7f+afj4EIR0O2g+GQd3khKkW4oU+zCKlZibbz2yhpYSGxCz3AJKgm0KGrOKTq+tflSRkELQBXUQOKp8FDojiLiKy1nAwtE6mqAJs6OAv8TmZQzXWs= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:40:57 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:40:57 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 11/12] dma: imx-sdma: add i.mx6ul compatible name Date: Tue, 11 Aug 2020 23:53:50 +0800 Message-Id: <1597161231-32303-12-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:50 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 146a83a8-1f73-4fc4-c4bf-08d83dc9e234 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr 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: 47vOQTx8monFTycyx1uHDoZGPRS0HJP10yGmGyaROLONfX5d2zXCIrfysMHAmbhXl3XUXisxlkjhbG7t22bpbNMFq2awFBZmvjrrG3hZG40z2FY/VURiQdS3wluOvhsCTz91XPUBLwRilurXOy3Ap2jd5AL1nO28qiRUZ1V/RLbrZrnI7QKMNGSPqSfeNh9dd9Xhm4Id3WPuxBbb3NhQcTi63Zy3ImJ8npFKHuJ+UCWr3yUdSKu2HQz2zXBTXXMG8NLeH685/SiuXnbsj68eJ+f38+VEr/x98F5RpWD3tlZotIBB8zxcMQmNzr1CmkEzinUGdmmdz1Isla9akHj3R+auHSxLF7YPP3lhHNhAyrg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(36756003)(186003)(2906002)(8676002)(6506007)(6512007)(8936002)(26005)(478600001)(4744005)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: G+DnW7Ka3xDCznKa5Ax04VPZ1YAX/6lpMEJXDmM3n9YR2pK47C9eCo6AUutOYBckfCIWPk/JCJsVX1pAKpzonwTnEfXrS70UHmcqnxURRXhhECdeUs9D8jFTixVtoaTKSN35/E1G93viPFl258PjEXkM17R7Dl7at+u93BNinB9mzLJhoVx8hZxM+5WWKf/x4F2uEKZ814uqMvIbp9XCog65xHepeBiJj3zvdekCe/BAmA0lKxtw5owtUTE4ZkEnWWt0DEMG4cbANZTpp0usMpxzaEwTeQaowX2fkRcOAeSkO4jKdZiWY7qIytTiArLRRCk+A7oOgudslxByLftE0ojgwkSsKSDlCUMdh9yELTEWJNh18v16Zr/7wqCLk+6kVb8KQxou+JAXkIiQRx0+JL+G/MS6Bm7y0Ucu8e8zW82jhGOQ46Qty7E/KGh0Wns30gsuTy+6cyB8hHVgrNcBDfFgBLUDaoBQwcHBvzouozmptqN1/wG4toCnsS3E1QkAC1t+vjyxPO3Ghn+Z33s3rj4xc9yL66wE9WIVluIJbJtEp6+D0hBrkW4ptyO/LEf+FNsHtTsoiZSzsen1884y2eB8hBo/gY2iyhQn+BQ4EEMCtG2GpgOQGLpI/oJRZYKsoMnM/jLJoIwVJxwSYaGWlQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 146a83a8-1f73-4fc4-c4bf-08d83dc9e234 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:40:57.0072 (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: y8CbkbsIIeZW7UoDHS4NyGy5fpLQXjnmMIzGgOgz8YP1D7mX1aIb6HNhF7vcWNCawvn0qadesNmKeNsgZh3UpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 Aug 11 15:53:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11708791 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4577913 for ; Tue, 11 Aug 2020 07:41:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A60C3208A9 for ; Tue, 11 Aug 2020 07:41:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="RK8pwuis" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728203AbgHKHlK (ORCPT ); Tue, 11 Aug 2020 03:41:10 -0400 Received: from mail-eopbgr130053.outbound.protection.outlook.com ([40.107.13.53]:28418 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728442AbgHKHlK (ORCPT ); Tue, 11 Aug 2020 03:41:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfHxrQhcGIXF/CA2tFgMGPCciNXp3BL6KWQjgZGf1FpJZFeyqPses8acylzM+Sgbggu9rO1tIy7OmQ6+hEnr5Kh8zHlz45Pz7UjihRulaH4tpWCbBIMjbc9aKDg3lvr8GqQ+5GqHTLZ+z4E6xDYs6zimn7Pv4qDWQOITI0reX+P+3LIcBkAIWu9daQ0Kq95O3NY8wsRC1FIOX78EDU1w4pOoxB219y4zqKj18wyGNE1F2OjG2JG/KuPJtFpxc4COUem8bj3GHGIWgHXVasHbJJ3UgdoV7emE4ghEe+15S713EddPbUzwzTHHmjTeuC+Dq43kw8PuTBNciJaNzP2Ukg== 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=YRY+2DrI/tzbBi6A4V4crHRv5r0Tmfc824mu7Vll8wo=; b=UuRrH0zyo6LaYLnsBNXBWl2U1Qb3GrN/B1AApIC+kW3CwpJZ5NdObTG2xCk4RXk3Ms+wEErU1XQGW8a8/9c4sB5NzfcZ410Dl4BL6NBInExrWH193Zf3izxEGq1rf0NL+S6TSk3cIASzbYCuE2AtGWOzP3C5ponAEFAhwHQ1tZNcMCdqGkDy5qZR5ym6u9Dw3vL5+/iq3BIHTksLWMezEKDfUCMpQnM1pD1kOq9SsiCKeowQ48YDHqPTnQXiL4Lssd1mIbScAaQo34I2LHzfa3FX9e60Q18wUr4lXixEkY2qF+qcsezPmKoNkBablkY0el1BxqLy+aS+q3WPjGJxiw== 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=YRY+2DrI/tzbBi6A4V4crHRv5r0Tmfc824mu7Vll8wo=; b=RK8pwuisupwWC8EXTP81DrHLsXt/16X4PLsraEAZ46IaRRNTOa/jBL1gCAvqhz4qsA8eIAJdjjILLchU2ibkslbR9OhHBephX2e97reA/YtlNVbpjfwNgPf11/603keRXPP0wM7fLrlwoPcn72qX5f/kDiBoV8704VXXQbvXOWk= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR0402MB3464.eurprd04.prod.outlook.com (2603:10a6:209:12::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16; Tue, 11 Aug 2020 07:41:03 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::c9b8:4020:7705:e3dd%7]) with mapi id 15.20.3261.025; Tue, 11 Aug 2020 07:41:03 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, 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, r.schwebel@pengutronix.de Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH v12 12/12] dmaengine: imx-sdma: add uart rom script Date: Tue, 11 Aug 2020 23:53:51 +0800 Message-Id: <1597161231-32303-13-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> References: <1597161231-32303-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.67) by SG2P153CA0014.APCP153.PROD.OUTLOOK.COM (2603:1096::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3305.2 via Frontend Transport; Tue, 11 Aug 2020 07:40:57 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 71c4b123-6115-4916-823e-08d83dc9e646 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3464: X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f96QC6hFyQEEOm0cTt+LfQ21uPDUACSBC8cdJDQFxhouO91pAALDMYYWzwIRFbIiFoTyJaRor0nxLI18A5RYa7MlosVP9kcauWmqKU8ngTY3kHIrFUgTt37iJkSDVAPPDhs2ptTYKa6QkzVDdgeNjMCIucw4jMtwaxMPOzVDxErz0tkdAJ+zslg0gcY8ccKOpAV5GWVpTWMaU6DeU7PCb+PQFuESVw1ulNkyNw6EcFWvJsyqyGNrnC1HgBU+cohKdet3te8E1JG3ziY6vgUZzAUjr4mXwjpbY5unUaWzld88sXIEKYcbsTxSTv/JDBRhG7Fyr8FJ+38ja9mEY5qa0bC9CEww1REHfkfGC5lEWvn6UHYciSJZWM8loMQdfIYZWciLIxdysQcZx0DF6nO9PQnmzRNRpirRjWWfVvdPC8ppVNmpCGCoyxPOj8zU7ABj X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB6630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(4326008)(5660300002)(52116002)(66476007)(66556008)(86362001)(956004)(66946007)(6486002)(2616005)(7416002)(316002)(966005)(36756003)(186003)(2906002)(8676002)(6506007)(6666004)(6512007)(8936002)(26005)(478600001)(83380400001)(16526019)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: DkLSOvOxVl1QXYV6NuINdtJG50x1tK/ajFEwZ5P5JbGWXJ9/bA99+M57hsYFUzWG1BbcLSDI89I+aNd0Sc375Je1JXXcSBsnnPSETUhx4QipJohhO2GsAaKsIYfJkLq8rV6MjW1wfkz9O3Q/r0oIh8N+rI+z67w//cNsoHlgusVzCviqeYpezn5uXi6miICHlEwsmd2BllAPJ44h/xuLowa0cQmDuBLaPj4BJVm6MjqactJS1WdlXBjm5+4FwQBDl+fuHtKajud+LkcQv4nOU4NeS8u+hxPBW0Fe+XslD5jJV4pw8uAXbLKUswOSE+JGEmQWlgMHB2C/1JXXmlHjbGrL4sHyrJy1VeeMX44dHX86xVCGI7HIYwnF+AuymT8Mc1fufP/O91TRGkcUIaY1e3Sr036m54XHsGuPeXgWXy71cDnTj4pqBYkbXt9s+TLWnTzlw/7Ycx+VvJtn8luUYmbAPzFJxrJaNdAcuXXwJqYYqORLdlkLEpTNFJoiTQ/ZBtWfHvTEx2rLTRZo/jJ46OGN/fncD8Wt5bu5gHv2rt1d8Bn1NzYyuVeszk0W3axftrT9DjzZHurqT5hOjNhlyh+NRqcvK95+GqSMNnefMWwppBPXXSL3ot8INUvx1dKeGxaRAnzgSmbBANZRnL/CRA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71c4b123-6115-4916-823e-08d83dc9e646 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB6630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2020 07:41:03.6115 (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: uXqVOUq9zIEaAdqsC8n37JnLvpMRalQF1NN63o8zhAjUasyrmFzVIGBP8f0xThUzppvkIduKju1Arjz0P0/zcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3464 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org For the compatibility of NXP internal legacy kernel before 4.19 which is based on uart ram script and upstreaming kernel based on uart rom script, add both uart ram/rom script in latest sdma firmware. By default uart rom script used. Besides, add two multi-fifo scripts for SAI/PDM on i.mx8m/8mm and add back qspi script miss for v4(i.mx7d/8m/8mm family, but v3 is for i.mx6). rom script: uart_2_mcu_addr uartsh_2_mcu_addr /* through spba bus */ am script: uart_2_mcu_ram_addr uartsh_2_mcu_ram_addr /* through spba bus */ Please get latest sdma firmware from the below and put them into the path (/lib/firmware/imx/sdma/): https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git /tree/imx/sdma Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 17 +++++++++++++++-- include/linux/platform_data/dma-imx-sdma.h | 8 ++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 8735606..1631242 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1729,8 +1729,8 @@ static void sdma_issue_pending(struct dma_chan *chan) #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1 34 #define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V2 38 -#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3 41 -#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V4 42 +#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V3 45 +#define SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V4 46 static void sdma_add_scripts(struct sdma_engine *sdma, const struct sdma_script_start_addrs *addr) @@ -1754,6 +1754,19 @@ static void sdma_add_scripts(struct sdma_engine *sdma, for (i = 0; i < sdma->script_number; i++) if (addr_arr[i] > 0) saddr_arr[i] = addr_arr[i]; + + /* + * get uart_2_mcu_addr/uartsh_2_mcu_addr rom script specially because + * they are now replaced by uart_2_mcu_ram_addr/uartsh_2_mcu_ram_addr + * to be compatible with legacy freescale/nxp sdma firmware, and they + * are located in the bottom part of sdma_script_start_addrs which are + * beyond the SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1. + */ + if (addr->uart_2_mcu_addr) + sdma->script_addrs->uart_2_mcu_addr = addr->uart_2_mcu_addr; + if (addr->uartsh_2_mcu_addr) + sdma->script_addrs->uartsh_2_mcu_addr = addr->uartsh_2_mcu_addr; + } static void sdma_load_firmware(const struct firmware *fw, void *context) diff --git a/include/linux/platform_data/dma-imx-sdma.h b/include/linux/platform_data/dma-imx-sdma.h index 30e676b..e12d2e8 100644 --- a/include/linux/platform_data/dma-imx-sdma.h +++ b/include/linux/platform_data/dma-imx-sdma.h @@ -20,12 +20,12 @@ struct sdma_script_start_addrs { s32 per_2_firi_addr; s32 mcu_2_firi_addr; s32 uart_2_per_addr; - s32 uart_2_mcu_addr; + s32 uart_2_mcu_ram_addr; s32 per_2_app_addr; s32 mcu_2_app_addr; s32 per_2_per_addr; s32 uartsh_2_per_addr; - s32 uartsh_2_mcu_addr; + s32 uartsh_2_mcu_ram_addr; s32 per_2_shp_addr; s32 mcu_2_shp_addr; s32 ata_2_mcu_addr; @@ -52,6 +52,10 @@ struct sdma_script_start_addrs { s32 zcanfd_2_mcu_addr; s32 zqspi_2_mcu_addr; s32 mcu_2_ecspi_addr; + s32 mcu_2_sai_addr; + s32 sai_2_mcu_addr; + s32 uart_2_mcu_addr; + s32 uartsh_2_mcu_addr; /* End of v3 array */ s32 mcu_2_zqspi_addr; /* End of v4 array */