From patchwork Mon May 11 17:32:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540061 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 1C880913 for ; Mon, 11 May 2020 09:32:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0007D214DB for ; Mon, 11 May 2020 09:32:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="DQt7h2VS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729309AbgEKJc2 (ORCPT ); Mon, 11 May 2020 05:32:28 -0400 Received: from mail-eopbgr00041.outbound.protection.outlook.com ([40.107.0.41]:58951 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725790AbgEKJc2 (ORCPT ); Mon, 11 May 2020 05:32:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bUBJ58iZjzLg55Tli4Flz0T9jFTjxJtaalpZOVxirPQK8v/pQBUbcYGaRjKt09L4NZKLK366SIIPvShl7mr30KZlkPbEZpovFa5hYmes3jven2AdPQQMt00jv0CpafkEf8CZf6r7r3SLilZabn+3qmELLKRXFNTt6Sl3qf+nVJxL+9OVigRiFjZtSlRTTV9j9HmgU7tRP36hiX5LptJ56BgwpMbXDXt3my44IlfZZ/VBrE/0TnUxxx4njQKS2QITlogoaWCveHhSNoLAYZVKPDjkeRhfRZ2kdLI4vhgrwFo8801Vow6KH28CfNFcp3gkps6TDe8ohoQLFLhSmMRMgw== 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=Wl64sj8Lt5Fs5c04EiCMqJ8wORSQcVqx7AMW+mwbu+s=; b=lXeMbvgCAayo54vyxF1cntY9cL0230SgRC9ABOKACKlp3o5/uOopeDPeXQfbxuUVJftvWD6RIaUl6L9eecKLDc+Q2uEAk6OaKzcU2kJR5XRT4FbBd1yj4Vj+UfeDy4Gku2l5l81ToguQhLtpaDHJnbM2ZD1CLQe8ajWN7wk4UEuW/0QXMzXLDC6NIJc51LBAfCr0wuS/McEoQET8leRXHwyo+XTzUNDHaN+9k9cLetUBD6+9UWjiyfh/s7nYLQEZo7+cktAU3PwCMShZ7qLm6AD9MBdtfj8z66ADFQDPeELaQ3NsF38Hz+rmPOyz7Frak7gWh1e40cwcsQpey0mubg== 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=Wl64sj8Lt5Fs5c04EiCMqJ8wORSQcVqx7AMW+mwbu+s=; b=DQt7h2VSbAT8SDTWxz2gcC6nxTQrkeseZDWcSbt/qVulDhZ+7lWjsB02GRlDvDUt0YoaMm9anztfWMfTBo6O2ASUws7Jf1wkTwuoKz1XOR0ejRKAkwcBRMMJxUunvrGHYAgEirLfm0OS5c0W8FwmoTCvp/pjxlnJm1usMM8REDk= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6637.eurprd04.prod.outlook.com (2603:10a6:803:126::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 09:32:24 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:32:24 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 01/13] Revert "ARM: dts: imx6q: Use correct SDMA script for SPI5 core" Date: Tue, 12 May 2020 01:32:24 +0800 Message-Id: <1589218356-17475-2-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:32:19 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 7c32cd4a-2217-450f-7039-08d7f58e3625 X-MS-TrafficTypeDiagnostic: VE1PR04MB6637:|VE1PR04MB6637: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DLKXtMXxMztKqzNhsya3EMOpZbd15xTwCoK6vSqdkVfjoHpt+je8PtU05uYy80Ad1pZEucXzDTR0iEZz+MhrZjvq795F0ftzuJRfaxQA+8dk1OJjJOLCxqQeY9FBQgk6t9wJ0mZeUBidTkdzfcoljwMH0BiiJ0C2ODQi2Gx/JNSPGMUf810HzeKVnqKNYO/cgSrb7+MFeNMggyFlFlFlFcYgbMzcAQ+TBy/TIYd/G2ioAIhAlf/0XQhECXp++9VgfUkNI+vlM4ZqmrhkKEOXQw8IAh0tR8Z4D3j7Pv9+3n1bwRmQ3gy3JsXn7bi+qniw1pKl/psh4ib3r131IOE4PAoSZJC8QXTlX8uS8ma3Csri7MG7Dh9dfev/QdjIYc8tFPGf+dTwmJ9CVCoJwgHFNcqXnMt5qhdBpP2ZZFFSkDlV6/c9MXTomIXcC8cBfEMKHzolrDmeuGZy5lfJAW8qmCqMD3blRifJk09o93PTDYvh2vOEmEYfzfHaJI4LG6Vl5k1IpP2lNTvjQeXpJ5k7SsB38jZRVP6HfI6AQKe8cy7KNSKJ/kXSErORLTEWItINtcwEcntuiC3kP/274+1EKVL9cNWQXflZfWz6hY5Jh2lmzR1e6It1hL4OgiHAlzoC X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(33430700001)(8936002)(26005)(52116002)(6506007)(16526019)(2616005)(186003)(956004)(6666004)(6512007)(7416002)(5660300002)(2906002)(4326008)(6486002)(33440700001)(66476007)(8676002)(66946007)(66556008)(478600001)(86362001)(316002)(36756003)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 3FLvKC9txymVDcCGdsdV97Gqvb+L+0WNvblF6naBgq/TV2jGBUyhc7l31dttCssaiNCxjOgdZ2eG5JGT5eaiKQJYiy+5L5rBjqKaMG1jfKJaUq044AJCaNIUhX/nQRFJg+CIbOJB8NSqfNqj3hIsaaJNrjs9v1uTRv/VBOEc47R4gBsEQP6V+oWX67J6KEijADseAOGf7iBrhA3yMKLxBVPPGScF+MGLV3R9zdL+srxF4EAXvrQSZ3SSdUjpET4k1gT4OddTsHuTAaa07VJdgsOypN9W0g+gKUeUmV30koPF+oneUvxcVbcIvOHZKNSjf9O7qNDEgBooAGRNPfKeTXqc88+fm3hT8ZSjw67FGniPaQJiJlaW9XbSMnyBkaIPgXE9N/BgYEUES6DUiuukz3zNVxPq4dmtsyOSTXUyB0Po0vrXGC1vSH0DWwHtd9HeqhiXTYktiNSLdFmbuhd19gRGNGQ/TFRqhuMuVqNHimg= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c32cd4a-2217-450f-7039-08d7f58e3625 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:32:24.2636 (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: brJ/qTy4V2uVrLfC5cRo9EQ0AP04hqx7a9/J390pnWK3t0476RXN+sLbfyPfYTsIFBicztYac8ZZSVrXpnIxzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6637 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org There are two ways for SDMA accessing SPBA devices: one is SDMA->AIPS ->SPBA(masterA port), another is SDMA->SPBA(masterC port). Please refer to the 'Figure 58-1. i.MX 6Dual/6Quad SPBA connectivity' of i.mx6DQ Reference Manual. SDMA provide the corresponding app_2_mcu/mcu_2_app and shp_2_mcu/mcu_2_shp script for such two options. So both AIPS and SPBA scripts should keep the same behaviour, the issue only caught in AIPS script sounds not solide. The issue is more likely as the ecspi errata ERR009165(http://www.nxp.com/docs/en/errata/IMX6DQCE.pdf): eCSPI: TXFIFO empty flag glitch can cause the current FIFO transfer to be sent twice So revert commit 'df07101e1c4a' firstly. Signed-off-by: Robin Gong --- 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 Mon May 11 17:32:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540065 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 4E9A2912 for ; Mon, 11 May 2020 09:32:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30CC920736 for ; Mon, 11 May 2020 09:32:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="nMtT7NzK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729392AbgEKJce (ORCPT ); Mon, 11 May 2020 05:32:34 -0400 Received: from mail-eopbgr70084.outbound.protection.outlook.com ([40.107.7.84]:54144 "EHLO EUR04-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729388AbgEKJce (ORCPT ); Mon, 11 May 2020 05:32:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mQFWFJQ+0Yl1WO86N0hOX7JUB1tTStbZgaBoXkUm4fuFIj2HV4tMfHrHl1qXJ9XawhXpOSvTv4/1k9u4uh/7qDe6r6s99I25BZmFWnFemry+DP75IS2TqS6CagYYKKFpxzjnolfu/vU7EpIUyc2r6XxGYTEeia4659LVe7rc9rphxWxmU/wgjf9vC636HTtCmsx+wQBcnThVVQJytY6Vi4Gd+85R3dSTKEX6KWzIYPW2oWyaebhTbmYJmkTWTAayRbLeFDT3j/NsxzSnq78u3o6spjli80dq2WdyvA0NKUMxIsGpNNfE9N9VrVRsV2L1QS1hvx7SkyeeiykP80mWDg== 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=kkWel5GTo4Ihj7UHKviP/TaeYL/ZKKWPea2xxel30eY=; b=IzpKUrvn0oXrUVGL9m1zY+sJgRdIPDL6a3E52K9HCYypfLZ0u7rDk1IC2z2PQ1t7BcEU+MNtn4eoZL8Pcy3YrKLU2Fpevvcqa3X+tpYSVfb71CMrArBVAeknPBQnXae39nl2OQhXgz1Ahko+UfoEDVuGb5mV4Jw6ZxQYkbmfUYR0v1tvKSVgBCa9lybT/hOACw1zymGI3IbWmRfyvjzW2rCR+ScXWl9JAVTkFG82U2TPypjYReHYWKtpgxdSEoQd55+rsMhtcI/FsEmP7M1jyYlIxRfRit69wjRWdlRSLvS89KlkMAiWlN2/p2wfcmwFEMoMZVFQ64Q1SsN6frOApA== 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=kkWel5GTo4Ihj7UHKviP/TaeYL/ZKKWPea2xxel30eY=; b=nMtT7NzKC9s8jjzyoT8wrOirCbJ+mzuyBHJG+UTpDtkRju+ieKDr//BGEhO6qMScWuI5twEufOmqNqAT1QTOCmS8ziY64DYp/NhgINCkofS2E4GqgKeAcHUCNdTsnF7kKc14jIKP2BCvH2tw8+dcq48/pTZsw1lpt443kN/6ZS4= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6448.eurprd04.prod.outlook.com (2603:10a6:803:11d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Mon, 11 May 2020 09:32:29 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:32:29 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 02/13] Revert "ARM: dts: imx6: Use correct SDMA script for SPI cores" Date: Tue, 12 May 2020 01:32:25 +0800 Message-Id: <1589218356-17475-3-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:32:24 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 91e532d8-f85e-442f-2a06-08d7f58e3980 X-MS-TrafficTypeDiagnostic: VE1PR04MB6448:|VE1PR04MB6448: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yD95ObaNgnt3ZZM8fMvu2jRyrslW1vSzDeE4+HPUCP4t+4IfSn99vfVTpemfVSBkvPPZCUXwdjVDufkRU82hVioSIyF1+i7ZZLDX0qXN+L/qyMNllj+aL9J/lfH0xAQ8bewRpI9w9MYQSES0EeKgoG3p3DeItaDhwWTnAAGgcUH7nHGJib+PlpLvJowDvSJEX4QWsY8F2DJlQ8lQlB+jm0QCC7PZshWjl1wH9ELTSbErpe12ZLnrzb/YaHCzirU7RI/gbzIKF+EKo3o/IL+Vaub0Gv9RePXVce8gKT+49IkwCwLh8Ij4IEAAOB2pQqi3iXyeEe8wNAOegzaJ1iMTHDRSO00TqoyRgTv3hKfBpB2PuHjoAcBEAhKu8c0E/e4PoY6s5MRVClod1K83n+4pX8JvZdeai2+xKES/SzyDnWdUScYuDv4/2lYRadKocEKn6PlwrmoWT/BbmlDRNcgeMxuGQoKsVgPFupQ2Tn4d+fZm+cINm6IZHL/LuWy2d7rMODblagKLwz1q+doGifzH4A7bXZlW9NMCma0IBgJFiINB/pw3LiAPo2KDF4j3sWHswBGs0Xx/hqtT72mTrl29nUVoMPuj603HxyZ5I/3zgRM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(366004)(396003)(346002)(136003)(39860400002)(33430700001)(5660300002)(66476007)(7416002)(4326008)(66946007)(186003)(8936002)(66556008)(16526019)(478600001)(26005)(956004)(2616005)(52116002)(6506007)(36756003)(8676002)(6486002)(2906002)(6512007)(316002)(33440700001)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 8ibW2itbyK7PTTj1oUMxL68Hlq8iR72uvojNZvAdHjONhChZooAYdycREtT5uESFw2k/Lf/aw99Nepat4Gqm3h3YcS0076/h97LM1IOlSieKutmNX3Rotqnsy3CDuDMgJnU1D2ILiIc8ZzlnJePaCL2Afjo6VZerFId3Q65i43p8IquVo5fd83lKNDyXHAZhiA8iNwwa/xOUc3c5PrDzkwHX0APZs2v5USlRXxLgv9rmYchokpIOKax171/u+94bGQuR12oA47SfPLHgX5pELILDlo085+Em+zankUFfbFXp4cQ5e6VGGP4SnTboJ006euoFudl8aIlYWb8Bg7eRpS7VydyfN/4BWjp5dCf3BwXm2hKSaV8maFDRWBHyd7ECt7Ft8nbIz/9OWCGIlc74d63egeIsJ61gCcJCj8Qx96DkL3Hx+6t1cuLLEGTMSGgMr/H1mcsHiEfaaGDyhPoLDfftaofua/f3ClJd8L4yUWw= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 91e532d8-f85e-442f-2a06-08d7f58e3980 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:32:29.7964 (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: 8NRG5es2sK+vko5yqQ3hPGcUA9uGua5oOBO8c3p4k4ksQInX6PveyYqKRmid8jQXrx0YfLTQYyj/6LBwZudhjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6448 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org There are two ways for SDMA accessing SPBA devices: one is SDMA->AIPS ->SPBA(masterA port), another is SDMA->SPBA(masterC port). Please refer to the 'Figure 58-1. i.MX 6Dual/6Quad SPBA connectivity' of i.mx6DQ Reference Manual. SDMA provide the corresponding app_2_mcu/mcu_2_app and shp_2_mcu/mcu_2_shp script for such two options. So both AIPS and SPBA scripts should keep the same behaviour, the issue only caught in AIPS script sounds not solide. The issue is more likely as the ecspi errata ERR009165(http://www.nxp.com/docs/en/errata/IMX6DQCE.pdf): eCSPI: TXFIFO empty flag glitch can cause the current FIFO transfer to be sent twice So revert commit 'dd4b487b32a3' firstly. Signed-off-by: Robin Gong --- 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 98da446..4a50331 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -337,7 +337,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"; }; @@ -351,7 +351,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"; }; @@ -365,7 +365,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"; }; @@ -379,7 +379,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 Mon May 11 17:32:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540073 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 054D3913 for ; Mon, 11 May 2020 09:32:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DCDAF20736 for ; Mon, 11 May 2020 09:32:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="noAcqgks" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729428AbgEKJck (ORCPT ); Mon, 11 May 2020 05:32:40 -0400 Received: from mail-eopbgr00075.outbound.protection.outlook.com ([40.107.0.75]:6802 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729388AbgEKJcj (ORCPT ); Mon, 11 May 2020 05:32:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fiAAmoFd+oZp5JaKdysqMdFNtGaJkQ7F6GpaeHS+uRnApeIzcByeZEybe5VF8bDKiBc2iaGTjXOmTLb81YDjc2fXR+USEjlWJWHrmfylewDoSqdHbJ/KmuVDF5giKT6ZEyWw5Vj6j4s0bpeIoFho15yAlVzGOIcvn3DfI2emFDTUTMbjld2A3aawEjZTB+ut2qbY6QxLrlbCOREKMk5TDuKzzPQiMqxnWWxzL/iKUHf7tn4WlxGiOqpOP5wgRd18XkxoKfwqLb3b4V216/MCtrkmMIAXaYhQxtvz0DLwgbeBJzvPqpYX4BuYZs03fjLaw3/6g1jg6ivS+gWLkKwEIQ== 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=Tn1BNC+LM59xHK/Thlu53S9HVa3f5XGkE3C09QiwNLQ=; b=jlOWTZ8QOGtckUCkrGHSt2iDehkN2+FtEXYcFW8H5+PZl+v/2V0AP7S/t1vQAPcowW4So3tqfmSa8WKIeqHomaWzYh63PduJfkYC8XVQhAoPo+pkW3Q2v5+tXbv15ZrF0zrhi0McYAkZWyNI/gpKwvoPlhBkRyoet7spfXC0oHUO1+Y860zJegZjfUBa1oSKF504LJL1hgXY7VvrLjbIIhnwU4ZLIiap3zlwciuxX6w/QknMlGavESvtaXk9Ti+IFdLXBTQdgNPLw/YbiJRSFzXE8p/R6vF5hToHn9UElwg8saKpVp/JyGSuB0Tahpnp6Pqz1nBOOgAPVQE7dbxlZQ== 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=Tn1BNC+LM59xHK/Thlu53S9HVa3f5XGkE3C09QiwNLQ=; b=noAcqgks+x8U5DqSM2Z/bTfxN+YElLP0rwh4y673G3lp5RQmWpbRq/AVeYoVqw+D3958Qn0Ao1hHH2VlP4Ap7YucS6YtZgZxKGe+FLfV2UM1qUDgkdRFRFuO9PTyhVo/O1oRZIbXRhOElr1KSsSAo9l4GcEWarEf27wx7jDRF7o= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6637.eurprd04.prod.outlook.com (2603:10a6:803:126::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 09:32:35 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:32:35 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 03/13] Revert "dmaengine: imx-sdma: fix context cache" Date: Tue, 12 May 2020 01:32:26 +0800 Message-Id: <1589218356-17475-4-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:32:30 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 94aedf82-a2bf-4e2b-e484-08d7f58e3cd1 X-MS-TrafficTypeDiagnostic: VE1PR04MB6637:|VE1PR04MB6637: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:59; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wnGdZM4q5vKRx2GTmJcAVWr5OngaEf5B5tgMo5Vapth13Jn5pT/oDaS82Nr6noUY5VUePbQH2/XbpkhFAo3WAI1q4uOaHa9DLrLVPaB9/ZmZJp4Dq04MmfA0+oYAa9LCQep3FKQ+nVGeD5m7I0uVQQ35KzzZ2UK9slSPmpmk/4EFiBp1ciGVE7jCYAOXYKZd9UcVGg56luRmlfW6w18SAXrzN9oSrt60tlHD+XWN0pQNwF1kDbj9Yd3pmcAbTIewQJVchOwIHIPlHSUtlr1oA9HMGxt379ets20H3G1yT8EjTmF7XkR23JHPYtdgeoREYyBTiCXC7lWxdAdR+nUrK9pGXB6ZPjvrd0KhisZ8iA2CNuerxXQV8o2YaPWmUbHTlYZjZXJfAGgSY9MMOjzFIR2gJ272ejtNSsSeyqCys4UaYEAj9UHZuhNwXDfDV/2kNMSZ4DwnE4Lss+u0He4F7U4dvHRT0ioP5yQ9QFtStsngWWGZRrTAUn8o/1FZM/x1KRlNqQ/gvbDDvyvsDZq8gQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(33430700001)(8936002)(26005)(52116002)(6506007)(16526019)(2616005)(186003)(956004)(6666004)(6512007)(7416002)(5660300002)(2906002)(4326008)(6486002)(33440700001)(66476007)(8676002)(4744005)(66946007)(66556008)(478600001)(86362001)(316002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: yjbZRoIJFGqatVPnT+0BHNIjzDEbAgv8ntyk5X1fzEBncBaep3ji37NQvJKLxYWUW6gPmB/lOF0cJK7zdshaKz1fM95vPELcbD/B8/ryDSEwuXiIRievseyRDYU6WMbfxqbtNunUJ92cothDTcL9KPpd8pQjTd1xoswL+gCu/zsHjTyCmk8P6awrl0/rC2PSBntMUKjBry87Q1GL1fa3LKDj7XORivChStFkz3TOYBG5kfqxTgLN2W0ydocLtCieGIV3LA6fHNABBZDqOMhEikIp1WsK9krv1CVnBqNYuaSo47kXPz1nE+YzSPnvA+CdRVa2Yd6dirslLEDaV1XcF0E+nr7NRJ+oRf3PlywCCjz26udA6BX51LVceLhYcpqrtAdBmbuSiMzjvp9NZ2H7db3I0pDyeP105gVN2UVToDHuqWC8IHXAK9ol1d+krnQDEGkHOcpi0oQ55TuO24ah79FBxikpqC+385Zr+ztsHUk= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94aedf82-a2bf-4e2b-e484-08d7f58e3cd1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:32:35.4222 (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: nvbn66es9nJOWOuSd9XBQ3lRrmJqSeqnHgwkc7wIlLT+lUN+f2HBA89/7XXIzdl3ESlpu51o1CcdyPPIT9geIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6637 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org This reverts commit d288bddd8374e0a043ac9dde64a1ae6a09411d74, since 'context_loaded' finally removed. Signed-off-by: Robin Gong --- drivers/dma/imx-sdma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 4d4477d..3d4aac9 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1338,7 +1338,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 Mon May 11 17:32:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540075 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 0BEB2913 for ; Mon, 11 May 2020 09:32:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E1D7020736 for ; Mon, 11 May 2020 09:32:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="mdZsupbc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729449AbgEKJcq (ORCPT ); Mon, 11 May 2020 05:32:46 -0400 Received: from mail-eopbgr00053.outbound.protection.outlook.com ([40.107.0.53]:42266 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729388AbgEKJco (ORCPT ); Mon, 11 May 2020 05:32:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TRlECSUZaEU/OMXQBsxDn1tVokQqFx9d58w/S83mDYBHK6mra6z/WGcL5DoBlKbe0vbLg0tatBzdmY8lXi1/9Sege6Jim+xjMOuhQQiaJ93xNSLVeBUT5+JcJx7ybkNj7gqBCXsr/Gwiirq/oBQ4Z0CDJSDMofw2wi1z+0+MCFTSi5KS0gO9VYediaNmwH32rLNtXZrSHaiPvAUNsqTT9D/Q7YYaA/S4tSOzGQHbAWdPrDQssC5GE7h4Z+k4alJf3OkfiS5EN1f9VWq3Ry9tDr9hzWCUHUD02RYnpMYuRAhne1ktEGALT4X6vTtMaWNo4j9RU8mQHTpl/eiodbAIrA== 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=FQU5tzf+t2t35X5OIBCsPxLxNbwkyyrYCJLs6DM0iyA=; b=aG/g78nJZsRFXbR+JCfMjud9aJnKCNuxpX5wHv/bgmMSctxOTVQKlNo4Tx3LWkaiaQC7vMgYn13DdqvffmOwNZZDDsUREikV13cI0soM5oeWXF6tFXiUqWhL78/XWZR1fGnZvr/4XUyfPYTSO8mNUBKdNdyc3aky8gvk/rFUk09pxKH3bAFzi5VSspyR6EPcHuSgz7GABKl4j9Wnz50oW2fif6nzyDwmVcmbrrfgs53l2JjbPQTVYaCvU/FfG8ARcSfXTqn7pPOgJCGAiPIymkL8vfm9wyBq5l73bhzSz4WgXyO5pdjrySeAyCpBJy8YTvTLuOCxdwLJOm5/LvZUkQ== 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=FQU5tzf+t2t35X5OIBCsPxLxNbwkyyrYCJLs6DM0iyA=; b=mdZsupbcLHNAyz0sCLdOzRVTbBxOG09ZZv5u3jA4ehzi6bPGFckJpOkigzcT3opzFMKObAR/fKFTvh6LeEF8MlZ5wmVv9t9YlVYU/F0DMBgWkyYQbpGXo4AFxtUUBb/viBqV3nYt87XwJCW+QtN1VMRlnGRvgQmxnqvP5JaXrVA= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6637.eurprd04.prod.outlook.com (2603:10a6:803:126::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 09:32:40 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:32:40 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 04/13] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Tue, 12 May 2020 01:32:27 +0800 Message-Id: <1589218356-17475-5-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:32:35 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2ebbaca4-111b-4230-6fa5-08d7f58e401e X-MS-TrafficTypeDiagnostic: VE1PR04MB6637:|VE1PR04MB6637: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:119; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VCtVB+q6u4vyvhSD9/JqxFnXVwjfPuvSwknaRSu9IPqocWSsiKa1UsGh66daCWQNBKdrk7FcOlZrWwi6nE3K1Sd4+Nn/E2c2NhX0El+MH5ZS9DJzd7XUkZVNVB7CqlFpJmfqYx/JndzD5rl6GKWZAInvSKJtXbj5otp2aPK9zEASv8X2CqqKSR0E8hIgp0IdOVi7as7JSnhUgW22s2HV9+FsRALYsmW57dB8HHC2zOCja8gExkeVYV7R1N8+wEXD+m53KJk/Ov1BpbUJASnOqjs5x71MfM0kw+nfOSJRUa32OCbInPCNCSZfgVtt1Y7OLWIDwO/n9oxDEZueWHL+JzrctV3uxyOTmYm7jf4WGE7900p6ZAD2grYpIL+QWiZvZPqejLqsgVbvRJ4d66H0647qnIzYB9u+O7NjiWqRC1OJewDGqFhphIaWT72Gl5Oo2MeFuTYZQ/l0lDoG+AQ0gJ86/jnMNR9WpBQf9Ur7OVLZQH6/Jl0O2np/3hX7tu6RoBN6HXB+wxJhjhgmuqaO4g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(33430700001)(8936002)(26005)(52116002)(6506007)(16526019)(2616005)(186003)(956004)(6666004)(6512007)(7416002)(5660300002)(2906002)(4326008)(6486002)(33440700001)(66476007)(8676002)(66946007)(66556008)(478600001)(86362001)(316002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: HOeWLxtEcflJh6z8al5YYq8nNlDSUW2i3jbHJb+/V091fDzLWQBPApUT1LSo7QAbiUlGtSatTB9IdCxy6a0+w4PlVcZnNEXQcUSw+nJaHkSTfOJRtcXlVOMk04TwF0jkie7GKyu55epnHsT0l5LIvT2mCMkZpnjh6s4kYi7mywY4k6LahRcJHtBnZ42NM2qEnhBpPmPqjPywwkxM8OUa/5Vmx6v19KBOxmipT49owX3WOPn9SUV1+L6BbegInh0xrTMRAXkusNNcK3/ZnTjoAWzdQlSzdHUdKn40h+kWhQCcoIWNgcuiaqr5wejTCMJWJXQfY9Hz/n4UHn1esAgNgjBHhRLRUaBeavh1ub0q5AZut/izA10EcMgqiZJsWUnMWNECakpuyY1RYXRBicz4figfKbMU8uw0Vw9B7+perl0q+md8pfTdqYYRR8Jn8tQed11z5AAV0S733xDhcgCuGgjrODHz6u4jMLc96Nh+6uc= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ebbaca4-111b-4230-6fa5-08d7f58e401e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:32:40.7641 (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: Oq5+etXpb5Droi8d6i9SOES/mKWAS/kiyb3R+falVWmI5nm91a4ctzdch9EB8wjMxIo8mvVux5O7nvSeFjD7+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6637 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org This reverts commit ad0d92d7ba6aecbe2705907c38ff8d8be4da1e9c, because in spi-imx case, burst length may be changed dynamically. Signed-off-by: Robin Gong --- drivers/dma/imx-sdma.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 3d4aac9..397f11d 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) From patchwork Mon May 11 17:32:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540079 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 3D19C913 for ; Mon, 11 May 2020 09:32:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24E3C218AC for ; Mon, 11 May 2020 09:32:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="OOXYQOcK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729388AbgEKJcu (ORCPT ); Mon, 11 May 2020 05:32:50 -0400 Received: from mail-eopbgr00053.outbound.protection.outlook.com ([40.107.0.53]:51937 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729459AbgEKJcu (ORCPT ); Mon, 11 May 2020 05:32:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AAp/GoHUXdz0qpLuUXearEoI06lLCoyKGqBeWGqjWEsvAjvtMjM5m7EM1PQ5ySFXDrAvRN4qIccm1JFijaL1YiPDugD1vz4Hww72E9rH99bhqMW2IX8GTZbM6iJaM73qHujuUL8dpVWFhM/4YdbwanSkScBfj0yiPiKKOTiY5Sv4DocOg37zeNyf/hH1TetypRFbjLYpNANzaHP5oWSUH98FHABC71G3YOycNPA3Q0sEpnKk5amZ5bvm3yITpDtN1piUXeglvS4zdAWLkb9d4J0ky9thiwKFtBbeZ49aCfLjPYXMa7z9+cR2l71G41NENrUjsPglefOvL1XjN8e5cg== 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=CRtb6xu+gu9ZrxAl+TPW+7oDi/VRvMarGC139iV3aBo=; b=TIwXTs/0hNYJnVcrqhHQMpTRxYYIELAPp/S59PP4R+oM+TZB1l5Z9Nl3A6YJdbdp+kq12Wp+5wiQzC5FXi43QJ8jjkv2uWqQd3udwkllpsPW3xVDTDGHPAO6VYPx7QSPi6/zhvBx6uDeYSgd2NobEjUuPuP5HFyjs55tCunzvo7URsRuV7iG2XXnBM9bFTRXyxnZqdcPa6BW5mL2vqe/vlfkr7y72Bppi2S+YB0/w7H7wUTJ9rl+pFjsV2FOXS4P3suVTSZS4kzqcTFBJQgumime1o7TROWF5h2SQD4UnKetbrPwEEiXHe0QPxRULWI8k1tr+4QzyZLany/i0O1sJQ== 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=CRtb6xu+gu9ZrxAl+TPW+7oDi/VRvMarGC139iV3aBo=; b=OOXYQOcKvGZYEpLxjYi3to0DSUzYq9f5m+p4EmmkXJ1tLSfvNXqeSXLvFSTGvYKr+TCt7BdPU3YKbiMEwXHsVm9CRPZU16UAmCX/tRcNKgBTFIVI9V1ahI+X3fp5yV1+VpRGU5yBMey2QRbWwyAj3iZFpg4Bw/iEh6NrTltHbBM= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6637.eurprd04.prod.outlook.com (2603:10a6:803:126::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 09:32:46 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:32:46 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 05/13] dmaengine: imx-sdma: remove dupilicated sdma_load_context Date: Tue, 12 May 2020 01:32:28 +0800 Message-Id: <1589218356-17475-6-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:32:41 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1a082271-e689-4689-9d5b-08d7f58e434e X-MS-TrafficTypeDiagnostic: VE1PR04MB6637:|VE1PR04MB6637: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X/KmZUUm4zdrAS18EzTXfwNdiOwfKBZ41hXO/9p+V/EUWqLRAokP5YOgOZKxE4V4uSgRkK+rpBG8AN7BUheXiqX6oKNUspWH+JwjM8ahcptLk6zdzwclV+FlS6I4XaDfSdSOvpi35T23aZkEpmz+vWi2d4JFnNaumaveDvc4tdy3vfDc2RxtZ7spqhrLDhO3q0s0MhTCGHitAfbiagxsEguFepv7PRL2DRi5P0cfYiZ1uLYPXiYufDud5QFXSv5cIST0BwXOdwUHUXRK+OvyAzBYpe4Bh0x7UZbbcwwop46S+jJRrynsaSK03exipFYKZnC2gRZr9DVJ7ETl/4nsj7Zb7iXvzCpYkKDIsoR/+WBh6lPfXv1DSbdNUfFkxVVl+azm5P86VuSoA7wnv0UjUNe3vI6Xj0pa1HjLkIwkbmB1gNx27VbZGzBYZF2BXMpuKkUare6IOWxwkn/1KCqjhFnjWjpyKjJgUycE2CqSPPDMu4gkyX/LI9RvCXWf9thevMDwQEXKbrtPfDe48YqSzw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(33430700001)(8936002)(26005)(52116002)(6506007)(16526019)(2616005)(186003)(956004)(6666004)(6512007)(7416002)(5660300002)(2906002)(4326008)(6486002)(33440700001)(66476007)(8676002)(4744005)(66946007)(66556008)(478600001)(86362001)(316002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: pKWfMmo5bg4hkVgmSIqqWI2oEPqEI+V3M+yji7NOUID9iSc9a6KDFy8XoF4DHOKi61CL+iIcKsY/646MWN4RIa/xCLNqeOq2fbVaTKb3VO2NwoXQKA9IoAv2AtqFZitO/KIyaflWyzqfHdnralbbd/ay2R/GyNJugUfV3gW2pwCrjbXRJk+ijrP0QRlhtCSvziUpzOmfe92JPu3JdhrgcNS3itajGI1JQIFYLF7ndb7fvi00Ujc0HBbUDla9mVLWhq+uiydVbeWwcBl+wVw8m4mlc8mRSTdmPjMvKBe8DEh5TtWXyH89eQOSAcBtCbiPqJ+OxqFx0BoWzbmPr+Q2a15Yt/+5JjerTV4LVlDq9ElWVkUDJaGRiMQud6+lcHQBf1nQWpi78xhE427RamCCYNzrb3hgLVFI0sIJHbEZ6kQvIZV03WN5BubYWpVkvgthWc9Qtv9OGp5y2RomkWM0F4DiOlf7mdYIyksFXaHcyzk= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a082271-e689-4689-9d5b-08d7f58e434e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:32:46.2539 (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: 1OhbURJ5p1dFm1CcOXH2cut+ULfoAVKaYxAMmSWdFqcNcNYcQsQDslOf10Jyy/KzvON7l8s5B7D0r0hns22Ftw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6637 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Since sdma_transfer_init() will do sdma_load_context before any sdma transfer, no need once more in sdma_config_channel(). Signed-off-by: Robin Gong Acked-by: Vinod Koul --- 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 397f11d..69ea44d 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 Mon May 11 17:32:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540085 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 C88B0139F for ; Mon, 11 May 2020 09:32:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF85424965 for ; Mon, 11 May 2020 09:32:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="XgolxBPH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729480AbgEKJc4 (ORCPT ); Mon, 11 May 2020 05:32:56 -0400 Received: from mail-eopbgr00074.outbound.protection.outlook.com ([40.107.0.74]:23550 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729305AbgEKJcz (ORCPT ); Mon, 11 May 2020 05:32:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HwlSZMU+o9EzMPl7UdP+UuIrp9qYmUcLUuOHlrqzyqs4IEVk3VYsP+QhUQLKgGn8loUkNVBJ8dkQdDVYGmstZkvp1DXcKdxLWoVE80EzxBoEzX6Gi5/5l5ikOjpcteVWBmr221D/K9tMjVtO3oBt2fRkv7OQNw0g5S+puPOwaPDSNk0K3ZS8YSnVjZs2T/46ssG51TR6mbK0bcxQra9FQbstKP8LCs/RSs5iIaYyrp0vBMRdOapxX4VweLUt1Z+MA4walJe3+bywJK2DHZSqa6lnNooXP+Pxv2m97dLuewKQkxj3W6U15ZpJcrAloX0q7O5QNLPDOMSDMyYetC1P8A== 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=DZVGY7HSfJlKI0KpbP6KFaPYGNl35gy4W2Hb3NamZjY=; b=enjz+HI7cheetYXI8W9oMyVWbw8dRlU/WreGeSIZ9xL1WdNeqqnupPwtYy55mYo862uJj5YYXlf8zGQufky1idTQ9r7cXoEOvp08/3NZmg5OdVW0GeoWggWBQz2Wt1lC2kIqRtDTcOoN8JW2sI2SHSmV5YXMZEOlSbInUuXN5b4nJsCNwaqyTiihjSyhCUWbpuXU0WT2nVOx/62AKdhqfmnF4QB48RE0uRLzp5gy/VADFieM/uGcENQi+OeW5A81QQf9r5ZtlqoFhJMFwN2GGhBiG00Vnz+0o2kl7rIoRqt8jQc41GlKPgIFQvTlMU4DL9lTAhkwFZeiILefzbFdxw== 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=DZVGY7HSfJlKI0KpbP6KFaPYGNl35gy4W2Hb3NamZjY=; b=XgolxBPHL1W3fk4J4CWTu6uDpoBOJK0m35Cbp3RcndredJdcoHPGfqcSWkfjDPX4wo2OCP15sfDXOQWtIDaAdpINekk4RnVb5ZSFkXBFXCWPX8gEdQ1OoA7gragbh8PYDS761G/nhzRQ2i+xkbUOqlAmbsy7E01LXTNzNze4SlI= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6637.eurprd04.prod.outlook.com (2603:10a6:803:126::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 09:32:51 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:32:51 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 06/13] dmaengine: imx-sdma: add mcu_2_ecspi script Date: Tue, 12 May 2020 01:32:29 +0800 Message-Id: <1589218356-17475-7-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:32:46 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8270c7c9-7e49-466a-6e3a-08d7f58e4696 X-MS-TrafficTypeDiagnostic: VE1PR04MB6637:|VE1PR04MB6637: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:361; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6NzsFOG296kQ1RCxW79YVHpchPhy7Kkwb0D8meld8scRUDb8FHM87cbUJ5KdxtNz4Zt+vH3v9+Mk5UX18hcle3tIBRXHi9F9c8UIIdojnfaGT3gwLLe4HQs5tzi+euKZS4HCM9EjHA62B2kc4foCJBcNmdteRDRpNszzNvSAm5rhKdxhgZdeEfIVovYAyhnCzyDoakrAp2U34Gtthv3DmuwtC3ncyYnaFdxJFlD77V9lbWfSJacxqq9ep/PPJMZHLERmkrXK4dYIMJSvO4V6dMd0q+Ch8ySSWxJeu3Gw7QgXt5DOd/ed2jCJw4Ozu9fxgkLsPqSN/2FyBvzBHvjUN5YMkrfRVgCRnDHjdntGUI7+uEUrsK5s6yHdG1RxnL3jRfWMj6pdYdqxied6UZVKpPog6l039rJ+jLJafcUX2WrV7o3oFPtDa6zOrk4yx4Rb7/kUBkmZKaaz1NuZ+JxSdBCxvjLWndjwllhheTkHN6n+phgDA7B0iWR1iKpdQ4kfB76Mr992XCoYjFKCVKB5yg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(33430700001)(8936002)(26005)(52116002)(6506007)(16526019)(2616005)(186003)(956004)(6666004)(6512007)(7416002)(5660300002)(2906002)(4326008)(6486002)(33440700001)(66476007)(8676002)(4744005)(66946007)(66556008)(478600001)(86362001)(316002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 5mW/A4pqNddUB6r/dhf6OaLp0i6qRV/hJzybr/M+YTH0dv1UJF9OplBA/cf00uYZKC1rLZjM7/QaGNRTSjX1I3yHUo/SLIFq6nGJUu0inASPeBrzFImLhu/t7lm7uNPOAPmmDcQCKOt/Q+LcPpa8lzSiospuBnbPftnfG2eq0qb+aDXE78yzFE7BbtRrYOS0P3ymxgu3hdtWkKB47TU4HMJxkE6GDMFzdYTHFG2XnUuLF/rSox+HhA7deoNOi7qScPA1hT/KRRKnHCCGaT1I3BUqSWgSGslg4HjgGIkVe7yO/is5ow2PuK2ThBu3v2afgXpYcHQayQudpjC+mwMHxNDP54uiQo45hT3THcmPsLLWDBRKR+T6Vwv8YpZw5IMj+Rk4COJUuHYtcxjlPY6x/0zkX45ZSrbKc9r2M+q9TuCuMTqv6TluHl1LV3GO8aT25cyJuIkcmRF/cpSFrKyfKKbFaHpaL9GEIia3X5WjpWQ= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8270c7c9-7e49-466a-6e3a-08d7f58e4696 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:32:51.7417 (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: TeD863tDW7rrcHXe+KL9/RteiZdQeikgIB1gsYZBv8/w16XwqKtYgsx0a9COJIPCtOPk+uNqpRsm5ReWYtwLQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6637 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add mcu_2_ecspi script to fix ecspi errata ERR009165. Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 69ea44d..e034375 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -920,6 +920,9 @@ 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; + break; case IMX_DMATYPE_EXT: case IMX_DMATYPE_SSI: case IMX_DMATYPE_SAI: From patchwork Mon May 11 17:32:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540089 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 74B9C913 for ; Mon, 11 May 2020 09:33:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 586A3207DD for ; Mon, 11 May 2020 09:33:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="MCJ8eAau" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729504AbgEKJdB (ORCPT ); Mon, 11 May 2020 05:33:01 -0400 Received: from mail-eopbgr00042.outbound.protection.outlook.com ([40.107.0.42]:29601 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729305AbgEKJdA (ORCPT ); Mon, 11 May 2020 05:33:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RhQT+LB0Z9mAW1gC73DiFyvnghh+FgbIBfAZtd6u/t8kkzf0rcqsped2xyKuc23hpq92jZosUe/kbdFS1uJCIC1OZCOWej+do1OdJc6HKGc8oLn+GJHLvwhUpM5qaWsFvKiq4gxGmvCpKTcyROKWcqC2VJD9nsZ5Hjy9kskA9MkkDp4o8IQkcSHLxoikoS5kqmnKTsUHUwIQk4BsFDfjbyyncN2m+PSKS7vK9G4uc092RXRa5npA/67BGWwetJ6ttpL5Sg7nINYPmHkBNNej6bQq+/vqUa6/BENKWHssuuk8fmVLDPP6nMNU3Cjnarzx/XA34Gmk8fsgNJ5kBeXdVg== 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=DPH6fqwENpMZpDGmX3HfiPkXiAHYaZSKePf7Hki9OEA=; b=bez35XE2ICexpi+DKVVxiGzLGcHGUTYs/J+j6G3D4nm5smdf49IqEuR8X4copIUnKKu7gJAwuIJC6okjYeMHd2B3ZpTDQ0OOrWfZXuP/xgt5Q4qQfxa5aG/hBy3+T28MccOQHvikTCeCmAVjFoDvVcRNJmV1DYa9UsP+tkgDory7AE3nHjQ5AMjwaisUyJTEytSY2j4fO+XPBdOE+LEJis0XmqPSG3qiZcWpHQWe6dQ35KSo6X+Bo42NnTKyFPvsUqXhmGnHltoS78nFu0zAuqtvp+0pezBDh8DJdMXr3Pr7bxugMqaDAxZI3ZqqT2ikQeEuMmqC0jgkpfsHtlIy7A== 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=DPH6fqwENpMZpDGmX3HfiPkXiAHYaZSKePf7Hki9OEA=; b=MCJ8eAau6nNogXbFH1bTgYekJTir/tEzK8S1WkrhcYUdEwpFrF/9S1rGvm4rBGPY89rrBlv0VSL5FoIXjsTVB/AXXX4hmlqO7IEtu4gU8HU72vyAhb6+wTP+fxGYuxrfT2AWsPvUJA/v2gO4JjxSS0UurMH/AOrF+BmawlHTs9E= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6637.eurprd04.prod.outlook.com (2603:10a6:803:126::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 09:32:57 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:32:57 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 07/13] spi: imx: fix ERR009165 Date: Tue, 12 May 2020 01:32:30 +0800 Message-Id: <1589218356-17475-8-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:32:52 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0b55bd47-d644-4538-d2f5-08d7f58e49d9 X-MS-TrafficTypeDiagnostic: VE1PR04MB6637:|VE1PR04MB6637: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +m98Q/b8yXtGLoG3r80vIGEP/FLRryTtCxX0YJx7p6Twv3LLqFR0bvoCgoW+m8/IpX9Q3NbzmjWReJzJcvgx7mr/ueNP3eYNmmmra0EVxYPqyYCSh7HDz4d0YQjuVGkemZGUovhJRBBza0veXhXnNC6aMZbxY2BvRXsT5A96SB0GiQueGUEZxPHIboPwwBjkfroQtgA+VciDOjtFXyuwZtuQE7qKfJ/+GcXlukjg8bGNIk+Bzk5HL+4UCoD+yKBbedHE0sfeRTzJ4V+OoNtNDEKVwllpglKlont8288L5XbrvQGJNgZ778rWbJpicvrdJqhK/wnrh8uPQV54qsAxirFKBYRV/xB+SrWFD7exzHIgv/yxikRo4NIzTlvWON0fxSPX3MwVs5IFD/WHCXH8Rsbcc7gI1Dgz2KIhTP36wnSa0efRLzkZYizQ2tplpKNV9weDk5x4+dinwW0VE6aUBvsNF8YKKakgWWFmt7VazFe7hRl09yD79Kt5F/97owUsvfR0PyMA0Xx8ljyjZsdto0NJKYHwNczOHYScpEQhBo9/N/9ZtxQqNct7ZkyqfjZeK08kEKvn32/lyxJXtqp1uwYoCP5AzYofns0kwlsYP0M= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(33430700001)(8936002)(26005)(52116002)(6506007)(16526019)(2616005)(186003)(956004)(6666004)(6512007)(7416002)(5660300002)(2906002)(4326008)(6486002)(33440700001)(66476007)(8676002)(66946007)(66556008)(478600001)(86362001)(316002)(966005)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 4h5U8aDX+ZpLI0POZpSU1ps55ov7C88GnFL2FfpgdWZ3Jn8IZ9Il2TUNx0wVkHe/2a/4dtfEgKj54KW/+5OsRyCCPNtYhgz8f/XR7Tg7gPeYSl6BcORwPsqrylXyG6C5gmtQFJ6gkvmaMzXap+Fo9FgULph0Z8Q2Vb7Grb1Na7+QBXtDtzOrRUivzIeG1eGklElNr3lNkVbg/GYrdY4TxpJrYwGM8SXsQHvDuOyZ0PMEH5MDgi97qHS0JU+kUMBqALOTzFevyzzDGXIbYB4vznGNOsNw8pRr3kBWQZ1ZfPkBW66LlquGUPc0UXK7qgJNQszOdOQI5mOd9uFal3zUkd1BfWjyvCO2tznQRxvb/0+jZjKMDVMfSzeHuWJRwZee0Vt7T6AeFFabIDnW9cUl6WPJqIYZ2s8cZMNnCLjwlzQtLud3Qf7k5l6glXESGrUBqSiTjqMCk0Vb8b636pWFmmijYHzJ9DVDKQmv+FgaxeQ= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b55bd47-d644-4538-d2f5-08d7f58e49d9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:32:57.1466 (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: 9v6g47BCZkM0lp6e3JKLMEWkfUfKpBfAlyxY2LEXMI23zbLcU06GEbW5ATixTOnj1hTwfzarPrrUuDulnuyWJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6637 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@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 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index f4f28a4..70df8e6 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -585,8 +585,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); @@ -617,7 +617,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); @@ -1171,7 +1171,11 @@ static int spi_imx_dma_configure(struct spi_master *master) tx.direction = DMA_MEM_TO_DEV; tx.dst_addr = spi_imx->base_phys + MXC_CSPITXDATA; tx.dst_addr_width = buswidth; - tx.dst_maxburst = spi_imx->wml; + /* + * For ERR009165 with tx_wml = 0 could enlarge burst size to fifo size + * to speed up fifo filling as possible. + */ + tx.dst_maxburst = spi_imx->devtype_data->fifo_size; ret = dmaengine_slave_config(master->dma_tx, &tx); if (ret) { dev_err(spi_imx->dev, "TX dma configuration failed with %d\n", ret); @@ -1265,10 +1269,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 Mon May 11 17:32:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540095 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 86F66186E for ; Mon, 11 May 2020 09:33:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64D2C2495C for ; Mon, 11 May 2020 09:33:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Z18v/fDu" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729518AbgEKJdH (ORCPT ); Mon, 11 May 2020 05:33:07 -0400 Received: from mail-eopbgr00074.outbound.protection.outlook.com ([40.107.0.74]:62113 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729305AbgEKJdG (ORCPT ); Mon, 11 May 2020 05:33:06 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IkAh9+MoLzJjTtIH9R9PMIb4T9GlDpaT5JLS2Zy9owHj3EZyq7WaIe5BGkpfauhV3rvqN5WH9LyOmXxFH0AvR60dNaC5A8imkWzBinGeN+yyf097wI/e66bh25AoGi/SjnmMSkRPF7RZUVOKJ72bsiPn2egCMMxOold9mj0tpS3Zxxksik57/5+qbrJYyFinIdV+DUTDlR+9KoQa1UelapvZ58GiygA3yvJDfH/8VldW1J7WXohK5aoD5+weRQww8xnoDXRfOEldeTDnbVg+s/GNRxPltWWtSXrdoQp+/rPwedrMmgp81r26k5BqAMjmwsinTAuzWRZ9p9Gd1d10/A== 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=DqmLvhcU+jWUPBsc+Lha7GCOZUjE8UdZPd2ceh3CHTM=; b=MDcH98dVTWSLKc4tKexz8ARlVX9N6SLPQFrvSOY4m4NFLYx4rVsZwuhVb4XNOKwP254sq46DPFCxHHTq/S17XlW+kX/LmiYkBG94Bhd+YB5pEICpGtYICYgk+srxIdfwhyshofi1ADgx6C/JHgHKzVYZiIHTGmupVTSIUVeCp6FytlXLxkMoI6Xy0kQXre6hK8+g0W3I3fcWtkflLyJrvml2cS+RG9GjZCn9YHv2pD8DFmltRZqiOxplRF9vlq3qx4CDBUe4VF33BrgGUHGmJS3L2m0RLqxXVphwqztVhoQXOo87/9mXviatlpzHTREYaHRhtYGVflFx/c2UepQehA== 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=DqmLvhcU+jWUPBsc+Lha7GCOZUjE8UdZPd2ceh3CHTM=; b=Z18v/fDuhErIuTor3K0jjYK9ePx5hLYZMVQn4XS8FzD1+4u5bsiAdzFNvPo49X5cmL5jKTU/8VZG77FYhN33j1wkXL9cMl/qU1gY/Bm3Z8ojrDCDJimDJ+awvf9HNwyxQEzVaNsq0FeXt8XdTrKW5K/tXBbDxNHs154CRMCy2Yg= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6637.eurprd04.prod.outlook.com (2603:10a6:803:126::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 09:33:02 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:33:02 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 08/13] spi: imx: remove ERR009165 workaround on i.mx6ul Date: Tue, 12 May 2020 01:32:31 +0800 Message-Id: <1589218356-17475-9-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:32:57 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0179bdb5-ac81-45f0-63de-08d7f58e4d12 X-MS-TrafficTypeDiagnostic: VE1PR04MB6637:|VE1PR04MB6637: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LSFy9/2sBLH77vt4Yb9Dy+eUtR3QjNjtBoz1DMBUSoEYDtP4OscP3hg2bzjIhF1nUUdNNDr32Z8Pj1jogyPmPdA+uGLA8+FFHGYUmxQkavZez6CYanMNU576UuxnTFaxxKlREeTTRDov71aQ/wESCDllB+pRU2j9xo8Gw9S/TG9m0omSdOQFVXg4T7oSnV3D9AMr/oFwXmTAm08UgxViH6wAMcwsqwCeNR7NdF/ceBgGiyKJEjywKSkqOU6wYb7315Gf3CR75IYeOYpwR440fqpoTprw/sWLG5GIgICQ7lx6iUORkl6kLenFL2YduFDGLSRRj524lePJNz2wDh9mVaiw//BbHRaaw+HQP9Xe+Co77gq27QaJNsBnhyTC2UDt8nY1hwoJJpS5ViaAAfdWD4krzBbUsBuYoD1noBPPB2297qFlf5R0DHWtnThx/OLIQivrNHDGy3nXks0LYnGkUUyTOHvugOKKdDdexK8cC6/QsSSDFjB3SN+a1ESAj1encdaxRP8O6mqZiTPwDbUKfv132X5ceRByUOh9MhVsPiK9YVnYztJoBlGVC9XIU9F3ytEu4RRRXaCScwM9GDk1+SYIVBa0KQ2koUf93HUpO4s= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(33430700001)(8936002)(26005)(52116002)(6506007)(16526019)(2616005)(186003)(956004)(6666004)(6512007)(7416002)(5660300002)(2906002)(4326008)(6486002)(33440700001)(66476007)(8676002)(66946007)(66556008)(478600001)(86362001)(316002)(966005)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 7uOLGZKMkzCdojMrw4J9pU04bVZWSfYm8deUHoqGyLPm2AwuNGssxk6iuMh/rlruJzFVm5cm4sw0kuvCEGnOjE8Us2h2OLYUdzfbabgYbWRuTh/LJHfSTA38nqg9e5tGJUCjbtCaVbPXfKBNc+FuKUpQw9wQWU8+Pjkq8GPRCIPwqf2Nzk5adfjUQ9J0jJJhRpm907Szlc37PpXzgC5gUgKDTe6mRcdO3m4GrIwaPbdX0/9di5qF/fHUI+aGK7mDESqcLrQjmR+izH8SZzOlAtspulTNUBt4W5sYboMA1ChADCx+tGbHBqd8GxhDJoAQbOedxiI5q54u7gGUbAedJcEQ/ezq30wfn7KRf5SpGvHoLiD3ZNkZscf/EOiMH20XelO3utwpDSm78l7THlSvyobLBWztzC8VIhOkj2Aqi1AiZAHCKEu9DLt9ZKpz4/QxGqEo3AyXZw2GQvvUONinYTPk5UvRZ2g+0DIxi+xFgpk= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0179bdb5-ac81-45f0-63de-08d7f58e4d12 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:33:02.5125 (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: RNr9AV7u/9RjQxq77BwHEscpTgSj/og0+kUHXnpbV4IcsAezqeELraMMBV2untuEGgvWmmIRs205UxJSedwpfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6637 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org ERR009165 fixed on i.mx6ul/6ull/6sll. All other i.mx6/7 and i.mx8m/8mm still need this errata. Please refer to nxp official errata document from https://www.nxp.com/ . For removing workaround on those chips. Add new i.mx6ul type. Signed-off-by: Robin Gong Acked-by: Mark Brown --- drivers/spi/spi-imx.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 70df8e6..a57edcb 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; @@ -75,6 +76,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; }; @@ -131,6 +137,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; @@ -585,8 +596,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); @@ -612,12 +629,16 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, static void mx51_setup_wml(struct spi_imx_data *spi_imx) { + u32 tx_wml = 0; + + if (spi_imx->devtype_data->tx_glitch_fixed) + tx_wml = spi_imx->wml; /* * Configure the DMA register: setup the watermark * and enable DMA request. */ writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) | - MX51_ECSPI_DMA_TX_WML(0) | + MX51_ECSPI_DMA_TX_WML(tx_wml) | MX51_ECSPI_DMA_RXT_WML(spi_imx->wml) | MX51_ECSPI_DMA_TEDEN | MX51_ECSPI_DMA_RXDEN | MX51_ECSPI_DMA_RXTDEN, spi_imx->base + MX51_ECSPI_DMA); @@ -1009,6 +1030,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", @@ -1032,6 +1070,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 */ } }; @@ -1044,6 +1085,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); @@ -1175,7 +1217,10 @@ static int spi_imx_dma_configure(struct spi_master *master) * For ERR009165 with tx_wml = 0 could enlarge burst size to fifo size * to speed up fifo filling as possible. */ - tx.dst_maxburst = spi_imx->devtype_data->fifo_size; + if (spi_imx->devtype_data->tx_glitch_fixed) + tx.dst_maxburst = spi_imx->wml; + else + tx.dst_maxburst = spi_imx->devtype_data->fifo_size; ret = dmaengine_slave_config(master->dma_tx, &tx); if (ret) { dev_err(spi_imx->dev, "TX dma configuration failed with %d\n", ret); @@ -1659,7 +1704,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 Mon May 11 17:32:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540097 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 8086A912 for ; Mon, 11 May 2020 09:33:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 682CF214DB for ; Mon, 11 May 2020 09:33:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="DdwExHro" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729534AbgEKJdN (ORCPT ); Mon, 11 May 2020 05:33:13 -0400 Received: from mail-eopbgr00068.outbound.protection.outlook.com ([40.107.0.68]:25615 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729305AbgEKJdM (ORCPT ); Mon, 11 May 2020 05:33:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nUe4h8jb4mlTBoBWfvkHIVG6uukxOlbGgg5pziXUOy/e9giTFumemSIM/bNhhtTzyx52mDjoc79OJI3diliRFIJLASYonhS8h0BT2zOgSM5O1S5C16qNs4H5tzOFaIYjiZlESehE/Qbboz2elVYsX0wcUXkOhngKEbGWk99oNVF7+AFCyfmPenbVN7o4sYThrHUjqD//Hq8N+hcJhydpaEUWRFk89grQ51w79bztGOYBYxcYPIcs0GxW23qhiuqwDkBjh2kGLRFC+Eb5utG3ng5MiFYEyDe9QU9nLD9BDOkcI4KjJIp9++bSgXZomVxOcXI+w+TI/JquFVJlLsnejg== 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=Dr6Ei1i3YJW53NQK/Zxc9pbm2UKMAyoPxP8UIWmFUkMEMibrO/uzK4hrAZjHYOedPfJcpMF+YVJmEYYEcferum+lf9nXm34cIvlbrRmf+5cescjPSUnexlN3fc/gAFc/euayzFiJzVD8UjPY2wadS22Xrm3wSMDzMflaX7Hm4MJpMdH8lx1wIs8QyQjzPVyHRnGTda6BZhV9143wMeKKsYlz9hp1iFoLvHIQrOSJLomY8rmlzeqduE4cAbFP70QhhWCZCqgZyfdAbzsQlWPBoZ3da4WjOZKZ3zernQaEw6wPRhG2JC4QqKOdy9fYWg/kpvhx/XnG304DjRrOHuw6ig== 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=DdwExHroUUn4/ECM9AGoyvnyfQsr2/X89oS0JSai9kTV1A9jHK2fagmKCU1b92muul9WdT8OG41HifvH9JOaYEvtBjW4IW7Bhd4pHZAWC1fTZNybl7011Z65vRwdWVuDs4uqKgDUyRQByTOd+g6nSsNnQwL81/apHot2uS+SqCE= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6637.eurprd04.prod.outlook.com (2603:10a6:803:126::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.33; Mon, 11 May 2020 09:33:08 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:33:08 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 09/13] spi: imx: add new i.mx6ul compatible name in binding doc Date: Tue, 12 May 2020 01:32:32 +0800 Message-Id: <1589218356-17475-10-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:33:02 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8dfb31ab-c213-4c48-138c-08d7f58e5046 X-MS-TrafficTypeDiagnostic: VE1PR04MB6637:|VE1PR04MB6637: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A1hlF/VuvGy7erhmQ2HiDqqqE+1VOUGVqhfxrrP5FWYjOzEKAb+kwmKhB1hbakAoiO7z5e44AE38YLHsZwIV2Q5YKEe5IA7sFqdR/qzTmr0oWPNozFBL4PaekuDOlQOCcNMF8r9quEHZR245LF8WZk4MfiwQmcfpo7J8K5HofFQ0tflj46Ckr1MsWMD3I6VgDUQ5+sRwbO4HXf3+QxQ3Y+CRHxURkClUQ9D69f+mAUHblzrHfC61++kZB64w6k8+c9WTdc97GkDDiQOPpmpWn3gUpgxdcmnKzKY5mSS0OPSZfCNBMfpRyjky3Xhy8+FS44imzL0VRkfyl7tGc+m4n1ttjkqWxfsrh1ZS0BwU8qD5L8uL7ZCN1ZMVXAFroSqyXg8kQfgabFtd1a+2dJtdOhMVupugTg4DvFv6tuAx3ggUrl9xxsqfotY5roVesKcv0xvcDk7Wpg8JTRcN5371Qm9Y4ZBtw6cEANvtoWCTI6QF7oW1lRU73x1uY9lL8fKCDEE0R3IFPAzA9LUZyh6mIw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(136003)(376002)(346002)(396003)(366004)(33430700001)(8936002)(26005)(52116002)(6506007)(16526019)(2616005)(186003)(956004)(6666004)(6512007)(7416002)(5660300002)(2906002)(4326008)(6486002)(33440700001)(66476007)(8676002)(66946007)(66556008)(478600001)(86362001)(316002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: t4Aje8EXEeUbFm7IukMZVnqPGhal59RwhDd3whRFEwCkC3Kpb4K//pnvsXM52qxyf2fvIBkvPZHGr1My3LxaKiLhvxcNEmRYcwWq8QsC7ycv1Z3MOcdExtx/OBv7nXHc05hberLxTjtZAhlkKC0Mld82rPVRCAPBtCxPbtmR9cTE6QBwzUq8x9E5cOXg5ZtNUEMK855ScwMrOUACZpcvo/TbkpiO4SSXe2fkLNcyWiVqUMDUIWmpnTBB3t4aOhrJzrULQZ6tOXlS8kYmnU0h/RcxfMpOnvCfO/Wie/lFHS+BpzVQxNPUhQjTo4/Ol7No4eyx18OEE45pUWdAQqsi+rezHOb66VSKkx03YWweHWSx8PYYA0ayf99sEheP/8SYE2JeWaxh0Y6Xj8LXx78LaVQf6TqXYhDE5AZkuWN8Ka/DwTnHc0OmKt0mL6rXqIMRKWxax1lOybZt9aN6xyLHZefhlqNGJkqG7EHawKKoKOY= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8dfb31ab-c213-4c48-138c-08d7f58e5046 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:33:08.1383 (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: F++7PwSzV+tFowILnxoF6iagp12PdNHLbeSzDHnfSRnNQRvP78lKrbR10im7zSvYS23indmeb11W6ClpQse5Hw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6637 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@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 Mon May 11 17:32:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540103 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 38855139F for ; Mon, 11 May 2020 09:33:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F5D6207FF for ; Mon, 11 May 2020 09:33:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="nkzFZn/J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729548AbgEKJdU (ORCPT ); Mon, 11 May 2020 05:33:20 -0400 Received: from mail-eopbgr130048.outbound.protection.outlook.com ([40.107.13.48]:53395 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729305AbgEKJdT (ORCPT ); Mon, 11 May 2020 05:33:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CnsgNxW0QzA9kAmuQ2ncwOZVbbUlI58tjvDn6MkbiJ1lJz4WH0svFBJ0+iLUntvNUgeGd9Kp2NAj83V0htDOEAURWjK+jbvDU5FKW844Ahd21IPOShKq9temn2QMP4q3xo0khkWfe6KT2s43Y3lZwe0ybFGw835u4SzUxn6ebrPCQJ1L9k/0tfksX1zQQtFOWua0sGoMz6kImvpMKi3rq3S7ihTA/+VULjGkri+HdVdTOmX4S3eXu7fyF8BgJqzp0Dv8BFSRFkWrN3nKqS3CpWXQxN+QIbdlLEjZV4DjN40GDw99P1gtRCU4p5rSFqj4l+CGAgLYeKBSu+I3vOIpNg== 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=m5QVrrxM5V3to/01OHwbgEbI8kMuWaoA4cgqaP9yoGU=; b=nQ1j5T9GUKEGWOLfYC/Gnj/8XyjiN63ve5otYSXevEN+w9/9s7p/nVGglNmESpSdx3jpow8utGuFFDCAncrudkEUUYgIkl74EP38umxdcNx6KtlNS/Oy2yXfS0yRoKZHe4zO48egC3DaJfPaf4FD1qZhtGKJVZFiM4B3f9R19WgBd76hAv6uJD57DdNQbp1kWUN7+iPOqv5OfjPgRWELEd4G1ZHgJVk+3dKCGfxO58W0d11ChlpxpaY0fevWcf2UrfM/ihPkXPS7R4skeCzeeLVeDeQI5ZK8TjMIfDgzYyKKbhmX79FL01nHPodxAYyYd/PtiHzf3KNrE5Ue+pbkAw== 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=m5QVrrxM5V3to/01OHwbgEbI8kMuWaoA4cgqaP9yoGU=; b=nkzFZn/JdeQFyPGjAHf2d7UOiQVAjFl6S090wYrhJhEYVrTzHM9q4nco+FMUb2AlQFM4DxipigKeFOiRSgmu9fgakRMqoJqgaaF1/tLiC814mj8EXvcossw6bsLb7GCLLRiGm/TCqcamLjZdYzWBUzA/ZugjDyvkYmeIpSY0d8U= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6733.eurprd04.prod.outlook.com (2603:10a6:803:11e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Mon, 11 May 2020 09:33:13 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:33:13 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 10/13] dmaengine: imx-sdma: remove ERR009165 on i.mx6ul Date: Tue, 12 May 2020 01:32:33 +0800 Message-Id: <1589218356-17475-11-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:33:08 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9a07ee4e-c4bd-4756-3e06-08d7f58e53a3 X-MS-TrafficTypeDiagnostic: VE1PR04MB6733:|VE1PR04MB6733: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y5O9KHOYQA6KTpp1pFti8+ug7NaAwh6p2itJx69s/yJAZ2D7GQHvGbNCF3Vp9pFB4tL4kR4BcrCCl9Q+Q3QoPDsR1c/s6ai7GSYNm/Gr11F0BpjliN15EPFqyQaYH2SjWXxVrrYP390y0zFvK7Jd8xMpgKT2W18kpCj4szVNHJqBrz4byVW/QcpO4E/jUWTr36fK9hed4SeqH5xbdDPAVob/bTyadUbT+J1ExW2kMTdB6ampLXDyuVzPoZ++nSbCTx33RzPEIl9Fw25RZEprsfneWUayR7AOMt4Ew2TDlUKo/3xbnIzAx3rE6PnpXH+cK65bX1ecadOhVfbv6gHFah3n8FzqVfTGmkWlDwVbXu9vhT4n2a0sP5eYdrtx4wrK6GQCQVQhYGpkMUeddhmMuYh8GvxcKTiRMBYEdDxkcUriCRf+CjxO0ZIZM8GZL3/yaWu5CBUykc2h1OM/7B6TMtMz4S3LKx+c+BXs0XvPNLNkY/L01rgCmunnskjVmaQNdyMq9odb+mDM0U5Qi1icTP40lomaFRVMo11duapllsL8fDD/y0M9yjtW14rqA//n7LCD4+dzpBsx0HIZZM9UdYg7A/bN0x1F4znU0BWoZeg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(346002)(136003)(366004)(39860400002)(396003)(33430700001)(5660300002)(66556008)(956004)(2616005)(7416002)(4326008)(6666004)(52116002)(478600001)(8936002)(86362001)(8676002)(966005)(26005)(33440700001)(66946007)(6486002)(6506007)(66476007)(36756003)(2906002)(316002)(6512007)(186003)(16526019);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: w8CI3su9fInfOw+XcLA1w4gUxxzm0CXXufHm1rpuqW8otEoAxojGCBg952ThpDFh16BIYbPVAg+MywGiiKOoWhiqCx09Bp3Q6cfF3AqRbEo6SvIsZ5+9ChCJ6gUQBGn2VnBiiyOske6RmrRPnbXde9NtYhGGsYYf+zEtPmV0np0MGGP/cGsL5HSsxSlLy5Poa73zrcO52ojGCu0KPBBy0xyKv0PW9qZO4o8b1txZ6FmbhfNF9rrUDX2H3cXpGhz13ORaqEx9qcn7fR4pkGMWFtGjtlcTyliqelKSn44MQmobveTDk68HYhjKMyyV9J+jT5E4YV0uijGxmmcV5wzlLCSVjD/DlGQGyyp2EtZnRrnM396b7BSmI/ooyIwAQARJ2qrv3vzjdZGVJ51reZqf7PPJ7eVUREYBDvXoRAQV+VjSmAMVdRs9LZIbHIGis/mw7QqoL7+qB+TTnWERBCs8LQ1bnzEjRnAYCuH5Bm4Vqws= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a07ee4e-c4bd-4756-3e06-08d7f58e53a3 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:33:13.5331 (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: v8Y8StJKVXMTYbNvuaA7Whtel15pXMhbLDhXCGa8S6+1HVug8wAHQG74B/kaGfI1oh58FTFoCv+w+dvRg9f86g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6733 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@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 e034375..22f9f20 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -419,6 +419,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 { @@ -539,6 +546,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, @@ -587,6 +601,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, }, { @@ -603,6 +620,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 */ } }; @@ -1169,8 +1187,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 Mon May 11 17:32:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540107 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 7A462139F for ; Mon, 11 May 2020 09:33:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 624772192A for ; Mon, 11 May 2020 09:33:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="oqcIn4rq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729563AbgEKJdY (ORCPT ); Mon, 11 May 2020 05:33:24 -0400 Received: from mail-eopbgr130048.outbound.protection.outlook.com ([40.107.13.48]:53395 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729392AbgEKJdX (ORCPT ); Mon, 11 May 2020 05:33:23 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S8BI/Qfph5iq+Z4d40eXA2yc+Ne6E+RLaf/Kuu/Rw66jG3It/+QfPt7mp2dx01iBMmJCWg5RGYTNZqtHundin6yo0kcXTD4a1Lv+8YekiNzuHMMnI3XrOond+YuucLOCPOfhXIbADSf+KQrSF2KZQcaFlnF/KcMDIv7tia7NRcUrw1d9dO0iDza6rp7F3yA9QXHP0Q+kweRJjUUv9TgfKkqhfK3/Wh6NW2d9PETzHytsl0n5BSM91FUVx9KhgqCWvU01KUQ08RrBUBILBH2DsWdpqdQMLzRz+TAwPvU6r7391wtA+dN2zrvz9QbEev/9ZCC2Zt/t81D9nTnZXg9SAQ== 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=MFhtMWDIriw+35CSA35bcR7FhPpr4oJiajyD83UsYhXfs4jQ+X/q3++D2jClF+uTfAsGaedbz2OxdLi8YEtovwAK9eHUnO4Jwmh2K/16lThx4+wIOwdT9nHRgWBNnlJxmh8/hnXnm5XbMeZId8/PfMITpGubJhbVJvNqNg/cIUab1pyhc/2MgPAiAXcnvO1sCn4MBIoIJTgzfA5Z7c7SgNLTI7w3yEhWigYnwl9RM2uRCZehzks7mfI1H6d8jPQiTRAGB1pwa+MTxIQ3+OBiVOk0NgE9PAkpH+27q+npZWP5JMMLt7M21IsAsGZ3qii2ZMDT+dFmWilPNv6bhNeaGA== 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=oqcIn4rqsKCLvQVbzp43vGft0QkieyVm+CevKDGhUik/2uKT1d4Xx4QaXbYtwRshBnUZTHNujoJOLUakHfPTccRvBTqRBjxdwjop5Cl+DwM/1SXzi9OZ3v2RtbwS66B9EgDjZzvnLKoDzkpyeSOZMheUiU5aUPlYEJvyU04hvPE= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6733.eurprd04.prod.outlook.com (2603:10a6:803:11e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Mon, 11 May 2020 09:33:19 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:33:19 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 11/13] dma: imx-sdma: add i.mx6ul compatible name Date: Tue, 12 May 2020 01:32:34 +0800 Message-Id: <1589218356-17475-12-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:33:13 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d9992a1c-1a3e-4256-e88c-08d7f58e56e1 X-MS-TrafficTypeDiagnostic: VE1PR04MB6733:|VE1PR04MB6733: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:632; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cxa8czbMVhOSy4zUSHk/G4NyVR+y16X3gg2hsY1J0sX2z7H6EI1G6j7IJYuDUSsThVdcAwZleLo6eOgyV8OOzn8lLDL6lVnD6kVDzfkuBhVXR47ckjsvcBNnfqC2QPptjWPD/u/0na/0AOUiG8M4nMjYuuRz7Ubu697frcSYv25k4dwS1/kPzvnn2nCFvBZJ5369Pjy0OZHZi4QyRRPzZxUUes5CHjksEy1+9mX6paKsrNypt5BzBxfsYXrFSsUqneUFGZ1iRWk7wKvCy+SCUrI1/OEjq1LdPS6pdiohydc5klGlzN2ngdQlHHGk0ATGMkPQzQeLE/AiPvXuqQWazJJYQ4z6wdS1OLDGKfwZ0bkd1CItVvuyC6ME9TnzOZtpFBMdFqyaZBlL3CuH2+NQZ9AmyO0GKvUosnyiJRFoTxel7CxLVj0b4A+lmhwUBWVBze3hdmxpN3c/Eo1DSz4Kr476ze9HbcY7rmWhWXtPSJCexeoDiq39ribQVbn74m4L7ibr4HWmJSwj9PelsJriYQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(346002)(136003)(366004)(39860400002)(396003)(33430700001)(5660300002)(66556008)(956004)(2616005)(7416002)(4326008)(6666004)(52116002)(478600001)(8936002)(4744005)(86362001)(8676002)(26005)(33440700001)(66946007)(6486002)(6506007)(66476007)(36756003)(2906002)(316002)(6512007)(186003)(16526019);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: m6Fne5r+0dj5euW9B1lXldAUed5BH8Qfxgeaj7f9lgZ5xmbABNZZnxekfYS2PqqGxNRWMdwhpdHoKAivhgFD92XiSnzo87oscxDyx4T1fd5BE/QxI+O1+5DneCbj7KjbFvCQatNWt2xc+NYYMinLmYaDJq9v86kCwRIpWoJhUsM5sIqDIHdVBWMKIy7cyt67Fju3B/D5SXE9+0C8J0FWBXcLCjaXNEdJnSLYCjx0IdbVMmmYe4jr2lKUUmo4VyN9EF7THBJz58TQW1icAHoVdVMEu3CcCXLwJTKS1bF1h+oSd9HRWpCI0bX7rKvw0zNYezVX1ZqYbqxRJ8w5dkqEtyPVnDSiqKLCons3n+SnhtuYHTT+a7x/wNbEnDQPiuKDk/QExupgUWJ06qv2bpxPcIg5/L8Uvf93uaflw2+vU+jXgtHkUSxEQ25dVbMBvLjjltL3klt0tOle//fiMp5Az366oH7q/2emR8kY7cRlW54= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9992a1c-1a3e-4256-e88c-08d7f58e56e1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:33:19.0899 (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: XI46rbyJgy7CReNYXb9vAEK7kDjNgg0iRCYMu7aT8L+fDrVReBVv/aAzzoqc/OVAS1/JCwYotTbGWY+E27RNQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6733 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add i.mx6ul compatible name in binding doc. Signed-off-by: Robin Gong Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt index c9e9740..12c316f 100644 --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt @@ -9,6 +9,7 @@ Required properties: "fsl,imx53-sdma" "fsl,imx6q-sdma" "fsl,imx7d-sdma" + "fsl,imx6ul-sdma" "fsl,imx8mq-sdma" "fsl,imx8mm-sdma" "fsl,imx8mn-sdma" From patchwork Mon May 11 17:32:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540109 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 76991139F for ; Mon, 11 May 2020 09:33:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 599D3207DD for ; Mon, 11 May 2020 09:33:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Pet+sTA/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729577AbgEKJd3 (ORCPT ); Mon, 11 May 2020 05:33:29 -0400 Received: from mail-eopbgr10077.outbound.protection.outlook.com ([40.107.1.77]:20653 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729572AbgEKJd3 (ORCPT ); Mon, 11 May 2020 05:33:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=egHAFdbAOEdrZ7eam8QDOxaKgoDY3TOs9amrxo6E5c5ymOm4ss5hn/qMbiTW6b4XDEP5id+YVssMZhO11+x4ZpNbbpy3LZMSQp56Hl1L99GxTPRx2QUGTysTmWeEN3b9WxFT5HIi21AQTmlwBcSpSCWgnmyl6uAep3Cb7jmH7IN5nxElts8SgwjjPFtOo+S4Ecddbk12HR0mmVmf6Zf/faOoqrS4J6JUMxWWma6w4u2mpp613GQhjM+mCYThz+nHOs+mZH/NRIhYehNa3Ni5TvB+a7OKcE7BV79JvCkpm2W8ZfrAQA0DnqJfmcE0N0yUI8vNze8fgSuRzuFMBwZ61Q== 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=bEsJd5W8L4lcrfETj5LCErO6H6I6ixkqKq0GzEKt13w=; b=j/3e2QheU+XJ/ZeiuA7J8wfWwGIWr27R+XVwfG4zLr3Dgv7zhMvO03w7N89aLDrzOoPPw4l/2MgPwkiv9UuPVwEXPghaxmu/Eex2ZX/+R2q2ZkMDmbO5/6RX9CwNoDbKZvRa7L/jatSYN4LsIOfUlYj4BeG82aHoodaAIymBQ6nSVMIprR+59ipOsIEmTbENGPJQ9gneQ0Zf0LDay1nh68dHSR4XyGA40QclIakmG5z2lIdLt5ufJ8vEdpt847iGDNpMpm+EFXrH1/wX5EMO5XN+6JRhv9sdxx/nG41NgEY5m6AYXOboWZzaWSZvDbqSLLvsdiW9fqKm/DrOmLdP0g== 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=bEsJd5W8L4lcrfETj5LCErO6H6I6ixkqKq0GzEKt13w=; b=Pet+sTA/eNnhpbOejg+SiQgf7yV6OdLW0+8q44qsSYlCLQl5YHk0CP1BTFg2BaxGRDlWUfNmaOnuf3mV3ZzYNowZTx0+gkAktD67oCbUIulyzNIliGvc+9MiYnp605N5gDEh1vEgLHIObaBdR2YZUx0jrv2Az4Jorzkk5x+8oMo= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6733.eurprd04.prod.outlook.com (2603:10a6:803:11e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Mon, 11 May 2020 09:33:24 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:33:24 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 12/13] dmaengine: imx-sdma: fix ecspi1 rx dma not work on i.mx8mm Date: Tue, 12 May 2020 01:32:35 +0800 Message-Id: <1589218356-17475-13-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:33:19 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6463945c-ec06-4cb2-f647-08d7f58e5a28 X-MS-TrafficTypeDiagnostic: VE1PR04MB6733:|VE1PR04MB6733: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YEMKt1s1fwqXUc1XY1lodP9oSgfB3/e/PDGT3Hl74yybBYzvYo6c/GXrpC9Xars+EbixzeX4YTMAWepRBMele0K+bjnpXKIXHU8WiePJOkwxlCHh+K9AMmM387t7gChA0cc1hCU/gTP5nO1vMXRshfDUwFU1BjaYg7bmH4A+HYHf2o9kbiUGXM82mKI6i3J/W4rUriFRI+4zjFcoVW9SSBgdgeyqZ79fVt+hleI/FpdzQlbN/Qh/KUCrSgXRcZzqNKKQnn0PCR5dC7TrhhPxHXyuDIYTn+JyVE+OccQWod+9/UMaIMVA/5U0PX9I/jB40XKLi5uXo1iTZy58uCjGCN9E5tAfH1wR7DtdTBlNcB88a/mdZFdUUBTHGb+OgeZ6OE56LRPsR0q9R0cIkOs5I0No/86yeWkSD+z9dTmosRaqrSdv68Y4vxbFXiQvfevaafbV0m/H2U/0V35Ohud/vsComOSZXKIL+BvbdOw3FCmN87pcoKnxNBfoG2v3OQ0Nndxx2+30A1I7ZhNOSiehJw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(346002)(136003)(366004)(39860400002)(396003)(33430700001)(5660300002)(66556008)(956004)(2616005)(7416002)(4326008)(6666004)(52116002)(478600001)(8936002)(86362001)(8676002)(26005)(33440700001)(66946007)(6486002)(6506007)(66476007)(36756003)(2906002)(316002)(6512007)(186003)(16526019);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: CVTXYoYqhQclTzxUq5atAKQRn35mtMXE8xxjHQ1ce08PJvw78Cj7vowed/oosP2FIwGKB2/GkfNBbNpn2/RwklHoDlTlMIOwqOi/qB7gOiZbxGwZRto6pUZymzeE7t93c3eS6wpMak+TJDNSj3cgEz01w/hiNyNg47E0VJH+H6bDSyYCfSHnau+sAKa3Bt9Di9mZBna1Sm0wcfahurn7j6po2bzDyhywsDE60Zq8WQqpn576QJxzhw0oX06WKrOMOnFKuiFsd0o/1zmpMwotYmC7J437U9ToYg0JUQOEKyewK3WtuNtffJCix75ak4YVmRUQoDXmM7whTAgtMHfN+9N4i4hccdAj3uOo1QnqlaMcwWPOBxSKlmR9pLMwzWfa/zatf3Dm4aPdQKitatAFnPnEQaN+BAtXsXRHSroMtylgWSShOLi5QKE3SVmuGCo5dgWrCfHTIBD08FJLTorbkoADNfr0yvphK0QLL9ijMSI= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6463945c-ec06-4cb2-f647-08d7f58e5a28 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:33:24.4588 (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: bRhRm3tigLzo4+8gYohlpH3rkD2rJSqfW4mTwSzdLVoSZLaajH53QPtEldKK/4Y3idfflaNM1Bdn7tgjmQ6jzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6733 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Because the number of ecspi1 rx event on i.mx8mm is 0, the condition check ignore such special case without dma channel enabled, which caused ecspi1 rx works failed. Actually, no need to check event_id0/event_id1 and replace checking 'event_id1' with 'DMA_DEV_TO_DEV', so that configure event_id1 only in case DEV_TO_DEV. Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 22f9f20..9d49aaf 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1183,7 +1183,7 @@ static int sdma_config_channel(struct dma_chan *chan) if ((sdmac->peripheral_type != IMX_DMATYPE_MEMORY) && (sdmac->peripheral_type != IMX_DMATYPE_DSP)) { /* Handle multiple event channels differently */ - if (sdmac->event_id1) { + if (sdmac->direction == DMA_DEV_TO_DEV) { if (sdmac->peripheral_type == IMX_DMATYPE_ASRC_SP || sdmac->peripheral_type == IMX_DMATYPE_ASRC) sdma_set_watermarklevel_for_p2p(sdmac); @@ -1351,9 +1351,9 @@ static void sdma_free_chan_resources(struct dma_chan *chan) sdma_channel_synchronize(chan); - if (sdmac->event_id0 >= 0) - sdma_event_disable(sdmac, sdmac->event_id0); - if (sdmac->event_id1) + sdma_event_disable(sdmac, sdmac->event_id0); + + if (sdmac->direction == DMA_DEV_TO_DEV) sdma_event_disable(sdmac, sdmac->event_id1); sdmac->event_id0 = 0; @@ -1651,13 +1651,11 @@ static int sdma_config(struct dma_chan *chan, memcpy(&sdmac->slave_config, dmaengine_cfg, sizeof(*dmaengine_cfg)); /* Set ENBLn earlier to make sure dma request triggered after that */ - if (sdmac->event_id0 >= 0) { - if (sdmac->event_id0 >= sdmac->sdma->drvdata->num_events) - return -EINVAL; - sdma_event_enable(sdmac, sdmac->event_id0); - } + if (sdmac->event_id0 >= sdmac->sdma->drvdata->num_events) + return -EINVAL; + sdma_event_enable(sdmac, sdmac->event_id0); - if (sdmac->event_id1) { + if (sdmac->direction == DMA_DEV_TO_DEV) { if (sdmac->event_id1 >= sdmac->sdma->drvdata->num_events) return -EINVAL; sdma_event_enable(sdmac, sdmac->event_id1); From patchwork Mon May 11 17:32:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 11540115 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 09970913 for ; Mon, 11 May 2020 09:33:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0CC0207DD for ; Mon, 11 May 2020 09:33:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="VOPTMp3k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729586AbgEKJdf (ORCPT ); Mon, 11 May 2020 05:33:35 -0400 Received: from mail-eopbgr130049.outbound.protection.outlook.com ([40.107.13.49]:30439 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729572AbgEKJde (ORCPT ); Mon, 11 May 2020 05:33:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MhMWncHtYtflvtOkWxFoSCRc5tVNuXimGuxhtt6fyjAv+X6cq74vFvWrSipUdOLoCY1YGRcXyPxwjZ8im1p+q5DujDDbF5OuOt/RdHQpoJ0MWiOh0V7FuHrJPii4EX561U4TXbDFo9Qu/+tsjB7GQxLwXB9gI2ZkIf2pDB8aafMQ19KMWL0uZUcp654EpyOWecfCxKG5eV7dWZhvUnafkE8vCaDn9SMQQA1qpz/Tap6YYWOCOoDrbONcuqwELIJLpqeXjjGW5nGNaQeh86MQrzgYhsAPXjUx5vZMfHHg1xkU8evLdZZdf9QNk/fjfPkOIwM6S64P01O1fscVv2SLuQ== 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=WEoEhyBGFSr+T0WmOOJnN6+RjSQtavc5N5PmyRlXha4=; b=S7EZFAvJ8yathjmhdTKFTHYQIkRMFaY2antZsHk33s7z+byuhszHd8I6JRHkHlkpgmKVZqX6Xkie3F9QOitd7BN5ben8ld1+6ao/Z6KV6fNp9OObpD/mHMhaVjsiL6Ftk/Z1yphE6ex/IDDlu5uMj4IW5rCrA22HDY+FmQ8AfFK821u1k2TvE3nE0/GB9LETfBZIFN/IBQrrEGrwrb6qKEoeDXencA2jokc3n7Jkata9ob2fjUzK5H6/eUIAt6wpl/dQvu4pYJQiDxaWwGkSJFUqEkrmLzQg0bk971qJBit2nOlWmAICsOr2R28Hetnyiin9p3pLx7drNyNdtzEWDw== 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=WEoEhyBGFSr+T0WmOOJnN6+RjSQtavc5N5PmyRlXha4=; b=VOPTMp3kRzeI9Al29ixpd0VhBn8fofs3l3lmmSP8fVWSH2HDOAI/Y+EkTk5gu79GSWKP6wtIEhI6QYP/d51AsZciSFcfwGvkJh4thxeJGaVTQbs9OcUQJMYA3dH0B2cSVAPThux35aK3YxaAkPsa4+WMEcUa4TQ6VGb3DjRetRA= Authentication-Results: pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) by VE1PR04MB6733.eurprd04.prod.outlook.com (2603:10a6:803:11e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Mon, 11 May 2020 09:33:30 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::d5f0:c948:6ab0:c2aa%4]) with mapi id 15.20.2979.033; Mon, 11 May 2020 09:33:30 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group, kernel@pengutronix.de, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 RESEND 13/13] dmaengine: imx-sdma: add uart rom script Date: Tue, 12 May 2020 01:32:36 +0800 Message-Id: <1589218356-17475-14-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> References: <1589218356-17475-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) To VE1PR04MB6638.eurprd04.prod.outlook.com (2603:10a6:803:119::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0141.apcprd06.prod.outlook.com (2603:1096:1:1f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2979.27 via Frontend Transport; Mon, 11 May 2020 09:33:24 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [119.31.174.66] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: bd6facc5-5efb-4906-7e82-08d7f58e5d65 X-MS-TrafficTypeDiagnostic: VE1PR04MB6733:|VE1PR04MB6733: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mdo5vcFbc9L2x6E13sHg5pWwqTUFVcnG72FKPcbN5GsPPfDxcpQye31HwwILK28on7/5fCYUia1ppwmq93l6haHrC8Ba+glSJns6oXz9boopEEvv0bkRq+LX21Ueq/+btY/2iEhRfxhYl+rZOslnSiCYlmSCpYP6/DkxELZuFwOWo88lR5L7mrfrRuEBMcIWPpCrHru+PCG8T2h+LyYgneHijZ3UyQB3niRs3XsXPhbP6i0dKXFLlRZ5Xl+9XQ1N1hXBDj4u7DUSQftq64+o6ZyHLgDMUvvUYhsOArYLmZsr2uRhBj8s70DDRSK0PiL5gfkmqgSNqo72YmYWkpxfQKfS/Cw2C0lMQxoXnPMkkjDgzEKvmKYldDfdGmLHM/+/0yaL/aLcVkPesCZ2eCksQlbkej6M683u8PbdU5ObK4NC1ExbxThy1axrBym+nWqV7sw/ithmkGPT9whcXxFIPAZI/gpMpwhzeMvEeMtyq7YQKRrfPLTNx7TynW7J1aKZnNrvipblwN/S2PRBV6gsSD2fU8nuO+dcW098cJOUEyVPSoRbfo9FqyEQWYt8mQfU5IN7AOYe7NMrzcACr0V+eehSsMTyk04g52sV/AVIQzk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR04MB6638.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(376002)(346002)(136003)(366004)(39860400002)(396003)(33430700001)(5660300002)(66556008)(956004)(2616005)(7416002)(4326008)(6666004)(52116002)(478600001)(8936002)(86362001)(8676002)(966005)(26005)(33440700001)(66946007)(6486002)(6506007)(66476007)(36756003)(2906002)(316002)(6512007)(186003)(16526019);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: /5fYM0WG0rhdYvy5a68mOObDswZoTwPJJaPzlgJXYUSwjAHQ3SXStlRQiVB6MdsP5qevJCDmM/dy0WnkKGx4KyYIqjTdc3lsxLTuFnlnKYF0x22RsMDHhcqH/L3JvbVWOL5OEYzb5G37TbuZuDRBSJI6iaeeyCNqILMbLb5StE8QsizIf7ngpX0EMATR6nEs2o6y43A5PMNnCQbPpUW9njhgABMBWyWPU4U7xvjyQGlXHUIb6Dp81KUDMbYIvHv/GvgRFZGfHljijOOnUMfX7Zbiy4g3bsvMpA6jD7JHypYYas1ybTEpMtvom/fQ86B0wyb0ycdFPGlJHnit2WBNtQ4nN880DhpOsHJ4phEU23CPHvucqM16O0VYCrqdOt1iH0Oad4dwVxVZ9baAJ73gqrNwobwQIdPiLVO8L1SWxbFbfK1OxBs7gJ5gIjGwdORhVHcohI3MD8u4UhvM+QZhhOHn3BDP3cSztYq1VeChMOI= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd6facc5-5efb-4906-7e82-08d7f58e5d65 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 09:33:29.9427 (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: XHDmzgnnD+saW92bZ4h8R6UC2D0j3SpLlICtzvg4/8i/ZZFWC6RohYS5AlzYL9OUmISeK9yoxOOhF+FxNirC2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6733 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@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 | 4 ++-- include/linux/platform_data/dma-imx-sdma.h | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 9d49aaf..01422e7 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1718,8 +1718,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) 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 */