From patchwork Wed Mar 11 16:36: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: 11431051 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 C820D139A for ; Wed, 11 Mar 2020 08:35:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DE40208E4 for ; Wed, 11 Mar 2020 08:35:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="n+UaLE4u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728649AbgCKIfZ (ORCPT ); Wed, 11 Mar 2020 04:35:25 -0400 Received: from mail-eopbgr10071.outbound.protection.outlook.com ([40.107.1.71]:63254 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728643AbgCKIfZ (ORCPT ); Wed, 11 Mar 2020 04:35:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VVdWYJUJJvahWHEAGahsL7jhcXJ4Y53Gz3mElKYB1Ob0FtFe7v7Oiv7PouGk0fkdJdcXM8Lx1EIrE195usD5rBvJCVXqBsMyZqfpysUe7xoT0B7xEyUF7jZX6T0FQNJMg/jP7vn+9n7TPj0Ttg5Sdb76vvCFXJHhYT5xj50WRsajDeWdhuY1+UkRM++GHM4c+8ISdPuKSkqvCx/ARDC+ChQp+Ldj9Js1g2YzugHDfiewB7GlT3XiCicv2Wq4N/WBFrkSqZFhtBmIW9yXYmfkc1lOsU1xpRJBstx6XCIeIwESKlOlUVdLMPaVbecxxTWZtJsrEvPb1HOzly3KpsWcpQ== 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=VwXwfzKL9FQ1R0cO3kICHgDJZimxMXanAXZDmkwuCfQ=; b=LxDEkQTVwKlzJjrqY+nd+CNFE5gO1wK/ujJfbgJQDG0NS5LbaPUihsUg3/gwMut1EYcQlh0DFD7HfxA8xqqeMlVZy0wWjvKIjdho4ESjMt4GNg0OwpJ/IeFYEZ/XTKBthHjUrCa/Kbsq7QOcYGDNc0yg0IBv84ifGIE2h443PrrV6SqIOXDDF31wEbJ3IQ70871VoVqGsucBQLWC/20vdyq6OSiPhMQWNZDjI0Tvv6lWBs1mkgyjYhVRD0WQTbvRs41mEg0kT4v7ybNt1wVpR/gzIGtQNr1ktsjkc+KAuDaQcuUq9YGWhuiFWw/V/M1vG4Y3JpMaZNyeG7fMcOPEAA== 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=VwXwfzKL9FQ1R0cO3kICHgDJZimxMXanAXZDmkwuCfQ=; b=n+UaLE4uRa14jguobhDoXjzGQ1KwkSGN7IQvOZ3yuID42W4RxkePd++XsbGnv+EyF83kNQT8XcGs/7MdwExusGVRkXid/30h055E0eG+60D8ntnm+HldXNa8CTeZ4HgVL/aYHBvK1wkVvNrnOAg90vmptqwleIE4NB/KpUQ6DyE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6702.eurprd04.prod.outlook.com (20.179.234.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 08:35:19 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:35:19 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 01/13] Revert "ARM: dts: imx6q: Use correct SDMA script for SPI5 core" Date: Thu, 12 Mar 2020 00:36:24 +0800 Message-Id: <1583944596-23410-2-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:35:14 +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: 316011ea-ac7b-408b-6868-08d7c59721cc X-MS-TrafficTypeDiagnostic: VE1PR04MB6702:|VE1PR04MB6702: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(346002)(396003)(376002)(39860400002)(136003)(199004)(956004)(6486002)(2616005)(2906002)(6666004)(7416002)(66476007)(66946007)(8676002)(66556008)(316002)(86362001)(52116002)(478600001)(81166006)(6512007)(26005)(81156014)(6506007)(8936002)(36756003)(5660300002)(16526019)(4326008)(186003)(921003)(32563001)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6702;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZlpU3Vs0EcoO/GG2Z/g8u/mlxpTTLXuVw7HTeEmNP+gV0x1MbrFj+1us2/X8D0K2+MC9UfEw91FAc6PQYW1NjSl2VaAdBy+f7EO7CWxvu6oPpQRwSzeythziN9dKruHfqTd6QoP4ev81buwUsskyVF7EV6P8w/wFQtHl77gy66pUwlJAhXs8h29lBauemD8MI/WWe5sHiwc+YSK1DAcXDY2D65gn6eInV+yBXGSnZHBpF1ybzpVJQq3hkF9odY5WUCsnwuICH17S8YfsBGHG+Lol2RSvmgPFnV2A2ubWNAkImkYT3xLKV96szgdhRPEH/zdPfzQ4cgNe/wX8/CUTMu7pzrHHmV3WG7DMRBGmBL7m8veSZ3QFNlJgjnZEZnBhhDoCJgjwGVgza5pYvuVTZV4PvjBwjgQpLSRiXL1rMjLfvGszRw0leEU3tPgSbt/gMGbGayuFavN+1nSqBNbjwcky8aDZKWIUjvFyfDkBJbqsVeejTxihBFFQ2WEZng9OrA3VNRq2OkRr7oVnHHRXHwLGF82v8UDm/LeaCftqo74uBeyn92k19iS2L2RdF+nHIQFYEmr5J/0NU88poOB3+hsqmLto81R+dCC6NIhymog= X-MS-Exchange-AntiSpam-MessageData: BCqiu8Zby/wRS2o49IJeknuR06UyqvDLyarAEGGZ2zYRYWkiKlXoG5iZFXMkjSN6b6dnf70cfOTezSVfbI1++8PJKUWG3egGAbqbxfjluDoUcOoqZNes5dfll4r4zY/wkgawM6cEZZUy9Fl2p9SDXw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 316011ea-ac7b-408b-6868-08d7c59721cc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:35:19.7260 (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: A3S51yReQXuEcewkFw4Q7h/zdZ7bUHvUxNDsXz72XTc5GeDM4vlInZRWTDXBj+I+rbvSDm3/47rRJ2OGdqRPdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6702 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org There are two ways for SDMA accessing SPBA devices: one is SDMA->AIPS ->SPBA(masterA port), another is SDMA->SPBA(masterC port). Please refer to the 'Figure 58-1. i.MX 6Dual/6Quad SPBA connectivity' of i.mx6DQ Reference Manual. SDMA provide the corresponding app_2_mcu/mcu_2_app and shp_2_mcu/mcu_2_shp script for such two options. So both AIPS and SPBA scripts should keep the same behaviour, the issue only caught in AIPS script sounds not solide. The issue is more likely as the ecspi errata ERR009165(http://www.nxp.com/docs/en/errata/IMX6DQCE.pdf): eCSPI: TXFIFO empty flag glitch can cause the current FIFO transfer to be sent twice So revert commit 'df07101e1c4a' firstly. Signed-off-by: Robin Gong --- 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 0fad13f..81f693e 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -175,7 +175,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 Wed Mar 11 16:36: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: 11431057 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 5850C92A for ; Wed, 11 Mar 2020 08:35:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E9C420848 for ; Wed, 11 Mar 2020 08:35:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="gg9quR1a" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728195AbgCKIfa (ORCPT ); Wed, 11 Mar 2020 04:35:30 -0400 Received: from mail-eopbgr80055.outbound.protection.outlook.com ([40.107.8.55]:58965 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728263AbgCKIfa (ORCPT ); Wed, 11 Mar 2020 04:35:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyZUfyxaSsVfJ9ueopj2GIqecgKgNloUCzYsRgx3UZDaRRhVLndCBMw0X58CP00IfQw/qL1KzYB4vIif8h2+nnGysde34ProFuCgj/ResPlJ2IanebiWVBak1wGeReUXVQrnoc1VKzB4CRq8aadHJHFzgDBJhRqTq37y3bRnLswsQdV8ZPNw/jdOUfCJXFx/bqIvSCH+sSbE6DKpHuQN6CL+z8hyi5NRgG2MY9dhT3/MO67vJF2gkZqe2MLt55oTTAiy9HJRhS1Mo5jZ840Q1ChxNQWBORWhZfhxcW0AtYrJaIfb5Anho9aIC+BOuDqGilObT45UEKa+d6fQFib15Q== 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=98+ZGiqA7mJBWYCJHE3+e27bEEc4CJ1c7Ivsg0bvtK4=; b=fipQxbXPT4Yq6vn14Uj2IWgAf0XFxC96mE1ejw28NwwNfB8AfLQ1WQEPPZE2W5RMbC/noOqhFqJBWTcmJOZJ91sUILcznWueOGK+oxxCvRbyvyBy2GSy3x1ctXeO19waAfMqfIgq2jcf5da+iez7tszQ5t6m1MfJAwSOWcUb5Zn03Y/hAz+wtpGh064dTxc8EvT9+F4E+dEpa0Eo7LpuS5EOOsvtVOgM5eWL1Y2h/+XvpiffpKcxy3DqtkBmBR60PPKx3GGCULsvfNYJUQJdRr2viaHccvyN71BQ1b2XmExMper4/uq6BGDwnxW9fVaekdn2LH2nZZRljg0i2m22bQ== 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=98+ZGiqA7mJBWYCJHE3+e27bEEc4CJ1c7Ivsg0bvtK4=; b=gg9quR1ae7AKQBbRcYvtUwNNLERDLQc9kbnbcIL9GGnp6pITmR/VR10dBDbaRdv/bF8B3AGngdgHQTu3UMzyEqGiiBqUSZXL/WQaWA7Z3gk3NKkrfLoPxXf6M7KOojGx7P1d0kRQPgfs1FR/ZdkNHI04+b8k2UNra60flltxePs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6702.eurprd04.prod.outlook.com (20.179.234.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 08:35:26 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:35:26 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 02/13] Revert "ARM: dts: imx6: Use correct SDMA script for SPI cores" Date: Thu, 12 Mar 2020 00:36:25 +0800 Message-Id: <1583944596-23410-3-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:35:20 +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: 58be8af1-34a7-41e2-b2c3-08d7c597254f X-MS-TrafficTypeDiagnostic: VE1PR04MB6702:|VE1PR04MB6702: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(346002)(396003)(376002)(39860400002)(136003)(199004)(956004)(6486002)(2616005)(2906002)(7416002)(66476007)(66946007)(8676002)(66556008)(316002)(86362001)(52116002)(478600001)(81166006)(6512007)(26005)(81156014)(6506007)(8936002)(36756003)(5660300002)(16526019)(4326008)(186003)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6702;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /ZgFsEthgXfHpC7oqXkf45rdDf4kaki/9lGd1/rVtulY0yT47kJrGDWIWunoATk3/f3VUlmWT5e+dumNIbwOjZCpSAIBvSNdJhF0aQM+agxUYKwyrw72S1N+TJG+xkCL8NJc9zGUMzTnA/z3oi9LK2FFY29xLo2VQGwmRrrk2mRKrNbBCJT/y4X2z10wCM0KAngIBBDeZQfJYlyRNsFF5prn6FLKwUjU9jBkO44KezDmk1bDzG++lcMSG+WlBywXBlTSqEiszeU2qY+zJjdhsa7KbVMFXE13dFEZBv8HooTmscq08BMeczpd9IrpcQN8QBRHwMeSjYsX+D2zqGjI/yRHiGxNqzVyr0lyL5iKORwHbS3AYSm9rSYl7pjo981JXGebLmOs5xh4e8NeSdUSHHS80fY9DA16byqgiFMuH/gMdkCNWC8xCZEE/ioGyS6Mh2kpZqvk5rE/spnAxcReupy4V85wS316/+zPAaFu4T/KN1sMYZ+ZbXdGsSv0c3GLorjBbuLB/zDFtXbUniMPSc4daq/BxM6Rsyyxpujq6Tacvp6FV4XRMd0e9jg9N+m0c2pS5vU4wRyasET+IJ5otg== X-MS-Exchange-AntiSpam-MessageData: pt/nSYXEza+W5/E32cYhFK62D8NGj+lIWpgBxu2EmQsXtfPjAw/cjTsYTw/mn2nXjXOTvNhU243UiqFjtVTnPSsauvam5Qc5MHvjWT4PyqzZ93dc11vP1dKEUrCPax+n3RYdfJuzplkwSaRkO3oT1A== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58be8af1-34a7-41e2-b2c3-08d7c597254f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:35:25.9474 (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: aGsCrege3c87no7vTq5h5QUMZpWjKO5DmCrGpa3TgtMAY0blIyZwnFbsZQnjMJ9S7OQbaPhoYhj0NPOQvkYArw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6702 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org There are two ways for SDMA accessing SPBA devices: one is SDMA->AIPS ->SPBA(masterA port), another is SDMA->SPBA(masterC port). Please refer to the 'Figure 58-1. i.MX 6Dual/6Quad SPBA connectivity' of i.mx6DQ Reference Manual. SDMA provide the corresponding app_2_mcu/mcu_2_app and shp_2_mcu/mcu_2_shp script for such two options. So both AIPS and SPBA scripts should keep the same behaviour, the issue only caught in AIPS script sounds not solide. The issue is more likely as the ecspi errata ERR009165(http://www.nxp.com/docs/en/errata/IMX6DQCE.pdf): eCSPI: TXFIFO empty flag glitch can cause the current FIFO transfer to be sent twice So revert commit 'dd4b487b32a3' firstly. Signed-off-by: Robin Gong --- 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 70fb8b5..ff197b5 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 Wed Mar 11 16:36: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: 11431061 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 4823C139A for ; Wed, 11 Mar 2020 08:35:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D50222522 for ; Wed, 11 Mar 2020 08:35:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="F57HeN6x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728263AbgCKIfg (ORCPT ); Wed, 11 Mar 2020 04:35:36 -0400 Received: from mail-eopbgr80087.outbound.protection.outlook.com ([40.107.8.87]:44707 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728678AbgCKIfg (ORCPT ); Wed, 11 Mar 2020 04:35:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eEUDeU9F9VstP0fGcUQUS+6Al6AWlQ/0mDmG8jb0o5yDBW2BmPIpk4KT61G3iPmsXREqiwp5dQcDcaiGIDBScpzeBQVyv32L6tQLJHcQ8twvqwAHdPaY6zXYvMNoGX2PNZ2tQUJ6T1dNsYT+2zZZ5w8D2a24NGQivUSC55OvtyGPEynFKWulXUCNKncNGVGGNcV1fDev3YVKkVpkgJG3RJ5pOhqubBP5d3SPNGGPmrkot0pslH7FfQgqVoTLv20W8H3QZJ9TVGb+kwi9d7nvYln7LIvC3eYogvPtfwvnBYujIxj6OW4pznNg723HboX1Wkp6KpS3vaCc1ypnvrTbGA== 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=QhLcEy9mEKwwVmXJV3EsIXASSmsrfPmPEb1gypb/w2qUXyFrDWLDYhHm8k8RUoGffQvuL//Ok+0KW8K3U1dnyt7ha3XjIPKzR0QJw/1+KuFgTtPbWD9uFPqlKla32Luskt2fXkXJAzeeDOtT2i9j9/2nxocB1/Xn9oP6H8QN7SUXy0L4+iTedkvVILTXYFCpHbQq4lDmPBDr9AQ/9Idl60s5G31qxZhScA4CeIHpriyy5GT6t/pNZSUyNUwHDoQDZqYBEopIkuwmFt0umRUq3viGz/kkv9NNfe9ZOLct1FR0H+bNnipEmNcCCxpKB4OjlXoIqTtwgi/7azVNbJO6pw== 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=F57HeN6xjNKeJwOQ1v/P4Gr2magtU4mgwK2dgX2YgAaEJyYUN8Q15/ZSW0iiXKbOUKeeI1vuPdQdk1q1d514YSG+LfpKP/UztnG6tx7YKC5AIV9vC2NMlY2kN1/Rs/SzZF+QMXR97pAIimRYUdf/l5u+ne/in97Vk+iNOUIU8/E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6702.eurprd04.prod.outlook.com (20.179.234.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 08:35:32 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:35:31 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 03/13] Revert "dmaengine: imx-sdma: fix context cache" Date: Thu, 12 Mar 2020 00:36:26 +0800 Message-Id: <1583944596-23410-4-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:35:26 +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: a9ec300a-ac6e-4bda-d6a7-08d7c5972906 X-MS-TrafficTypeDiagnostic: VE1PR04MB6702:|VE1PR04MB6702: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:59; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(346002)(396003)(376002)(39860400002)(136003)(199004)(4744005)(956004)(6486002)(2616005)(2906002)(7416002)(66476007)(66946007)(8676002)(66556008)(316002)(86362001)(52116002)(478600001)(81166006)(6512007)(26005)(81156014)(6506007)(8936002)(36756003)(5660300002)(16526019)(4326008)(186003)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6702;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EnqZeBkUO+hYpLdAfOVHe4cLhGGjlxTS80Le2noZjv9cZEPj/MSa3HfUse+jLmiQsWbbeM3g2CdAN55t1+0W/M6eUnrLKgKBh2hUOsF+FBpK6w4x519Z7f9AWCfZl0BoXai5agI65Zh35tlsUtmckZ7DNJaV9XyBrKeQEyGcLoZN7rTxDRcIn21O1FcF0zT0+NzUEFp6SR7duWHSXA98kZEY0rwmGsW4gqoFkG8vsxIS6uZGGRQHOOicsP2bUJ90UEnfuwl0e/D1F4MBq4RQRR0PuXoG7PgX/7G3dWh8wc/rreEOkUbhsQozmV2Nenu9w/JTedc0LWHNgjL6b3C9XXsCbCh/DFEG/g/vLGLWMIlT/0loxE1izPMhEgI43D4H/h2JOQuGO5XI3uUZvFeUpCiPryib9aV3e19A371uhvCanav3RINpru/wSOhqtrgFQaL6A4Y829eSiT2BIHyYsyc7VAlsjmhvQY9B20aldqzJftieM9ciGZEgnj7dLu/b X-MS-Exchange-AntiSpam-MessageData: wu5fDJhufkIf9YtTTtlYfRAV5DnWUaUawpUIgrGlE98jrkhilA7t6BcqcDWQalLCmE1vHot1QOR8rMI29yNlKEU5p076c2G8CYd0nfFk7SlYrchB6APCV1aPPI20hXqRXfmwf6vAvEG/QT2lZqq9NQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9ec300a-ac6e-4bda-d6a7-08d7c5972906 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:35:31.8260 (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: rTsx2X9syqSC8yPCSXW1E2XiHaqnEKu0JcI0nG7OWdRi6w3L6gt+rZ4vr2ikx8ExMcOpFguC3EiWkJzVKXz4BA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6702 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 Wed Mar 11 16:36: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: 11431067 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 B3C74139A for ; Wed, 11 Mar 2020 08:35:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88E45222D9 for ; Wed, 11 Mar 2020 08:35:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="U83t7Uyf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728698AbgCKIfn (ORCPT ); Wed, 11 Mar 2020 04:35:43 -0400 Received: from mail-eopbgr10060.outbound.protection.outlook.com ([40.107.1.60]:6725 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728643AbgCKIfn (ORCPT ); Wed, 11 Mar 2020 04:35:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DXKHsa5fkEBs3wUWZLOVEIk+wWjGd8ZJdVmvgDpWoYFR+dLFZXy0nJAa2IIEdzaf0X+MO3aMfbAMcv5qd5Et73MLyD/sA4tDOLNjnCUPI3dwMni4t2VQW8cOuTsoDfC5NlAvtgYSMleAUFKFuanQ5eVRgAYGaE1usyrNEh6GWpdpK7YSZbcoHKDOxAv2J4wBLTrCMNrHGCMpeRjhHJDeOMjsoERKTYXkdPTXG7OTuH9kTD1Fuwu48ZdUuKr1/CyOEQht0zyaY/XBrGJ3eBQWvwG1bNAalSrM4ilgrVeEuXjj4j1Bred5iTGn3QIhkH07R6bGLjVA6BlBKFtSt8PI3A== 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=fkIDSL/HOjIDhy2QDawZEcXWZJgB5qpPWmtmQTdWOE71GCNsT3fdD/5CnoDa884OjaA7j30YGFVv7BNqU5t21eJP5cxaqi3mpOHHmPwa86a+O3mt9j8/1bi4IWac05qLxqQnJSsebdJ+iGmK/uaDBBnvBMnSlph71Zo2M/vkAIatVP3tiCH+X9y1dYO648v4AhLW+HBStvUsQTKh/ttXFBG4n+Ydwu8lOyjhgT63ATMqHFJWULNx0oXaNkK2m2h+ck4PH/bljyTkf7jzVuUBHD0m1UdUIWCFJ88RhptY8D6cPJtk8lVa9iOvevYzNYtAZRGElAHkTz5SiNe7G/9p4g== 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=U83t7UyfS3wn0Vh39lQMTGH0/nhNgMXWpnOc/A2TUKGOAoHTQxH4a3IiGKsbiSowJP1IgJNK7sVhiigfCbkQZ+tYk17A88JBOI/SNxXPRdNzv2WJazd5A0w61ovvFltt/aewI66viqP9SaXECXfQsgxtV6Z/Axmzbwu/OxIsiPQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6702.eurprd04.prod.outlook.com (20.179.234.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 08:35:37 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:35:37 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 04/13] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Thu, 12 Mar 2020 00:36:27 +0800 Message-Id: <1583944596-23410-5-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:35:32 +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: 54c8e11b-09e9-43a9-b43b-08d7c5972c8e X-MS-TrafficTypeDiagnostic: VE1PR04MB6702:|VE1PR04MB6702: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:119; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(346002)(396003)(376002)(39860400002)(136003)(199004)(956004)(6486002)(2616005)(2906002)(6666004)(7416002)(66476007)(66946007)(8676002)(66556008)(316002)(86362001)(52116002)(478600001)(81166006)(6512007)(26005)(81156014)(6506007)(8936002)(36756003)(5660300002)(16526019)(4326008)(186003)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6702;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BWiYWxK/lbGWy+OVuEwoGIXG3kzkenGWR09BP5FUT73RuVWju3dGduIRT6t4ycSZeGYLPDNytQjtL7FTu36/6ohUNfnsRwqtMCy234lVh3Q4sywqGqYnyk8T7q8lvhAOsUmihl+RLForB9OZFLHEExwxLU/tKb8wJTP2K0t173JjMD1FPtuEqMLQVWVcTS/P2aob9fwAw+7Of5dNVYJ+ztzPOXUF2GxeR4j9tzWZmGXJmtvxpfTwfdbPxO6wmXk8Y5cjVIOLG1NNGII4SuacDapok40Rk3AJcWVRYm9HuhbTuh+lHPdPVhLRWD3pnxPeCDmM05VxhiEmG0aF5WT4IllqpKiCVBEjuSR8KsHWHhYOMqLIbYljusEd6SOPF+5fDtuyj1QPE7FfZ5yEA/nldlSv6WjDAkjYQ60gqLloxgHjO10Anytioh9rMoJQyGdUMNqt3V5qfeBsDHAoaK3fXtOFei6NDlLHetWv3OTCgzjbyqbevcHXo4KAdpiSoqPg X-MS-Exchange-AntiSpam-MessageData: qGBGjy9N+6ormD/ZsS2h9WLk6nyfUOrCh3o9f/8hOZDQbV82yDB5wfIvivsSkcA2PYNhzCFe5UGadHffO41ZsNkLZck8PWldhljrdUnB1SOuDy+6MXJVPc7JvSENNyI5qdu2smQouSP5cimZPBUVTg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54c8e11b-09e9-43a9-b43b-08d7c5972c8e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:35:37.6426 (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: KiUTSyY5Zvv2PdyoYTXWskqpKzJ6jRh7Gx5CsYMmMJzuWXEmZezd2Qu8oNRPB8F5gGRTmDtz0/pc/NrPT96/lg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6702 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org This reverts commit ad0d92d7ba6aecbe2705907c38ff8d8be4da1e9c, because in spi-imx case, burst length may be changed dynamically. Signed-off-by: Robin Gong --- 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 Wed Mar 11 16:36: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: 11431071 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 5308414BC for ; Wed, 11 Mar 2020 08:35:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 28A3822464 for ; Wed, 11 Mar 2020 08:35:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="b5hKlYyG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728678AbgCKIfs (ORCPT ); Wed, 11 Mar 2020 04:35:48 -0400 Received: from mail-am6eur05on2083.outbound.protection.outlook.com ([40.107.22.83]:39520 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728514AbgCKIfs (ORCPT ); Wed, 11 Mar 2020 04:35:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JP/f/hAGJWdH0dRvBYNLimWJg8mGieWUccLgNw7oBsb8CLoJYcWENQ2n2VE/KZf0Ze0eHJIR+1YqpMpqQiAdNOZM6M+n2RWXzM5WSrQiYUc8d05oKU1CG4l6OM/NVR/jeXkqtaDZdDBiDwWHc868OzSNqHsLL8FNjFYWtEOb4B7mobT8HlfAgUls9C/J7oSkYpiNTdwCTQ+nMNc0tvkSN8gbV7Ec1qXs9KxzU3myX59Gacvmi0QgcQLz0oAyLPwKnIhogZEuzf/Df0RUiOxRcJ5Kuw2BgtnRrZdwjGBytXWQ440d5g3a1tfWPJwIZkmfhCzD4jcYydU3SbayQXTpcA== 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=cF5XPv3JeEpg3VvVdqUG9yyffJwIMltdGOFxwYMzoVz7dhpbAOlqTJ3GsGZSWvpIYWhXQBUu2yS3NHyNy+SnMBkMw18bRal+ZcYYM9kN8P1V4EWY1B3Ymcq7ppAxrJeYLBnUrzfjAi7XG+bgjm6vMtnymXCBPf2JAsa2EcMJBCcUX3dAnDO0hpd07yxkzzr89vBChIPPWTmAN3Ow3zdjY1lGBjrXMdL6VcwnS4gbUeLKh1QY5IpiBkmbvUuqpO7qODASzEiHCn6z/4h2Hfws8qMwA/X40zYnoDgtmhyHGJ+o1Ym8YIDrPqzBKGmJu5zfrBptO5gIAjzq+fzHTqSynQ== 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=b5hKlYyG00SBJSpGiHMhVU33JDCG5X0VNAcjDOm4pruL8pdMwTt17G1bGSzchN2i6noq1Ug8LQIjxShckOPJUA8niZyrMmSD60fwblmAGqKCY/wKCXaxbX7gal8SQwRn3rk9xwmYMk4CfeoZ2tw/wqBH8HBAluZ3BzDKB4Fzfi4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6702.eurprd04.prod.outlook.com (20.179.234.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 08:35:43 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:35:43 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 05/13] dmaengine: imx-sdma: remove dupilicated sdma_load_context Date: Thu, 12 Mar 2020 00:36:28 +0800 Message-Id: <1583944596-23410-6-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:35:37 +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: 14033f02-a3b9-4467-9c09-08d7c5973000 X-MS-TrafficTypeDiagnostic: VE1PR04MB6702:|VE1PR04MB6702: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(346002)(396003)(376002)(39860400002)(136003)(199004)(4744005)(956004)(6486002)(2616005)(2906002)(6666004)(7416002)(66476007)(66946007)(8676002)(66556008)(316002)(86362001)(52116002)(478600001)(81166006)(6512007)(26005)(81156014)(6506007)(8936002)(36756003)(5660300002)(16526019)(4326008)(186003)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6702;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Melf9OCa/R4sQM7omoDPmFN03D/UU/3a1Ag3E3XQmTzL5Uc6RScbfXJULdq/TTAv16toO0pphZXiU1XIdKyzgKP6fQqSxKoGyha/WBeKRUSKsbEv837mFzdCzGn9Fs83PlJnj3wLpowQ2pF/f7JEEFhuewd/BeTjxqXxWozTUY1HhCLpGBGs6ffEOxoOrFcVCrZqlD/IspE74MKXwWVuTi5v53kWrpxTIoUsY8B2fOJkkjxNxP1I3d2wjq+k4fT/xQq1yhK9oophPfNlx0RL1DmllIyKMTaJfIW6VPLePeooaJuBbPPIpuY4rvjXXidYy0tnlYL2EviqUPamDwvHY886+UtOHO6n6I47rJ4sOnhy/NDVxQVY8cjFAfIX2Pdf7QMttkUI8t4RRF17JqOl3Rs68u5rCbXx64NVBjFv4WYour+uA6Tijg3sYIbBintg8eUi0uYSnGibeCL7sOhRrjNcJwJFtlGmQjEKopMe+PiR1YfbVetDM0SAhWgiGv2h X-MS-Exchange-AntiSpam-MessageData: liTbgfHsKWH7U65ocaBUnXDZb+Ee/fhJ7zdf+HJ8II+zYql6He6J9qm6O/Ox8rzJbXEr8qugQ9SuyVvDVpIBFAw4sc2TGbmTmYTznBiA6Tw7CPPIT4tbUPwmZzhn5pxSLW9ygjhyZOsD/Nz5JTNEQg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14033f02-a3b9-4467-9c09-08d7c5973000 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:35:43.5322 (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: ESSkCVKl4yr6p/kqYxhmwFJaiaCbNZtgyQUkEn37hjwqSlakInKGkZZBIPl4F+0ofy4PQga0KdRlqZ7XnUtIGw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6702 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Since sdma_transfer_init() will do sdma_load_context before any sdma transfer, no need once more in sdma_config_channel(). Signed-off-by: Robin Gong Acked-by: Vinod Koul --- 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 Wed Mar 11 16:36: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: 11431077 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 AE469139A for ; Wed, 11 Mar 2020 08:35:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8DAFE222D9 for ; Wed, 11 Mar 2020 08:35:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="fCxRMYUm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728732AbgCKIfy (ORCPT ); Wed, 11 Mar 2020 04:35:54 -0400 Received: from mail-vi1eur05on2057.outbound.protection.outlook.com ([40.107.21.57]:5249 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728731AbgCKIfx (ORCPT ); Wed, 11 Mar 2020 04:35:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b5SUwrKOIPVwSVKG2i1CXVHir2GUdoO9MFxme9ymTpL9hbks+sPOSQqTib5Yjuyl6ux+kWva+RpjievK8UqvgRC9wkedFQUG+4Y9EiPyvmwaENC7fN1fSFxnkBbgRIsatFUgYe/WdT+7Bxjvm8+uyj2u++M4/RJgK0ouotWy+sjtkrlGv8FiEh4gx/1E4Q5Igpz0fLe4DUAcXSa/v+903ECf8fqLSOwkiC7WU/zpwAThwQOpWxxfRp3AZjIG7yddEW7+WaMINhPlZ1fSc/8XJ1byoRbaybFI56f+yma6Tra2SY/+i9RV6CSXE7vhvDbLU0+kyjP3sJJ9xfdjAg4TAg== 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=nWEoqZ8hct8MlBSBrrphyLMrzmu+clZSs049tz57NiDaBZJ5u0ka09tAa4u39TGykIpPeJxrqfIQsrlalncj8qkl5ZrqGDFLMsVh3/dpImLpNby4HtXxfHLQCv8o/t4Im13OAv1TZRtv3luHjOBlZpxelrsfG6phPe2xmMNlhprK86YddZxraLEBSv7amXpS9zQa7FIxZJMnP3k5v7OaEbRITdTrklYPtAjQLI8V/lprqgLqPpqr+EuW/i1VB0VP7p5XbFQ5d1ZMPGqwS3ohjtd25LANpnYqsZwycX5fNjSkPC9hRuFS6NQOgI4p+6sxYAdBa0KjFjQYh6Ci/iqksA== 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=fCxRMYUmpi9ZwM/ahsQLJptAHv/PcUo8kbkdmMNtproVCbfMEPZd3guyjQdVSz1/Z9Exz89w1PTn3ffl+/+KEhsDlg1XUp4MmFpz4Z8/jQNdqS+hMprw5xMhfBSbELMcRDKOt/vcw31Y0KF4xrmY9BL23I5DsC9KP9ZE5AdROdw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6462.eurprd04.prod.outlook.com (20.179.232.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15; Wed, 11 Mar 2020 08:35:49 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:35:49 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 06/13] dmaengine: imx-sdma: add mcu_2_ecspi script Date: Thu, 12 Mar 2020 00:36:29 +0800 Message-Id: <1583944596-23410-7-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:35:43 +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: ff8cc8b6-5f86-4de6-600c-08d7c5973382 X-MS-TrafficTypeDiagnostic: VE1PR04MB6462:|VE1PR04MB6462: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:361; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(39860400002)(376002)(346002)(136003)(396003)(199004)(52116002)(7416002)(36756003)(5660300002)(6506007)(8936002)(478600001)(66556008)(66476007)(66946007)(6666004)(316002)(2906002)(86362001)(2616005)(956004)(4744005)(6486002)(81166006)(16526019)(186003)(81156014)(8676002)(6512007)(26005)(4326008)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6462;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +XWEZpbpTpIcvNoNPoNCa/sQIkngmk7ZCVP/gX0yCKshauRfWrz+tl+RKAybnD3r8/3QsiI6zYjuMfGJDnKtYGc+A+pJuVFIUMJgqb6JwxRJGJObCDjfeM9WwlaL7xJxRG5u6wjYpITJdN+jqK2NaUw+9DuAbg0nFnyCFPoji6cOTJiyOYJJe+ybtBmfqmnZrTpfo92PgCGi/Yy7bbyzFm6kme6ls19dFOMu4W11YZBQ2ZT01M2CtPfUNhiuVhrc8TmdaonR6qijdvDtaamRdqUQtG6JJWSFLER0C8l0EmMY8uRPoYPgjLd7LoNyfEEZPO1Et2FkTDd6yYlJFEOyCgs3o9Mk2ROXuXI40k7lFwLuR1yZlNLYg5GmeZV48ma3FASC4VFtkW2lEE+Na64EyY8zzJVWjBN/9YQY9VjwC1YFnRi3zJwny46wMHcmtrMlrdIhtv64DOP4Kwx8/07hbBI+xRkZZjZxbfN/zGTCKhczSP87GHgpYn49MBBqzpVF X-MS-Exchange-AntiSpam-MessageData: rzpRji5kb7Z2NGAMpq2fqesrr0CCKTIBw1mUq3093mqMHlJ7+ysoElxnWyyL/1GyW1gjJXBkBiUsmtliTcibRsIpslWCdYUxz6Ct2ZuPmWFSBkOH/69dgu8tF5VRkBFf2oh83iPJIkD/kELB46mbww== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff8cc8b6-5f86-4de6-600c-08d7c5973382 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:35:49.4248 (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: AGS5K2NIOcCLORJNI7VWwRsix+DdhNi9Mx1NPScd9YUfAwpKsPGfw4EOh5WQtfCoZD86a/hHzlkEdPltGYrZKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6462 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Add mcu_2_ecspi script to fix ecspi errata ERR009165. Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 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 Wed Mar 11 16:36: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: 11431091 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 B0AAB139A for ; Wed, 11 Mar 2020 08:36:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8589A222C3 for ; Wed, 11 Mar 2020 08:36:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="ira9LIB9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728631AbgCKIgN (ORCPT ); Wed, 11 Mar 2020 04:36:13 -0400 Received: from mail-am6eur05on2044.outbound.protection.outlook.com ([40.107.22.44]:6169 "EHLO EUR05-AM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728514AbgCKIgN (ORCPT ); Wed, 11 Mar 2020 04:36:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dzde6hBRNryBBdYxvuabtv1xfU+6zHvfUGdrqEBQmVuB/ynfTGAhMwgzgBfzkJpUJLdmxjsGPllLJX5RZo7Db07Ipzkr7EORG+H30XVH8mOTXSUKolBKVMPwdGhl7Wkknc1uCfei8fnCaMJZUynuhX2j1DUZ42pPAht8tk58XGCoH9JIiHZoVwxsRXOFl+GmO5KRvS9+N6yGY/5CyJPN18RzE2UPDlv0x8KFNwjbTt5UyTTzSMDp8Z+yo/mJVWcKvDGaf5QEhp44BeSCrTPq8BXceWD9OVq8yHu3RkRiR6P2wa2rssTmwl8A8BJXVP3ObscNBumiaV0mHa+WLTAgeg== 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=LV8kiZaRj9jvTRY4CvLgsXcbgKVqKjxNqiTMex+2l5LvABpljNB6X4WanoXM8tbpGCDMtwyhOxZPWouASsL/kItAOjbJ/6ZKKikBIQWwHUPC27AugDP0vQt+jHIQwg5L1ufxAvXlcCSypj4PeysS89PH1Vq/RtM4UCSq6C/SHl21yTsZki1XPlgUh2NN9kOhJXxh3OOREhcafstqDT53p9XceTq3+65i3qUGpfbNF/9f4WT47jxc79lQ40fMwBMgRtbEx2FexIb+JYh+LokZTESUH5OB4Qct3LEfYgiwjjhXeGueFjOmlMamI0q3Y1VPJ0f/aGxFpbWthh/IwLMIgA== 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=ira9LIB9aFZITcgeUToXQmMXbr+snP2wnYSIeEjZ0nWMJR7bfMc/eOxHgCL2CgPuKOIqS8Nc/ih9SAfpQt9LfbkFNZkFUki/92u0o+4pG7/oewi2dQkxyBp2sL2zIkbzwN5eAb4gRDHEB5JCQCFeVMR2OLTcEux4UsnqKwJoIa4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6702.eurprd04.prod.outlook.com (20.179.234.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 08:35:55 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:35:55 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 07/13] spi: imx: fix ERR009165 Date: Thu, 12 Mar 2020 00:36:30 +0800 Message-Id: <1583944596-23410-8-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:35:49 +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: 61a30c02-053b-4b58-d9c6-08d7c597370a X-MS-TrafficTypeDiagnostic: VE1PR04MB6702:|VE1PR04MB6702: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(346002)(396003)(376002)(39860400002)(136003)(199004)(966005)(956004)(6486002)(2616005)(2906002)(6666004)(7416002)(66476007)(66946007)(8676002)(66556008)(316002)(86362001)(52116002)(478600001)(81166006)(6512007)(26005)(81156014)(6506007)(8936002)(36756003)(5660300002)(16526019)(4326008)(186003)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6702;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OLOpfAqTmKEOxmjA+Eii9tPmuZmQ/buFZgtdCD2ThWJFpZ1tO/pUlEnwxDwco17a9w/OyLjskL0l/MbCNVSz14ueimhcf2FL58OFnKGSXYSC6WH0tKiELAVO55xNTUZBQg+GFHRrNOMPwAHrbHYl4pAMZg1E43Hg4PtYc8YlT6Qj8o3/6FfmY1RP29hyX9F9u25+ZEVtQI/nT1hS2IKG/S6UWWvKGTUmRrzOC4fKxwOz2IWk8rdpAkZuB26hOYnhocSIgyVUE8dhqubRhhJWLQsEtzDru1crLyNXVqcvcKA9kgHL674si2ok9xLmcpEMOjnGzZBOsvgdu8Nx657RuuA2OOHz2OGd21kXqTvI4HZhK3KpYarGnWNzwsF1D5VdSaXWNBY2rC/pgUEYxoXe1wMfk9WzJgeiw5FfNPEuBHzURmhr3jJBi44rlmipXClFpgPvGsApwO1a+k69pJiJ3Se7t5wh9aXLwkxfrWEZ1yFhFY0qwiqlrir7Ft8PMYxCz1yHHgnTgnMTggIFMT3sYQbzzrpoliSH2FArUJv6663S6uT0maEy35WwUORQtWrIwkeFQVtCXEePnejnBhWpUQ== X-MS-Exchange-AntiSpam-MessageData: SqUEIYYiiUT2aObU0pym0nzdTTZ+MaY9pxbqngICWlLuOhZCftOsh3os1+fysPlhhAVgffwfzS29eRFGAvFzd/nw0X4QRUZBxksbqde5AtpMmmkUmWJvTaxbiQADpEnrmbuuIxjpKD0JiNIJotIvyw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61a30c02-053b-4b58-d9c6-08d7c597370a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:35:55.2265 (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: a5cVnJrEybXoboHzTOfk8YdRQrP0zEFZhHzVIiJtYtAhpWwIxXMmW92HxK+vhBsVWrIR311lKLp2OiO151KXQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6702 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Change to XCH mode even in dma mode, please refer to the below errata: https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf Signed-off-by: Robin Gong Acked-by: Mark Brown --- drivers/spi/spi-imx.c | 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 Wed Mar 11 16:36: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: 11431079 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 D8D5C92A for ; Wed, 11 Mar 2020 08:36:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACE1620828 for ; Wed, 11 Mar 2020 08:36:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="DL6WNuId" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728572AbgCKIgF (ORCPT ); Wed, 11 Mar 2020 04:36:05 -0400 Received: from mail-eopbgr130050.outbound.protection.outlook.com ([40.107.13.50]:32750 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728585AbgCKIgF (ORCPT ); Wed, 11 Mar 2020 04:36:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=crxOXVT4kuBKfqLJCLqwQcVB+O/ZWMnVAdKyCj44tnhHYkA6Djn39yzVluS6rVxUD6X16TSeRmuImEoB/L4CNbgZx+sDnruxkRBN9Zcbep5NKTPX35jCq75Qyfi83vqe3EQJjiiyaYFoWkGIVFJSPVPkdaHc6/11iQjnqe3z/TukdCSXQrX127akoABXhxYfJGeWuXSmyh6U4xbDyr5Gz1vq0NXWGUfjQvDFRP2U95BWcYVnz2VShVM4owSKJTu7HPF3ot0pr+iSwxwhb/PL0V0VD7+Qrf/ttl1Pnd5M0XCrhYQ/rshYX1Dcqdhylk2eQMywB40NaBFK8x93S86Sqg== 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=a7rapiWMDNs0+7NB1gC3p9WWU97uPy58tf02trwdOiyBbsLvUCBq3qavsD6kdOUaByiKA3M5d5eKRaV7Yj78R31R3VZP4kqUPo2NamOel6IqCe3BP27cYCA0vgDQ8tVe00odilG2JmWgbUt3EHscij3RgQDsxm7WLMi4hfQhRmW+5w8YfLHyitLc4zNqhCSOLauRbhMHFeD6gzSfSfOItNC82KwPmoflvsVqLKCS2PRUKDOY7bgKbYUPBrZMCv9Sc10bcHTPAD0nDxDIaVKwbXamIeI3dow/ZfOqqOfYqztvIt21TNNrzAyuftBs62mUS4isKxr/K63cxh+HrJzv9w== 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=DL6WNuId9vtnlwCaO8cxtSARgXVEObpzgytJ3zaK9UAlfzy/RzDEdk8dD1So2MSkbs0cJLIU8Dk/JaE3pKPwknrucPU82UKOjX2SJoSEbvyk7vzuYdNaRbTZinGYCQYH5waYc22kq7GnaqPiEpOTUi8FOybioCWJ826tabVA9tg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6495.eurprd04.prod.outlook.com (20.179.233.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.17; Wed, 11 Mar 2020 08:36:01 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:36:01 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 08/13] spi: imx: remove ERR009165 workaround on i.mx6ul Date: Thu, 12 Mar 2020 00:36:31 +0800 Message-Id: <1583944596-23410-9-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:35:55 +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: 82e88627-9808-4e69-dbdf-08d7c5973a79 X-MS-TrafficTypeDiagnostic: VE1PR04MB6495:|VE1PR04MB6495: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(366004)(136003)(346002)(376002)(39860400002)(199004)(6506007)(8676002)(16526019)(186003)(956004)(2906002)(6512007)(66556008)(81156014)(66476007)(86362001)(2616005)(52116002)(26005)(6486002)(5660300002)(66946007)(7416002)(81166006)(8936002)(316002)(966005)(36756003)(478600001)(4326008)(6666004)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6495;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ubl1/0Wpe7h4zXoaoFM8cZ01yuaX3lRZeD6DKO0lRzlZmxz3Ux6KKv/w7YJUeicSsqKDywVqc+Uk+eLpCqZt/yPh/8pgmVmQ0rGVcPxPo55n1dOfN9GyzAryuG9R/NCMEW6CstsintYVO3lO09Dp7oh5zr6OyOToaGi9OIr8gC/a0HnATUedPe5MYUSC7UJUbYcZkfpA3ZTkrEWV+xsCLhmIkqrRKtd4empRxKeEqjHExRLTzeYgt3R2UXfPD2ZAfj0MvmQGLYwlDDdRocKLn6fpYdYmqeA9BmkqfGz3w9x0f3a0FhEmHPqebINgwXhWQpK71ZV4/NIDIPa7HNTHRy6ZnM2Q+ZNaLmx0lZzOnKEYb3POfOqZknJh74nNWQRC5KtrOzM8M+CayPpEFpzSd+O4reD/AyD4HWA5m2FnO9BEMEKUDcdeuH08BGdx4rhmrqo8qH3tgzWOmc6WhZO4sbQ1UMkJG5Y37yb6r3+YNCOUouyM8T+GqNkfDfIgMc8nRGhdk+478ztIiWdpJTxE8SloXDqRWaFZm98cWvg2Cw+ygmCAARF2lMD6hZWsgkDqddxrVV3F9YEH6FVQ1e/AYg== X-MS-Exchange-AntiSpam-MessageData: Vejpy37SCxdaDhXOJp2D95W/3+ivpBQ6XCzXsNJP7FOikVeuWuqXJX4K5CbiqxDEKnuYDzorLVqR4nljWsbGPxUDQ37bZdhPvyF3hvHYIgtqAZm/N0XioRK05gOhuAkyiiE3pwIHdaZGgAcrAeqEvQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82e88627-9808-4e69-dbdf-08d7c5973a79 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:36:00.9971 (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: dx/t3wXJSnmVIgs7+S2PB55YP0yeCxH11S6Kb3m+N1fo5md1hs0MVitX/kIbunukyzsZHERDVV9D0JygTiiIfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6495 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org ERR009165 fixed on i.mx6ul/6ull/6sll. All other i.mx6/7 and i.mx8m/8mm still need this errata. Please refer to nxp official errata document from https://www.nxp.com/ . For removing workaround on those chips. Add new i.mx6ul type. Signed-off-by: Robin Gong Acked-by: Mark Brown --- drivers/spi/spi-imx.c | 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 Wed Mar 11 16:36: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: 11431087 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 5CBE992A for ; Wed, 11 Mar 2020 08:36:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 33B9C222D9 for ; Wed, 11 Mar 2020 08:36:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="KW2db28Y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728339AbgCKIgK (ORCPT ); Wed, 11 Mar 2020 04:36:10 -0400 Received: from mail-vi1eur05on2059.outbound.protection.outlook.com ([40.107.21.59]:44737 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728255AbgCKIgK (ORCPT ); Wed, 11 Mar 2020 04:36:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gn+X8QHlzcTMs725QEX4VsziyPUCL8ymDw84D/s/Ra5b532fg9SuCuJS/livp0ZFNVEm6usQZexIjuFRsStrm6mm2vvpDCfxPHMkzUbsTOcffv4yfRd1wZWBlsTV70xtQZ4eSn4r8EW5o4wsp41Bu8hoLnWZavoOOVLz+hx681rh2jXbLOLp7XGa7XaOuBgxsHnkizKfI82G0Z+XTJhQqYI11FJzJvXjlTt/R6W1y5yqJXsq8nVO6jQkyplVAlST8BSf7ME1kZ7t/+pDmr1S/x7Vb3MsNKFxl+on4eFmmDibOZtpyZLtjxjlAC7Cx2QgL3XSihuDlS7LWlAEs/KBoA== 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=gzhzs+c5E4uwySFfk+kEyom9+8FQmwEOR9H39dPZkDKEPbzW7RvdvP5/RcGIaICFMrQ3m4ys5+79u0p7uyb25oDeGIQxIwV09ffzPkvKhikLYK1XxfGfNiWpY816ZMMggbVH8nmAv7xKhJwB3/923qm77p/bUc7qBCvQTu1lbY5y5dzHHZqjapWen2trw+vyVFlkZnO4mVKZp4HGxP4jzmeql3pizL7CbDs73JKDd0+BUJfbsmuj2QIJS31Khti+XOkT2xKk5ITcdyzam84MX57L1r4chRszBY/FORXEYDhiQOR7OyI53ZlpxtXQIRf5ztKVe2TzJC6Z0bcxwKWWPA== 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=KW2db28YnfXqA3nnd8OBOGiHMrXaLobqCMmoXlRzI2oJc2/ol3INdsX1/uO17sXTfbUyyaDjPaFNYiimH0GTxSX0J7zZjvuksVpE2v3HKGFYF2miy+StVOKHpsbQiDxb1EwTF55s4LX7gh6dd0xZmnXvjU+8jAoTX2CGbnksNFU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6462.eurprd04.prod.outlook.com (20.179.232.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15; Wed, 11 Mar 2020 08:36:07 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:36:07 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 09/13] spi: imx: add new i.mx6ul compatible name in binding doc Date: Thu, 12 Mar 2020 00:36:32 +0800 Message-Id: <1583944596-23410-10-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:36:01 +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: d6a05e07-c512-4f8e-a138-08d7c5973de9 X-MS-TrafficTypeDiagnostic: VE1PR04MB6462:|VE1PR04MB6462: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3276; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(39860400002)(376002)(346002)(136003)(396003)(199004)(52116002)(7416002)(36756003)(5660300002)(6506007)(8936002)(478600001)(66556008)(66476007)(66946007)(6666004)(316002)(2906002)(86362001)(2616005)(956004)(6486002)(81166006)(16526019)(186003)(81156014)(8676002)(6512007)(26005)(4326008)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6462;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pCNxtxeD98WbXbnn960p0paes+4HVsYLxhI5cQ6tEC6KbxyjltBHZk4THPL+gaRxHgvRsxATBSc6Qbyxkp22wMHa1+rmd5lw1mOer+g72AolhjlsMWL1tIYW08Ht/JBMbNgyKJTLqleYJPKFB3AxyCzGNWx8lOwcdEI/X5wSruTPZRHfBD1di0MQ4b1h1bLxpiLfIB8A37IV4HB40I121YMuLN6RTCvOJ3NBIS949bYEdrAkDfZxCD96wLvhhV72CpGQ5PWnPSa+O8Qc/K+lYqMZrC2TSr4Rixl1du7xQMSueksoO7KZp3WSVAiBFrro01cYI8/rJTxB/AfXRVZHmCstpYnAfa+M1MraqiQAivyHkHtTKGLnqlH04Jgoz3n0PCP6OWldTHh5ROzCoxmD9syt4zQUwRGbexMqruD4X1nouPiS98t/gOH/ccdL1ZKrQ65MiFLlj5oFnC9BjSG8on74tFODeSjlR7ji/JVIbTVeEkIuBsTRsKvfkD4uJo+j X-MS-Exchange-AntiSpam-MessageData: hl71z+TArBURQneG9e7fx45bDomQpjjEKuo0Y1M5qSye+WgJZX4GJmZJVt99ng1f0xukS3cafNZHb7ERw53/fVjww38pqZz/ZTIEZkZQkMTGTcTR6AEjA7vhhhQIig/MdCU1y941mpNKl1zmL5tqcw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6a05e07-c512-4f8e-a138-08d7c5973de9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:36:06.8817 (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: Y0rC4ZLoNgEs9MAuA/P4+vFBnR0q4TY0UboXm1F5vfcOxny/k+yRYPQSBJXNb3cTnUUctKmYxg5jSpsyff06Xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6462 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org ERR009165 fixed from i.mx6ul, add its compatible name in binding doc. Signed-off-by: Robin Gong Acked-by: Mark Brown Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt index 33bc58f..0a529ba 100644 --- a/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt +++ b/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt @@ -10,6 +10,7 @@ Required properties: - "fsl,imx35-cspi" for SPI compatible with the one integrated on i.MX35 - "fsl,imx51-ecspi" for SPI compatible with the one integrated on i.MX51 - "fsl,imx53-ecspi" for SPI compatible with the one integrated on i.MX53 and later Soc + - "fsl,imx6ul-ecspi" for SPI compatible with the one integrated on i.MX6UL and later Soc - "fsl,imx8mq-ecspi" for SPI compatible with the one integrated on i.MX8MQ - "fsl,imx8mm-ecspi" for SPI compatible with the one integrated on i.MX8MM - "fsl,imx8mn-ecspi" for SPI compatible with the one integrated on i.MX8MN From patchwork Wed Mar 11 16:36: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: 11431093 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 03E9314BC for ; Wed, 11 Mar 2020 08:36:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D73E020848 for ; Wed, 11 Mar 2020 08:36:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="RuEC6P4C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728514AbgCKIgR (ORCPT ); Wed, 11 Mar 2020 04:36:17 -0400 Received: from mail-vi1eur05on2051.outbound.protection.outlook.com ([40.107.21.51]:6181 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728783AbgCKIgQ (ORCPT ); Wed, 11 Mar 2020 04:36:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VquLrC3Lbq0hpbNzCmXApRSyeSQQQARhhVr8I6PzLWjpEMOUqVlla/xb6YM/+7O4X3f5YWS1+kr58Ozvwqum0mET8k5mU3hF849CiTnkrboaNr67nAPT2IYhtQ7xdHafn57eFo6qLlcRrpnB+2LDs3bmFA9IqZrTjEKlKxPs5klPNFPZ0mLRKIOdCKzdemVXswiKEBipcxnKJbMiUjduOR5OEIVrFh0LNoWMBXJ6cyCd9CXrQwD1BNTTr42TJpPXEnTzpFqxOBG4TqqyjTGAJ1wztNA9DlLVO62gRG7uElYL2VfhChDa3sdt1h0QpTeC8iqoype80ZrGuNBddAPW9Q== 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=oFXICM8iFZ0HnosdZcFBosD5D2WPOOEgmOlWkb3V2+JSEsep/quDDj15idNzgxCWLzjbbedzK85mm70bgaZ/Q3SAFcQJ1xBFZavsgrHxnhBDIi0dvWOhjuKCMzjIEhSyX4FkWTLn+toXFxJwrumZ3yvSLtDGMcGXVXRRBvWxwgULJHXnA6rA1CBdCBWJ7dE6uH+HAUJeMo4SyyGtrbVTbJ+acx0MR3EdtJ2hDSFhiow9VO+3P0AwRV+MdfRjpFMzhQ+0MzPj1ne+O0tBVw6vNFZ4yECeRpSvrr3p51jW3y54ecg/brqgWdLrpaDcY/+U/nNPBZI0IHnsuGFpWDQLwg== 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=RuEC6P4CGBLmV7ZIeFPSPx1NrVrc2KcT85ndMrCtNWmht0Bwe9/u6KBAYkt8W0fIyeQYnrt+ElQI7kVhxq4hy1Pzb+ABownNCgPlQ9UoduLcAVGn4qWpWLkYiCAXCKVzuDTbWnKIRnGhTTtPBEv/RPweJ9JMNif+qwHIfgbnMsc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6462.eurprd04.prod.outlook.com (20.179.232.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15; Wed, 11 Mar 2020 08:36:12 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:36:12 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 10/13] dmaengine: imx-sdma: remove ERR009165 on i.mx6ul Date: Thu, 12 Mar 2020 00:36:33 +0800 Message-Id: <1583944596-23410-11-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:36:07 +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: 59c27a2f-9216-4683-9015-08d7c5974172 X-MS-TrafficTypeDiagnostic: VE1PR04MB6462:|VE1PR04MB6462: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(39860400002)(376002)(346002)(136003)(396003)(199004)(52116002)(7416002)(36756003)(5660300002)(6506007)(8936002)(966005)(478600001)(66556008)(66476007)(66946007)(6666004)(316002)(2906002)(86362001)(2616005)(956004)(6486002)(81166006)(16526019)(186003)(81156014)(8676002)(6512007)(26005)(4326008)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6462;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QvldDmulQq258XGsLG/1pqsymH1mqrSv/i4SlrZL76aLA4FTBO3HsYNSonYejJdZyxkkocKHgtGQlWJ+hMndw/zX7+EjqJZPhdlU6TaRNFyGlYKTDpQP8hW/BPnXMwLl4eP6RlUuUcaLfxSCOj5YCr/3Pmidwa26nJQNd9C9S80fge1pf+VsyPT/YsQkothFD/reKqz1vL+dLk+ND4u4B2KvRgo3AnMXZxPTDbvJbyYcKC0MbTgbKbGO85d2XhxEZlBlVUaUDtg0a7L96t9nCzTMB7gSlnW8DcNaZe+nI6iizVO+YS7BHRhT2JlCj+mNYA352gJM7rkW2MOVpLVMxMamD1XgKlhBzkZDT74bsk5EHBo+UeS09HhYBBX+s9nbNzv7+iiSu9k0S1qo0//TujQoM+zXCtEHpFQdJV6rcOy6a4/OG+uGGawuiiqKAc4my/SyTOB0+do+Zm8zXugKRoylDJnO4HUHQZewJvZ/6WyiK7UbQQvb+IZvPIpLfcFZ8V8OgWtOLUI512zOjT4lrWfG7mdC0+EhrzUIUuhtBgSC3mx61K54bBf/Pxggl08xKUGUSsBO0+zPj68jwlgvMQ== X-MS-Exchange-AntiSpam-MessageData: CyhZNdVMmmxv5mTseaASWlNElTahm9d8KTCRmHjgmYzYZ4VR/wm0ED94KhAQrEcvjXCb0WG8K8fjIyYYvXhoEZOsFzftbv3965P/BYwBsrfia+1LNGAd4l2EuPTLYbrhuvMWx2vLjWDrfNWSdKZqAw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59c27a2f-9216-4683-9015-08d7c5974172 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:36:12.6764 (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: 6Lei2V69UAQRCmDxT1R1LSIvlPV3J2TdQTbdiWMt+AaPAEj6cYABG46IVO/E3FV7EWhY5Gi7MDDtz1VCAdTx7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6462 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org ECSPI issue fixed from i.mx6ul at hardware level, no need ERR009165 anymore on those chips such as i.mx8mq. Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 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 Wed Mar 11 16:36: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: 11431099 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 37B4392A for ; Wed, 11 Mar 2020 08:36:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1790321D7E for ; Wed, 11 Mar 2020 08:36:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="sr+rBfkf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728783AbgCKIgX (ORCPT ); Wed, 11 Mar 2020 04:36:23 -0400 Received: from mail-eopbgr30047.outbound.protection.outlook.com ([40.107.3.47]:1323 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728648AbgCKIgX (ORCPT ); Wed, 11 Mar 2020 04:36:23 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GySC8doXZGORfYpE4RsJbWhk9zTH6rC9HAPsh34l/+2r9LHCnLOZoO4UkLBAVHGmn/pcidfJNeqHLwENnAFhV3cRT0E6iyky3IYtoLTAdpDVZicRhoWjw1iR7Ua0ttZTt/0z1S5zKgwZX/1PGTPhigFQQ/vjQOhxQMr79zhhzFwqob79Jy8G8pSBpiRuU6kzh6HRwrver8+DEP07Di7QbeeCIFVEGivw2c4Szpsz9SOrbhAyqledYxxN1P84YHez7DDSXRvxM8j3I/5c7jnDugKvJnJ7ja+zkwIam7Albmhm/5GFCi9R9f5cC8XcJP1aEvhsjYtmCq0FYu5PkZTjwQ== 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=M2hunbdEPTnJLfMH0hMY7C0S5Q9k9lzfNHp5fWDZq01QPZ1LzBErOlR5aPgJBdoJAXMKHFw28+h0QS0W8dckUs43k1T1at8I69aG+vXFRqP/ai+L3WG3OfAoMoWqo+VuD60BpsiPvT00SdEOk6TGYK8YyLDLkVYNPbVKFwOk5+gFV7zuoYZbm937kUxNYHjsBaoC5LV0uPArEVpuIPRCZ01y74c/ojvwjy93BGs5CTWcOofl5HquSmUu2SR0ak6EGBIcF4lGteYOwajedyeqKQF8REIFb2Xa1QdoJNQoBIfTmRZZWPQZK8YeBcHi4xb2uUBeSTQ5/qcsRA1r3cHVlA== 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=sr+rBfkfLULJbcv4iJ05Aay4PyiZeUf6xTSKwEihnNBqer7qZrOuoIkvRovFpgv3TADArP7BGgD3lJNZ3NgUBxyrBZd4bJPgNn0gxZiuB/QZJnH6CBxzaefipH0XGBYKzTZs0HZaJ7WREdC3FjrXH0LFhyBd4yhnlTF/Jcj4CEU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6462.eurprd04.prod.outlook.com (20.179.232.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15; Wed, 11 Mar 2020 08:36:19 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:36:19 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 11/13] dma: imx-sdma: add i.mx6ul compatible name Date: Thu, 12 Mar 2020 00:36:34 +0800 Message-Id: <1583944596-23410-12-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:36: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: 0eb12153-e07b-4f6b-c18b-08d7c5974523 X-MS-TrafficTypeDiagnostic: VE1PR04MB6462:|VE1PR04MB6462: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:632; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(39860400002)(376002)(346002)(136003)(396003)(199004)(52116002)(7416002)(36756003)(5660300002)(6506007)(8936002)(478600001)(66556008)(66476007)(66946007)(6666004)(316002)(2906002)(86362001)(2616005)(956004)(4744005)(6486002)(81166006)(16526019)(186003)(81156014)(8676002)(6512007)(26005)(4326008)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6462;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vCGIbNPiytEedIPdAhSzPM1X0FqO/hg8eK/hrb9ml8W/ZuIcisbTpbIqhQbzi+VUEfbg1khEuC1CQ9dMwmXx5zrkkenJOKBbNNmtIKG6t+og0VnISu14bTqq4jFr9kGdC2IfCeKoeGxjnkYRJRhfKA/KMkTWdKPtZ6L4YzjcnfnjO89dALPhT7a2XcYc20cyw2BgTbN8lHoroQsLcuXpnKxU+ZzBBwPXiLxZFsS24+T2E79GoT22zKR3ZRMePr161ZjLntrhqwfFKigG6syXFE2FoG4BDx2/ojDhC0V5RuR+CqGtrOziO+nve9l8nviLtp/4lDnLT0T7ahFpandg0bK9GM0tNcSEndO+fSKUREy1dyzYp0WCTYhcY8NRtd9S/Lb3vTSZVZkXLCoAbcgxsJBv+8OSaUIU3Hd7J9SfyIAm48nBYJmJxdAjnd4cfF2JjP/T8HRqyEXzolLsQHoWP7umhSfD1+D0xMUbaXKmraNfKw97I4VhNEDwlKEe7E5o X-MS-Exchange-AntiSpam-MessageData: R70EXTXFaxvoZ3oMdHSYdulSKIEEoxG4oQu4v45e35hMPEd1U3VfDPmdSeiPxV/I+nk6/Vc5Sjui8NOMgrV9tCSp7p0KJGMmPGzH9btYLPBOSDpSWp6DBqRyVxM64p9NIkVpsTfU1tA7vaGBZPVxRQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0eb12153-e07b-4f6b-c18b-08d7c5974523 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:36:18.9987 (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: U9HDH1xH/oo6TMNoSyoDlT2qxnMYlAMR4xacUX3X8gA1o0j6yrm4N1Oz4pSS44MIcOAPfdQtnEwdJ6ANAJ1gBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6462 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Add i.mx6ul compatible name in binding doc. Signed-off-by: Robin Gong Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt index c9e9740..12c316f 100644 --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt @@ -9,6 +9,7 @@ Required properties: "fsl,imx53-sdma" "fsl,imx6q-sdma" "fsl,imx7d-sdma" + "fsl,imx6ul-sdma" "fsl,imx8mq-sdma" "fsl,imx8mm-sdma" "fsl,imx8mn-sdma" From patchwork Wed Mar 11 16:36: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: 11431103 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 EDB4A139A for ; Wed, 11 Mar 2020 08:36:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C31D4222C3 for ; Wed, 11 Mar 2020 08:36:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="RetKRGuJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728648AbgCKIg2 (ORCPT ); Wed, 11 Mar 2020 04:36:28 -0400 Received: from mail-eopbgr30085.outbound.protection.outlook.com ([40.107.3.85]:28975 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728605AbgCKIg2 (ORCPT ); Wed, 11 Mar 2020 04:36:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZO1gkrgaZ4X+orPaS6Jt0jds8/Rgci7Gfk48EgUQKURGz2tDfb9mXEIQ9RqTBIYlo4Yqfdwj9UyClNimaHElT8ArTNOqbzG/n5kCnSVD9YbOUIDrgDlyfpf1xQf2rdYaDSb+2Kvvbcha+9nDnHgJ2WdZIuC+pfDBJLiqURamEJMNDDGK3t9XeSju90By5jlzZsMByNQsZrBhKtr4ADT8fmk7Yah+dIG5JNRs60ncNDtc9HgZTcJLLD84OR+rTKLoLY/zoF45T0PTm1+RiIjJnaWmTBWPek4E9qym6+yzkKEk98v2ACdi6SuAiQxvcjcRxo3TXYIpsntxjXcUrjmpcA== 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=VKjHnz1HO68Z20JY8RmR3eO2kSI2cX5RKYnuteoqeXhLwn0mMyjvk8RZFRjVIZyFbDPfTx89Y5YfRDgebg+MeqEmKb/WKv8Xjjp7l9QYOmNcDA+pFoLtV7NsI9UNaMUDj6Xo9NrP9Y4XhHRT34QqZDsNb0y8Xd2VL5oVvph7mE63dznik7Cb7cYhOL1YVpoSac1EYINdBaAGQhIEVBSuf5RLS9GOyFJIw2T5XPdHZ/8y5bpJBf7/fNhBEVeVJvWAJoMUiZcQBdmPwDvRwBOHGD70sMgKUokyp+PbwEkhz8u3eAnJ+Oi3T7AjFWTAY3xR3pIBbZtgY/iVBj4RftPgTg== 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=RetKRGuJ0INWEHL+w7vRPDdPTVcJJcX4niEfpupxy9X82wpYWPg+WwWz950q82pykaCFm2Ibc8169Dg8YrOY6uCZskI6eThZJkEomNz9CEldWdoPQd5YARJlZV1Eim8DQhQwFiPFzuDkuoPwSHCR5DBgDFFa+rjK1FAG9+kAKoo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6462.eurprd04.prod.outlook.com (20.179.232.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15; Wed, 11 Mar 2020 08:36:24 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:36:24 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 12/13] dmaengine: imx-sdma: fix ecspi1 rx dma not work on i.mx8mm Date: Thu, 12 Mar 2020 00:36:35 +0800 Message-Id: <1583944596-23410-13-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:36: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: 1bd3c779-b199-4842-a3b3-08d7c59748a9 X-MS-TrafficTypeDiagnostic: VE1PR04MB6462:|VE1PR04MB6462: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(39860400002)(376002)(346002)(136003)(396003)(199004)(52116002)(7416002)(36756003)(5660300002)(6506007)(8936002)(478600001)(66556008)(66476007)(66946007)(6666004)(316002)(2906002)(86362001)(2616005)(956004)(6486002)(81166006)(16526019)(186003)(81156014)(8676002)(6512007)(26005)(4326008)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6462;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nzbEe7s5QZjWGSNlsTV7ccbfXEkRgUWQwfNt/5gqSqPBlm7AVRvJntyuDvlv1uetnp5y0D7O5sfeDFkKmEDz7JMwMxBFU4mnA229WD1ph1IzELk/lC6FuyoqtqYw7awp4XCy8X5BEwAQ/xIN/F+2SWRaVd4whsEWua4CcPi34vSFyuG2pkrQ6fc4oShBmqXOKVJzpjrB3A7xvh4bLciGF5xF85pMPwkwnLfO+NxgEdLe2twTmbmVvUfX8Uq+l0/0mKeyTSQ5oFztCJG5SGiytgeB0nJbts2ICD/+KZ88YwZPOIs9KiIO0HjXmHq9UVXFQ7n0Qkv2eLNizEGLD4Gfe40vwcFkxea48Aa1V1QDcKINKvdC3kVJS2FvN1xLZvhXuY7kKaZJJJKAwo7IbfeEx/xTH4oT7BNq9VxYg58tnTDqJaU2DBh57Ias3tu3bt+4Hp3NOlfbxPfnOB8GlrOl3KY4dwK95OUXgURjizGU74W7wGdkXpB9fW5i07To5+4O X-MS-Exchange-AntiSpam-MessageData: JdjZ2BH4Gz3bamWvGiXbgTmZCvlPhVbVQp5ifCFJh8WEGMhexRI2hkwgitqU//aPvvopB7qRSR4pIn62TTgylKKfnCStqNAi2HK5ux5ICTOG/3PfJTHhiCwCf04NwYIqlS8iKKJze7boUD7JULYY1g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1bd3c779-b199-4842-a3b3-08d7c59748a9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:36:24.7844 (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: kuyuThBMVase9JbwvmXo3kOfzEjKUOgKqj2grZBBb9EMN3sc1dFqp11hDs3kP7Rivw7wb4OLLf+w7VmDJ5w4MQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6462 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@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 Wed Mar 11 16:36: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: 11431107 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 B690992A for ; Wed, 11 Mar 2020 08:36:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C3FA208E4 for ; Wed, 11 Mar 2020 08:36:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="TChfvu36" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728879AbgCKIge (ORCPT ); Wed, 11 Mar 2020 04:36:34 -0400 Received: from mail-vi1eur05on2078.outbound.protection.outlook.com ([40.107.21.78]:6134 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728605AbgCKIgd (ORCPT ); Wed, 11 Mar 2020 04:36:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LS3Nap5szBbOWWDTplPJ6LN2uxI3Hu5MXpDDWrExOYjrXTt865SlV8eF9MAdk66Y2ZlxMcG95Jp4jQ4CMRjm4HrHl3cpTRwPDzLG9oq3vZydoQE2Wm+mezodGK9sVzELOI+tiHaiCDj+Ds230P17Je4FuzA7gJ5NH4Yrvo5WCyi28vPJ81OPsLCEQy7ZI345/1EeBPBlkucBnt2uB2WlkmyUe+Af5kInhUdAd7qTsT4MJzskJzSi9VWlznGCFqhBhwSDl82p+wzgM3H96osql6FwNsRuotqpIec3Nlgg/I3ec5VPHfhb0kWuq4a/XUEXpyHZmURXGxM8P05ujg2Ddw== 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=aGYReKMuaFUAz4Br6EqrUadobmZ2LX+yWE0Q3BPwe4PSpezLVAh/FnTCogQey+XNS5kcYFVIJAXHCiXIXpeUNbxz/iZWlzpxYIOJZ2fOBI6e3ZhdkBthUz22DwQ1OqcxNjTSzM/IMxaDRAHGfNKGp+fHCCkbGctsk0CrvYfArjCUfyEb5XZiPTk0djedPDkq9lD69kwJkYeXY9ZsHCckb3GhSTQxSJFWDQqpf+FoQQrLfaHsoZzXjqxGTiZzaKw1syrK+rVX3AcKNvhocaLjj4GvTDD83tLHaUtFOfgV4wFCiiZbVTM1DCFCN5zHx1toVPoyTl5/qzfQtCmWGvepWg== 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=TChfvu36NAVavV0pY+KGIhR/cbqldWO4K6kk2o/lU4xy5UNV97vGkbxMfN06OI2tq2jmk9LDYZSjN4Bk98yVw0zvfcd9prXX/Wh8OgGwMv/LGYgRMCAybkxAjICNOBOMxH6ls+LpRgosf/uCfw+UCGl1tS77B3V4ZijUyDADR6w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; Received: from VE1PR04MB6638.eurprd04.prod.outlook.com (20.179.232.15) by VE1PR04MB6462.eurprd04.prod.outlook.com (20.179.232.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.15; Wed, 11 Mar 2020 08:36:30 +0000 Received: from VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31]) by VE1PR04MB6638.eurprd04.prod.outlook.com ([fe80::490:6caa:24b:4a31%6]) with mapi id 15.20.2793.018; Wed, 11 Mar 2020 08:36:30 +0000 From: Robin Gong To: s.hauer@pengutronix.de, vkoul@kernel.org, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de, broonie@kernel.org, robh+dt@kernel.org, festevam@gmail.com, dan.j.williams@intel.com, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, l.stach@pengutronix.de, martin.fuzzey@flowbird.group Cc: 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 13/13] dmaengine: imx-sdma: add uart rom script Date: Thu, 12 Mar 2020 00:36:36 +0800 Message-Id: <1583944596-23410-14-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> References: <1583944596-23410-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) 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 SG2PR04CA0158.apcprd04.prod.outlook.com (2603:1096:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2793.15 via Frontend Transport; Wed, 11 Mar 2020 08:36:25 +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: bf9208a5-7ba0-4abf-0d88-08d7c5974c1f X-MS-TrafficTypeDiagnostic: VE1PR04MB6462:|VE1PR04MB6462: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 0339F89554 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(366004)(39860400002)(376002)(346002)(136003)(396003)(199004)(52116002)(7416002)(36756003)(5660300002)(6506007)(8936002)(966005)(478600001)(66556008)(66476007)(66946007)(6666004)(316002)(2906002)(86362001)(2616005)(956004)(6486002)(81166006)(16526019)(186003)(81156014)(8676002)(6512007)(26005)(4326008)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6462;H:VE1PR04MB6638.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: txh/e2uH6tqtFuTnhC3yrq3IVzhmMW7/rRJI5sGX4iJL0aUs7cv7VO8NcvWCuXiAquNcG4MRd9DCm2BbpAF02xBdr1OrQ/IHKoMq+pVR8CUnVrde6muVqHp+7xz6j3VjK7hdTWCtwLbpovziUBLb3ZV5Tz34+RjbxmJVE6+H0q3mjcuhZVcyjJpUO3B21a+4eHX8/jkR2RLjs9iZd7V8eBkn2/4Hstyytx9Y8ypmQ4OjL/I58wOHwitBWRjJo6CzoY9lxGRJfowZT3YTuXTaV1rDviiKnOCcfHCMBP/0IKwgkQVTkeBRceVwn2AeFtHPzW3xgtZ+3VFIbprnichFYkfitSWlAaR69KUFJndOojryOBsa0WDuSww4wr8mGYUx/5AALkexGgnzwW+a7IwFjuw/K+O/bMkBDkfeX47f4bPAf8TAD1Xj+UeD5xwiCtYqhQWyni2DBy/2XhTi9ktyqr2ReHY6+w7su+9zksLfcdIqlOgaobtCvULHqpIzpcc7h94Jo2oAB0bBbFhNYABgvX5iF5i4xvtJ8Dp56vjUFlwpyeCy8A6fCl5jgXM3xnYmwyU7kkBWZG2PJ/Ky/Hz9BQ== X-MS-Exchange-AntiSpam-MessageData: BaLbwh/7TZc7vJX958bxr4Z2mQlzh5ffh+LLv2+Q1Jo2pdYniTyTdROqAYYlhwe4AcIZ40eMw9vWRU4zq7E+AhBLYrRMU+3Vb7lwa7WVy8UJ7TKpY5l+lmP5QxW+Pm4WUIi94bIDppuOR1RmjcEihA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf9208a5-7ba0-4abf-0d88-08d7c5974c1f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2020 08:36:30.5880 (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: eviAbhssZLkjgpGF5l/FMEfAfp4haUdAEH1Yl+9lghiW9+Z/RRt/5SGET7D7tx4VybzZMWYHifwwClKB7Sp9gw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6462 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org For the compatibility of NXP internal legacy kernel before 4.19 which is based on uart ram script and upstreaming kernel based on uart rom script, add both uart ram/rom script in latest sdma firmware. By default uart rom script used. Besides, add two multi-fifo scripts for SAI/PDM on i.mx8m/8mm and add back qspi script miss for v4(i.mx7d/8m/8mm family, but v3 is for i.mx6). rom script: uart_2_mcu_addr uartsh_2_mcu_addr /* through spba bus */ am script: uart_2_mcu_ram_addr uartsh_2_mcu_ram_addr /* through spba bus */ Please get latest sdma firmware from the below and put them into the path (/lib/firmware/imx/sdma/): https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git /tree/imx/sdma Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 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 */