From patchwork Wed May 20 20:34:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 214618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DATE_IN_FUTURE_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A69FEC433E0 for ; Wed, 20 May 2020 12:34:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81F9020756 for ; Wed, 20 May 2020 12:34:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="RfMk337X" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726452AbgETMeO (ORCPT ); Wed, 20 May 2020 08:34:14 -0400 Received: from mail-eopbgr00057.outbound.protection.outlook.com ([40.107.0.57]:18311 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727027AbgETMeL (ORCPT ); Wed, 20 May 2020 08:34:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hEdoUFePiZkIsw4CqqrIOdZYMUUXVE2f7KCuiIxX7d1JMav3C2tCaEPMMve2Li1mb+VbgxjovRptgjTmEqYkwR7TEUixU4gPgxzjIy71lYh4YcDa7YBWFR1lDIqRatE5O7Fi+dLR39+0VBFG9UK8Rfhd0jfgHwzuZ3FZ9bxDG0PI+XY/NYS0Ka6kTamtoQvjRyKOwJARm96gG5XkeQRix+8+Cd/DXfezYVtuCGvtC9o1yQd4SACG655iBuSU4z4LdQkZlyw9T/52Na2XkdUnGO9jXZIFwu71dvg36TyALEWDgg3kUKUOXZsQmk/imhsNRnOw73gaa5tryYW0GbBEBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kkWel5GTo4Ihj7UHKviP/TaeYL/ZKKWPea2xxel30eY=; b=jogScNNwimgJX8thUYjeY2t0SkX5ekAomqlCaF4x4o9l3F2KlJoEkS2QjI8H1wsviYjctvcTnNHoIai8q9cn/yC2X26qI5P7IV47P2Y9j1gTDhRqEmNLgZh0oFnZ8Nz7DqH45FQn9/AYy4vcTIXUrzSm6Dp54DEh3FkomKGYILm0CNT+WMAA/DtbhxlCzMd0xiHAsPquDAb3U+z4TXuTpJlE9BNboisEvdzaliGyxHxJXMKe2QIL9UdwuZld5jcLRXG1j3UYN75FFOqoyZrC/Xm8HE5IeZwSrX8+gdcu5VPNTYB4of5giXU1jgic591GytJFobqO0bwbg9g5N5Hg6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kkWel5GTo4Ihj7UHKviP/TaeYL/ZKKWPea2xxel30eY=; b=RfMk337X4W5+eLfP6ANNY1SlpdEFBwdMaQXlea9mGRG8az4sb/5tGsIHoYD9LdeqhqwbQObVeV2PPJnbPdmxdj6Hh36ludaIkDFtcu3DgEttQxzvodv6794VSvycDxsLZOdmt+rKdfQwuGbX4i7IrX+ZM/od9yLM68o2hgusuIQ= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR04MB4279.eurprd04.prod.outlook.com (2603:10a6:209:4a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.26; Wed, 20 May 2020 12:34:07 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa%6]) with mapi id 15.20.3000.034; Wed, 20 May 2020 12:34:06 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v8 02/13] Revert "ARM: dts: imx6: Use correct SDMA script for SPI cores" Date: Thu, 21 May 2020 04:34:14 +0800 Message-Id: <1590006865-20900-3-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> References: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3021.12 via Frontend Transport; Wed, 20 May 2020 12:34: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: 5a604e03-0f41-47a5-ea49-08d7fcba1663 X-MS-TrafficTypeDiagnostic: AM6PR04MB4279: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: itqrnfTEUV2I5WkH0hJfoAvJN6s9X3e2870/MDBgTmycxDnAg8zuTpNFrUhftcxv36lAzr6aUCMlU2kNjRPI+AbECl6643mCsn4lasBuuXnDlWaUH0cuwQwF89x/LbfSvwSX0eQVZGCLNChQS59gFsynywG3bbt/+FY2Er/pHA420+ysFENTroE9ekXutm50+HYuJoFjo66zNBq5ljlXUn4UWqfdNIBD/97bFmGqMENkL4eY8fz04NuHjIXZ4nN7aGrbJsqPKp5DkSqtAV2wObpWXQzJ4/ljunSkH5B100ocAaeQCi47kHNt8N8D4t3henQDi7JsUDFnwZGFTa72oElnoMTXEK/6y7b+S16Ht85BcezpMXI2ZuyABHRCIMpwf7pnDfolKWmoVn88+sG+brSgio3yhwFnzUdG9I91m0QZ0980WC8HZbfk5611Gbyz0oXvPYdG2ntRXG8HhCPUW4sDUMr0mj1muTNIybjefYw90JJbsiC6LGl8Ds3w7MuyYEcJRM4xwS7VrcIkebiYccIOY8zR8YzmMPY8N6LPikDglXr0173mVsiGqQt/og6W X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(366004)(376002)(136003)(396003)(39860400002)(6512007)(36756003)(8676002)(6666004)(52116002)(66946007)(66556008)(7416002)(8936002)(66476007)(86362001)(5660300002)(186003)(478600001)(316002)(26005)(6506007)(6486002)(956004)(2616005)(4326008)(2906002)(16526019)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: lv2V2twpuKz7aPNiJIrlmRATay5skuOEcBZu4yX483IacEAN7GMUBxpRX2QQX+mB/hxnhBbg1zZKHkN9O2IOMX5GjXANKHCVX+qvtzApBb3CYAenukCwsdsoKxBOmlFFNAsAIOdvkaPM4r27H5Q5vH0zIZYLaWq7IFXt0LenP/vjlwzKf0W2a0hN+KcaZaODYl2WaPhPaxb578dNBhu/qXLPW0VlNGDRu0DG7YOaewYdtLYH6YZwB0J4j56erEnFSvKVa83TWbbdISQhnH7fhBh4oq9quVcCRxiVnxmxKkV255rZuWcZwyW9Xh18uBoeg88ms3Q7/+b3fisXVJ6zlLLBOeNJFzA/6RnSnH2hwc+X3t08G0YAj+2Y91GuI+qzmS8kpLC+kyr0P3aDrj8HLh0kUpDD/mu+H93G98IInqsADrOMB74+KXtYmze8YTxcFrYCCPMUbdK70xFIFLw9gYxOdXaJ9bXdwQgLSsiN8qc= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a604e03-0f41-47a5-ea49-08d7fcba1663 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 12:34:06.9176 (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: sYJwY6FvVbbDClT4wPwZXMqcY+qoFC1YEj+8sTeJeprmTCwho+eTVZx3Qgh3+UoV3AythYEMvA96Le0vAD2ohw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4279 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org There are two ways for SDMA accessing SPBA devices: one is SDMA->AIPS ->SPBA(masterA port), another is SDMA->SPBA(masterC port). Please refer to the 'Figure 58-1. i.MX 6Dual/6Quad SPBA connectivity' of i.mx6DQ Reference Manual. SDMA provide the corresponding app_2_mcu/mcu_2_app and shp_2_mcu/mcu_2_shp script for such two options. So both AIPS and SPBA scripts should keep the same behaviour, the issue only caught in AIPS script sounds not solide. The issue is more likely as the ecspi errata ERR009165(http://www.nxp.com/docs/en/errata/IMX6DQCE.pdf): eCSPI: TXFIFO empty flag glitch can cause the current FIFO transfer to be sent twice So revert commit 'dd4b487b32a3' firstly. Signed-off-by: Robin Gong --- arch/arm/boot/dts/imx6qdl.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 98da446..4a50331 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -337,7 +337,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI1>, <&clks IMX6QDL_CLK_ECSPI1>; clock-names = "ipg", "per"; - dmas = <&sdma 3 8 1>, <&sdma 4 8 2>; + dmas = <&sdma 3 7 1>, <&sdma 4 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -351,7 +351,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI2>, <&clks IMX6QDL_CLK_ECSPI2>; clock-names = "ipg", "per"; - dmas = <&sdma 5 8 1>, <&sdma 6 8 2>; + dmas = <&sdma 5 7 1>, <&sdma 6 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -365,7 +365,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI3>, <&clks IMX6QDL_CLK_ECSPI3>; clock-names = "ipg", "per"; - dmas = <&sdma 7 8 1>, <&sdma 8 8 2>; + dmas = <&sdma 7 7 1>, <&sdma 8 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -379,7 +379,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI4>, <&clks IMX6QDL_CLK_ECSPI4>; clock-names = "ipg", "per"; - dmas = <&sdma 9 8 1>, <&sdma 10 8 2>; + dmas = <&sdma 9 7 1>, <&sdma 10 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; From patchwork Wed May 20 20:34:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 214617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DATE_IN_FUTURE_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 966A5C433E0 for ; Wed, 20 May 2020 12:34:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75DF2207C4 for ; Wed, 20 May 2020 12:34:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="q2YqBeGb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727084AbgETMe2 (ORCPT ); Wed, 20 May 2020 08:34:28 -0400 Received: from mail-eopbgr50046.outbound.protection.outlook.com ([40.107.5.46]:58020 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727066AbgETMeY (ORCPT ); Wed, 20 May 2020 08:34:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RZzzO1zCFrWG/mycdShn7AGvqOKEKc+L4qkIEJr8Vc5APDqWTe25qb9gTGLnGo29/UT0FxBFTwC0C4oLqQkFxR0AJhQ3MJirm/iYRZtRQeG/yNrPEXduy5HA6LpJrNBlJCcBHQnlH5n2SwiD9xiOz8xTpXW3i7skfPYwJ9AIQ2GfhFuAuuQH7iiwPOa3lTHBmLjivf9HPpZrkfnLwFnWDt46UsDS26qIKRLwDJ4X/wL6msZw+LMNmonVQjdkyXrBBM0IBSR10YjXFO+3DhYOSqUEHc0zyzOetB7ar/doH1JPwga/2ywioD+zZdmuFwMBMck1HR7HXax8V1wO0rzgqA== 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=sR1u5QVWcsTcn8Rv9kigsA1HCSXIoglRvxRKA0j3gMQ=; b=H12z3EtS5ip/HuZOLOXIFkRnJ0fQo/IcnHqEmYGk02XQ0Gk5XaLcKkFWGtg+Z2t4DVsizg4iRAH93d3Jokd+PLRjAcL0TGzpRfFYVJFGLKM/15LAaTL8iIlaF6uFSZaGVxHvy+dq9rEnmSdGyZnXPGWWKXaThhOgCHvdDsI6nDIW8LrNwu7B2H4mMlPE6yUl/5JgB1AoftBhgDHt2H/XkqQ3XubDRxgpKBd1waBsD3jzeEZRw1T8e6DE0uTg5cErBbeRusQJWJeZf9HYZW0k+OuKXCC4ghHh/fH8X/ZDQxvNH0DS4fdOnHTtah9mBh5Bm/gQ1J3ZrIhx5t5Gfo1ZKw== 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=sR1u5QVWcsTcn8Rv9kigsA1HCSXIoglRvxRKA0j3gMQ=; b=q2YqBeGbaY+xqOOit0F8W8tsoHsvBXm2SSzKiRVmHvOgt0zpuhkxocis1rTN5QrHK+joeQpAt0ODH6WfuSpMX/PBoeqtrQWTy+QlcdJHcuWzVtqHqhTh+qO9QV/gszutw5+AI3ZFIkzSgPd/3KRL3P/UT5ZGtmb4naFJSAY2BU4= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR04MB4279.eurprd04.prod.outlook.com (2603:10a6:209:4a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.26; Wed, 20 May 2020 12:34:18 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa%6]) with mapi id 15.20.3000.034; Wed, 20 May 2020 12:34:18 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v8 04/13] dmaengine: imx-sdma: remove duplicated sdma_load_context Date: Thu, 21 May 2020 04:34:16 +0800 Message-Id: <1590006865-20900-5-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> References: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3021.12 via Frontend Transport; Wed, 20 May 2020 12:34: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: d4ee44ff-a822-4e9b-1a33-08d7fcba1d0e X-MS-TrafficTypeDiagnostic: AM6PR04MB4279: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D/luG21fZoNddnzmNAwXM9EV1KhUyiy54SrpU+CW0Zglh5VhAzSDvOzixxvgyjBKOKvKAh7/l9hy4sL2UBaH6ZOBMoDI+lMfi4aeAtYl/du1ezTHIEm/BCVnb31rVU17wnJtJba+vbIymv7IjWa8osMkqHXndFT32lI3gP7AL4WgAD3zgYkMkSlFZUn0eWKrkJsEsYG+m5gQ9LT81NfJOMLTbfzocpIsq79Hd2Gg4MdJV9XVNFJD2kqWvaaWfE4jk+aH/onItjqXvnksZZQkzPJ9Rb+Hcut78BUGxYSR6WeRc1VbQwQk9dwKDH6v9CXZUS2nCEFVevjs6KoDmhb4JKwpNu5StMIA5sfu3p3E3xy9v89+EJcJhCVq70el9bqYnndmVdlrx1hr8o67TQPa13+MHiE7B9leiccEa61HDvElZjtqijzWIKqPE5hNRWT11hM2qCClQaovwmSlbi3eLl3HVU5S1udAwjL1PNc/dHY= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(366004)(376002)(136003)(396003)(39860400002)(6512007)(36756003)(8676002)(52116002)(66946007)(66556008)(7416002)(8936002)(66476007)(86362001)(4744005)(5660300002)(186003)(478600001)(316002)(26005)(6506007)(6486002)(956004)(2616005)(4326008)(2906002)(16526019)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: PzYbJR1FexsoQN89bTub/jf02EEWEDw9Y/S6M1cAIAbzkq9b2SbpBkI2l4LHi8Lc7xcBZxofWEhFwYhQ2gilJqFmRnolk8C8ONR+c4YoJThlDqtBiMFbwpKcLQcluAOnD4wegVBfFcjgHUQibwcw4EObAdURIGb/kjkj42mzSaNPDejq9MuaXaqfSTKMTvigKevjlXU9u8I9B0on+CejWCGvqQrRWf4LJbiv1yAFN+MDwk0YFpxWP9CbuOBdC/JVVPGCWZHG41Rzt7a2+uSBkUKaRLTenrI8jLlRh5MJL9K2M38+2WkRL92xgZfVQyWbXCxhci188z2B4k540u9FE9U67polhCgAZKnWLQ509pXSW8dbmlhZPwksT4yQckMyCXkAUCmG+/ab8ooiPEDZy8vgDUg8kVDebj8FkyOP+MwD41NguqZoEnXX2bQa6folZJIsevtBku4W98MZnT718rEWrr9JbZVRQTbQ8wy88J4= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4ee44ff-a822-4e9b-1a33-08d7fcba1d0e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 12:34:18.2092 (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: 0BrwzB5WYk9wfa9pfaOACwbUxIWxUrzzQ9YsgMfaRrqddxBGyRH2WpyWubqB+37Kfsh4V15DStMzG8emYzpALA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4279 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Since sdma_transfer_init() will do sdma_load_context before any sdma transfer, no need once more in sdma_config_channel(). Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index b1f61eb..4440ddb 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 May 20 20:34:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 214616 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DATE_IN_FUTURE_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67B70C433E0 for ; Wed, 20 May 2020 12:34:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B8B320829 for ; Wed, 20 May 2020 12:34:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="plsnZal9" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726799AbgETMeg (ORCPT ); Wed, 20 May 2020 08:34:36 -0400 Received: from mail-eopbgr50087.outbound.protection.outlook.com ([40.107.5.87]:34089 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727772AbgETMec (ORCPT ); Wed, 20 May 2020 08:34:32 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gnM8C9gh0IoKajH3kscnEgEjO9jOlxQCds6pmz2p2T7h6HkuKrO0vram0m7igyoQIBT5wuHuSSFVxq5E3B/RgDZNUqUwWRVD9UAQ1X1b0VbKNk1Ushupnr6SKhibOuOdV/XerWtvYA/QEfAc48rpibnVEsY+1M/HAy1r2jebJXyCRbih22nv+WYMsygc9c0kNYjKRSkXnVNTbAuInyqvVRnGtwl6pB23nusTX1O7TYbDvVXNIDRyRf5gRil5oLJJxWmsYpCflEh42AVxA20tMdri+WjPUr6vAxI388jwx66eIahkXiElN3nhsieYOYdL3mfACu12WEcd3s95mK78nw== 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=/Yx0IR+9/TNLsZpIgHM8O9jKDpTRHMYZbaruFg9y6So=; b=O/TIuAU6iYnayVj7b00MTiBqnFyhm57Qran6vYvVqMQdQS0zJUUeidqjv6GF6P5lOHW6p5G5ZstsEXqHSxERMudVDhyS8hadnZ41zSE+lrbzq10O8le0FtGOfRyniKn7jSjRF5IzDMMN6SrA4ZWlDYJ+dfkj17rjBz6+xUallpOOYl7wV/Fik61c2fic3ucsrrwgXhJHMaQyfYd7QQFaD28qoO2Hkvr6G1dDylChkbSBw1jHAWBbf3drunvTTwPFUkgO4fITfgt9t40dltcjqL+EB/3+sM3EXPnojyGqfF4Bx/jG6Ki8oOD5vX8ZFZz4xY1uYBRCM4aL2Q+MY/iA9A== 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=/Yx0IR+9/TNLsZpIgHM8O9jKDpTRHMYZbaruFg9y6So=; b=plsnZal9cvZyYmYWBZ5itSxSvn5blhxyugGiWd3xBdRtjCc+0YHiBB4k/nl/oCFUbMKsIYh6Nk1EkUjIGwdxmyKy9rhpUlb8Y+mdImErI8pmFWdEE9/PsyimXdKlWBQgaVYIaYI+oqgWuUJZ0qYIpFspMZ4Ynz1dtwXm4SaZ3hs= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR04MB4279.eurprd04.prod.outlook.com (2603:10a6:209:4a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.26; Wed, 20 May 2020 12:34:29 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa%6]) with mapi id 15.20.3000.034; Wed, 20 May 2020 12:34:29 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v8 06/13] dmaengine: imx-sdma: add mcu_2_ecspi script Date: Thu, 21 May 2020 04:34:18 +0800 Message-Id: <1590006865-20900-7-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> References: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3021.12 via Frontend Transport; Wed, 20 May 2020 12:34:23 +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: 57c0d02a-a9ec-435d-5a03-08d7fcba238e X-MS-TrafficTypeDiagnostic: AM6PR04MB4279: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:361; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sl0gmkPaxF/lrT3b2UtPQFm3iHMc7XI8MQoxIfbNwg8aa3pjYBfWiwAz4BCABUYnXlJEooTlnZu6unOSwQINRBbSrHLzCNIQgWlUeaH30TY52y9IZ+sWtPzVYJ4IrOPqncC8x0kRIEr8y63NSD1KdHCevadqks7QpMf8rINtFlWCOJdm6ds2sUPmpzKu7rhpRQCg3RGdsUvxVAASDFImI+nJR/DIIt0Qty8GG0anXM+4vNRalHm/pZ9/oEe9mGk1RKYRI7IOjumN8VXrfZpD1Z7jjE9U+vguRRT4rRi/uYv/xC/5l7nNs2aBn8GTS8dCuDOQPapCKGvQoihF3KAFn2GmShytFltVQIl+WWPpndX2LRpsU1q+M528SeerEFj5TejpNZ+awNse32+Nl0xH/SOkEqmssrrjlF6IdkmWQ8IllQa3GgXRiiJvSmmgb5Nh7XGzTRf6dZmmxiYMd4gqh5Zyl/rfiFz2xsWCnNeBixE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(366004)(376002)(136003)(396003)(39860400002)(6512007)(36756003)(8676002)(6666004)(52116002)(66946007)(66556008)(7416002)(8936002)(66476007)(86362001)(4744005)(5660300002)(186003)(478600001)(316002)(26005)(6506007)(6486002)(956004)(2616005)(4326008)(2906002)(16526019)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Hey8q2TAFvVu17xp8gd0iI1Am2T9o0iopDcLt/eXE9XzTLpKeLj5I2eGqkKH44npToThnVurFLLAToeyJSeQfXHhDP1cC1TGJqB9Vwf3tne2hWIb8sGuCqzqv6j3jFUsQVYklLTQ49cnQG67ZOrOwYfCvezI/keaLlMb/yXgKzP0qdt0SAp/JAsX7S0px+8SL1J7EhLL+qZHnjD3cdmC9N43UzQIAlXhB0XVzQ2mykGec/bySOY8OC+sYMcu1xvRu2GPK0H/2LG26kMKvWT9/lj+QQDn5LgTODzYIi+nWZZ6t54tcbJG3pTsfM38eLKerbv0+FSUzPGjzes91dnZA4VFTYk1gaUtKrKM59NIhsmnwS0wH0VVNEJDnPP3g9lY/5/ZzaJ7hxUwFzXOYbySvRSxe3d1kNGaM0OeTo3BoFEX6mKIgsSaeWaCucrRZngoHYVYdx1lz7EIx9F76C4iQYH6JkXiLH6AMeMN2Z33U8U= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57c0d02a-a9ec-435d-5a03-08d7fcba238e X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 12:34:29.0280 (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: On9cksjIeAWHbMNaY3AV926iKDIEXG/a6rj64/452/5y/DmOn85o/7hwHvJd6DDrIiad2KJj7RXwGVEWB9cuKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4279 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add mcu_2_ecspi script to fix ecspi errata ERR009165. Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 4440ddb..db4132f 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 May 20 20:34:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 214615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DATE_IN_FUTURE_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F7EAC433E1 for ; Wed, 20 May 2020 12:34:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C511207D4 for ; Wed, 20 May 2020 12:34:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="RcYflVOX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727823AbgETMes (ORCPT ); Wed, 20 May 2020 08:34:48 -0400 Received: from mail-eopbgr50073.outbound.protection.outlook.com ([40.107.5.73]:52453 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727814AbgETMeo (ORCPT ); Wed, 20 May 2020 08:34:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nnelO1qEPkyOl1PKDVZSYH72a8RsQoWf21PgMDNpF50hETI2Fc5NP7AwxFilzVUGx0Uj6e3Uf0wRj6ozyANGWqHV3JIyzTH9WFpc8+d3sGO5JGX0Pgeue9rJNkqDGCmAH6JCHir3yb4IdanVnQ3mtrhbK+vx4Hnyqq1sHgZsidSDUlQSFIjhFwrVC5X/Hwnyawu8AN2zoPHZBtTGCdNZ4nNHrC3ao4THMCsRR3PdzsHj7hIVJ2EfnswPZlRT7IoPd3WyQisCczWWZAOWDlduKOxnQNTZkapBtfQUx9pYmuWj//asc60wpZAiSlQNtywB2NXUFZUqDwSaeWUE4OmQsw== 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=I3HKVqEfEEoMLoNCKTeO79UOzZO14FDHNMMqY0hWDWA=; b=Gnut1D9QaEmadWl4eLwsJD5SHjYYRHqrczaPCzEEZz0Yn9S0xse8PNoKDxtstw2Z+L5h7D99+0QErUmA5TM/4InHAUOLDzPmiZRVl69M8uliLfFL8ygGpLI6ENokm1YtU8xbXeDsa/MYskDrOdqqmuHkFmoD49mH2527LvxbZkEUmWRtFkQchAQu1E93LbTKU7v1whEwkUG0OMxQdrt4YVlHGmrZAt2cn2GI0gKmXNFzPNbnynmAKf++z2jDII+dVGr+2YYkeTQlg/wQyuTx/B9mti1iUY0kBSkAd8OZYTmKL8Ta+oOBp3XR1z64Gvx8ab6WwBcfu+r6Jm/26uDcSQ== 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=I3HKVqEfEEoMLoNCKTeO79UOzZO14FDHNMMqY0hWDWA=; b=RcYflVOXEHkmK8WvqrN/Kj1CyzvUXh5q9pbyZXHyf44BHqhPzAPMKhrOvXKPfu6gzVYj43sZ1vgCz+Eeb1M/0XJ9787SkxFoamuPajL7ErLx1pCu/v+WKa20Z+1v2oPejed3pLWzohD2omiCzh6jF8hXmqiZ5kb/G1KzvxGqILg= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR04MB5480.eurprd04.prod.outlook.com (2603:10a6:20b:96::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Wed, 20 May 2020 12:34:39 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa%6]) with mapi id 15.20.3000.034; Wed, 20 May 2020 12:34:39 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v8 08/13] spi: imx: remove ERR009165 workaround on i.mx6ul Date: Thu, 21 May 2020 04:34:20 +0800 Message-Id: <1590006865-20900-9-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> References: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3021.12 via Frontend Transport; Wed, 20 May 2020 12:34:34 +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: 087f0494-50f9-4ed4-2b07-08d7fcba29f1 X-MS-TrafficTypeDiagnostic: AM6PR04MB5480: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LSP4aBtzliWSCXPEoKBv1yCmd/MVed0EHmT83HehPau0aJnTAmTJsu3GRLqww97a+xXCQ5/fPnB3NjRan/fdbZPFwESes1in9oBDKLiuMi6/RccvtA5yVenSn+4Mi4TWMt9eTcbL63rTX0+HJanea4eq9L/zuGOFMbZZH8QyO+HDDhCIAwaJDbGBmSXdyMQpnMPdqzZ/r6sqCQcOm8OFxcHhp4ZxJVbFQ+OzIj3Bg7bBVtwjTdPnzgG3K7OhLigqq6LV2xmDgjoV+h+5Kcspg5Hsurb3fM94KLnY+SDPvxqy0jMMkCJ5GCa7CDrgA8L+df/3agK69656lsl9A54zkMA4qB+Z3dVC7oBAx3sS3FvamHsAVuhcFc7+LxmallVVI4YathpXRGnwqBleTDS4V3Ghs8YQPbF9lhU/A7pyeL4hJzF23XGZoVb1syCQLbq/cZjWGSjtt89hSPwRmObuEw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(376002)(366004)(136003)(396003)(346002)(66946007)(7416002)(316002)(4326008)(36756003)(8936002)(5660300002)(2906002)(6666004)(52116002)(966005)(478600001)(6512007)(6486002)(2616005)(956004)(6506007)(66476007)(26005)(86362001)(186003)(16526019)(66556008)(8676002)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: XZqdxFL7EeXllzbalbP1/bOZLuj8igAnMhmh1A8HjHNlyFni8tMvx79NmDOZxERSqbY1ZhClS+hQjq31Loihsg30ZDbfTff6qPSsaGq8y54+9WO26B7oUUe3Lf9NVyRyWUi72ihjVgNuU+BVtflInkzOGNinVYYgRGOaY6XLPU7vkNd5Tv1DXAxRs8bjj29y5kkbl/WbdmTrpNPkJ2561zMFY12oRkLSX0K8htwLRZdpb6OovlQx956zXTjRGwhEb3gJFlUTH3BVBO01rkn00/vYLkATDI9pWttWm3Yr1PI14HMj5q+YKBhnik7bvnuZHNuiw9WxCd1vHza0WuiNoTL9GvXapWs19+wv5He6fLa+3R2zLJMn7OI4Y0ZI7bs+nFCKL+tkGouTN6AFL2d44V6mhguEyjrG7wEgsVfbabOiPalVvYHwyTwfboT5BHBBZ0x0ya8WgkVTIDF+wOy7OoT2G7SbN+FSVwE/Ac3QaqI= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 087f0494-50f9-4ed4-2b07-08d7fcba29f1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 12:34:39.6760 (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: wskHCiFeImFYlRZ0URQ5rvvry2cypBmB+SSWri0Z2RpwRGgv0MaiinMhndhKDZU4q9B04Or8QDAcX3tbK9Ydhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5480 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org ERR009165 fixed on i.mx6ul/6ull/6sll. All other i.mx6/7 and i.mx8m/8mm still need this errata. Please refer to nxp official errata document from https://www.nxp.com/ . For removing workaround on those chips. Add new i.mx6ul type. Signed-off-by: Robin Gong Acked-by: Mark Brown --- drivers/spi/spi-imx.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 8f758db..9ac9222 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -57,6 +57,7 @@ enum spi_imx_devtype { IMX35_CSPI, /* CSPI on all i.mx except above */ IMX51_ECSPI, /* ECSPI on i.mx51 */ IMX53_ECSPI, /* ECSPI on i.mx53 and later */ + IMX6UL_ECSPI, /* ERR009165 fix from i.mx6ul */ }; struct spi_imx_data; @@ -76,6 +77,11 @@ struct spi_imx_devtype_data { bool has_slavemode; unsigned int fifo_size; bool dynamic_burst; + /* + * ERR009165 fixed or not: + * https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf + */ + bool tx_glitch_fixed; enum spi_imx_devtype devtype; }; @@ -132,6 +138,11 @@ static inline int is_imx51_ecspi(struct spi_imx_data *d) return d->devtype_data->devtype == IMX51_ECSPI; } +static inline int is_imx6ul_ecspi(struct spi_imx_data *d) +{ + return d->devtype_data->devtype == IMX6UL_ECSPI; +} + static inline int is_imx53_ecspi(struct spi_imx_data *d) { return d->devtype_data->devtype == IMX53_ECSPI; @@ -591,8 +602,14 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, ctrl |= mx51_ecspi_clkdiv(spi_imx, t->speed_hz, &clk); spi_imx->spi_bus_clk = clk; - /* ERR009165: work in XHC mode as PIO */ - ctrl &= ~MX51_ECSPI_CTRL_SMC; + /* + * ERR009165: work in XHC mode instead of SMC as PIO on the chips + * before i.mx6ul. + */ + if (spi_imx->usedma && spi_imx->devtype_data->tx_glitch_fixed) + ctrl |= MX51_ECSPI_CTRL_SMC; + else + ctrl &= ~MX51_ECSPI_CTRL_SMC; writel(ctrl, spi_imx->base + MX51_ECSPI_CTRL); @@ -618,12 +635,16 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, static void mx51_setup_wml(struct spi_imx_data *spi_imx) { + u32 tx_wml = 0; + + if (spi_imx->devtype_data->tx_glitch_fixed) + tx_wml = spi_imx->wml; /* * Configure the DMA register: setup the watermark * and enable DMA request. */ writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) | - MX51_ECSPI_DMA_TX_WML(0) | + MX51_ECSPI_DMA_TX_WML(tx_wml) | MX51_ECSPI_DMA_RXT_WML(spi_imx->wml) | MX51_ECSPI_DMA_TEDEN | MX51_ECSPI_DMA_RXDEN | MX51_ECSPI_DMA_RXTDEN, spi_imx->base + MX51_ECSPI_DMA); @@ -1017,6 +1038,23 @@ static struct spi_imx_devtype_data imx53_ecspi_devtype_data = { .devtype = IMX53_ECSPI, }; +static struct spi_imx_devtype_data imx6ul_ecspi_devtype_data = { + .intctrl = mx51_ecspi_intctrl, + .prepare_message = mx51_ecspi_prepare_message, + .prepare_transfer = mx51_ecspi_prepare_transfer, + .trigger = mx51_ecspi_trigger, + .rx_available = mx51_ecspi_rx_available, + .reset = mx51_ecspi_reset, + .setup_wml = mx51_setup_wml, + .fifo_size = 64, + .has_dmamode = true, + .dynamic_burst = true, + .has_slavemode = true, + .tx_glitch_fixed = true, + .disable = mx51_ecspi_disable, + .devtype = IMX6UL_ECSPI, +}; + static const struct platform_device_id spi_imx_devtype[] = { { .name = "imx1-cspi", @@ -1040,6 +1078,9 @@ static const struct platform_device_id spi_imx_devtype[] = { .name = "imx53-ecspi", .driver_data = (kernel_ulong_t) &imx53_ecspi_devtype_data, }, { + .name = "imx6ul-ecspi", + .driver_data = (kernel_ulong_t) &imx6ul_ecspi_devtype_data, + }, { /* sentinel */ } }; @@ -1052,6 +1093,7 @@ static const struct of_device_id spi_imx_dt_ids[] = { { .compatible = "fsl,imx35-cspi", .data = &imx35_cspi_devtype_data, }, { .compatible = "fsl,imx51-ecspi", .data = &imx51_ecspi_devtype_data, }, { .compatible = "fsl,imx53-ecspi", .data = &imx53_ecspi_devtype_data, }, + { .compatible = "fsl,imx6ul-ecspi", .data = &imx6ul_ecspi_devtype_data, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, spi_imx_dt_ids); @@ -1179,7 +1221,14 @@ 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_THRESHOLD=0 could enlarge burst size to fifo + * size to speed up fifo filling as possible. + */ + 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); @@ -1678,7 +1727,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 May 20 20:34:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 214613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DATE_IN_FUTURE_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED39FC433DF for ; Wed, 20 May 2020 12:35:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8BBB20758 for ; Wed, 20 May 2020 12:35:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Vo6vY+YR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726836AbgETMe4 (ORCPT ); Wed, 20 May 2020 08:34:56 -0400 Received: from mail-eopbgr50063.outbound.protection.outlook.com ([40.107.5.63]:49283 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727880AbgETMez (ORCPT ); Wed, 20 May 2020 08:34:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YndWWaVuhD4xYB26c/Ih1sxJOoWWhty5oVNtJ/yHt27B/p74X1DTwZIlpmwbfC8HqgQdYbflScllbxE6Rsb1ARRLIRdrPBgb/68mbTMC1n2t6eq0CSbuPoNaI57uVaBtBaZ1TTRJnQka5GWHrccdX0NvG5dBKlH26H5+ax5Oc4PNoLKf0Uh8d13z7zuCO7rqRR46ulBEucGOtgdjR3BctHKG5u4/nqeXiMA+rR6EApxIR+RJgKVuAHKRlOdgMGrDNrNV4dKPqV6rlkUWPgZePaxLP+qq76Y+78q9CchZ3n4w4/Boyxbwj5vUDE6QR0PV46NeeVO5UtozG2r3v1sdkA== 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=E3U69uN0DL45TP1sCU2rBpvu0XorFo1Mf6dwI30ew/0=; b=eUBNqIz60j7tsBRIVeOIi2YCS7Nm8prAq/2pmd9j6EAnVco7cgrhMPLSFpxH9xle5a7fafT/JFyAsTwIaBIyIDu13Jy9m9QRpgnQ0UW2KCuDvgjpIb8JWE4TPyAmrwFvpLErRUB5A5l91ZEbs2Is9i2CxcnN2lBvvFL3hzExdiVBUzrL14O79LulDVKYmVJoy8rF17NQn33WHEbV+gkaAul2d96k4dTQrF/u2Kn0lPTK7sZ7HJ3VbHjE0Pyz9v8Vkbsv4Kt+ppYnI1xTOTpX/4Mf8ciANSzGHvTdpSP11xId/xEcH0C3gAVt7G2D2X02Fqx09OGqUppG3w4JunRxtA== 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=E3U69uN0DL45TP1sCU2rBpvu0XorFo1Mf6dwI30ew/0=; b=Vo6vY+YRDaJaeR2sl6YPSFJXw8ln7cXBHDq+/EJ3oeMZG02R+M4Z0ysBITsZoR6pSylFpC6k62GNodmOBzvsbs0m6CXOAuh5wmm6/j8fEUtnFO9MWFNDO0eBImWjoFCLo3GSPZsAhNdmcgkSLuAySbtyJfDHZON/w8ehUuAV2M8= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR04MB5480.eurprd04.prod.outlook.com (2603:10a6:20b:96::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.23; Wed, 20 May 2020 12:34:50 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa%6]) with mapi id 15.20.3000.034; Wed, 20 May 2020 12:34:50 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v8 10/13] dmaengine: imx-sdma: remove ERR009165 on i.mx6ul Date: Thu, 21 May 2020 04:34:22 +0800 Message-Id: <1590006865-20900-11-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> References: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3021.12 via Frontend Transport; Wed, 20 May 2020 12:34:45 +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: fa0da7b8-23dd-4d0f-014a-08d7fcba3086 X-MS-TrafficTypeDiagnostic: AM6PR04MB5480: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WmDw4cEjSwRbDwKrNqjW4snjJZLWNKItgjG5byXIsbXDvcX4OociAOFCu1kvHvP/PAbA/Q25d8PubTG1TNQjbCpaf+vUe6i57I3+OEPavwn23Wbs92m0mGweCSjaM+aPNd4srEyxHPbL4C3CUJqYt2sysGrfH/Jp9Lnb9/Hf+rEgF8LfogKTYGmMtiVUUylMbpotUnbpOpiGsyDZENfaFyJ1FTh1knQP+M1quM0or1XyNyZyKJkpGMBX88n/gUYAEWHesjz1q9wPq/sefevhI20JxPc+lfQW9Z4u8KKfLgEs3+4s7jhFzFdD3FKpTOiTSU7oLABg7g/vew5ekEA5jNgKad1Mhbr01RHKdPpjPvQvrwNxbr89L6YXs6WL328goKH1qOI9zDZ9yx55xm0oXVckKy/WN1WeSjfelIp5l9CxwvnchDF7oxQMS6dV2Xg6DzQhRLUKO7Okc3DT9QQQNg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(376002)(366004)(136003)(396003)(346002)(66946007)(7416002)(316002)(4326008)(36756003)(8936002)(5660300002)(2906002)(6666004)(52116002)(966005)(478600001)(6512007)(6486002)(2616005)(956004)(6506007)(66476007)(26005)(86362001)(186003)(16526019)(66556008)(8676002)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: aho53+BuGEHvLchGkB+S9tkr28wxaInJZRtmZmrx1A08bq/7mNDtwjC9TQThERyMmkb93R51rjShUDF36vqnw5aNdrD+UL3t2S3pvqer/3CBCHKEPPWduk/Xq2I94wLHjAm5IszF4d+kJcaZhhT9zXRuTuPCG5EPBRhrTALdEzpQpZw8EX13UDGrUFXS/yWt5V/ZrVKmeAB09tG8nDDBEffZIrc8YCwhOUMoiwxqH0AcqddX3QHxjm4CbGPLcjiwZqCaqzttvtpMWgY98kZjhCzt0BxyMGht4ztuiiAkFiwREv7U+kExKwpuQmQ4MG/ONNqV4K6AfaftORzJ61RR/hJ4YVh4UWx1kClZF/vU2+l8NX0yNKy82x7Q4CtL8gbtxGVgXq7oPqj3F4hrS2p3ddiUCMibHJXsUGlyJvGK4YzuZF2sIgGekIEJ6+H9g8mLzvuTGAKio3d6HqOBlhl8yXmns29OxNrOpg/jtUbPrWM= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa0da7b8-23dd-4d0f-014a-08d7fcba3086 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 12:34:50.6808 (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: xreeeYMo/2Mc+LXdlIJcNgXGK71kJPSQwPXYltGBG7EF4X2eDITAhe8nFxIKLrrO6/D1DflhKsnxQYRnDm895g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB5480 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org ECSPI issue fixed from i.mx6ul at hardware level, no need ERR009165 anymore on those chips such as i.mx8mq. Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index db4132f..be86ae8 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 May 20 20:34: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: 214614 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=DATE_IN_FUTURE_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE5BCC433DF for ; Wed, 20 May 2020 12:35:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9E4020758 for ; Wed, 20 May 2020 12:35:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="Wxt5J1a1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbgETMfM (ORCPT ); Wed, 20 May 2020 08:35:12 -0400 Received: from mail-eopbgr50083.outbound.protection.outlook.com ([40.107.5.83]:10702 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726510AbgETMfK (ORCPT ); Wed, 20 May 2020 08:35:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NGN5lXjDX6hPXvE+wWrgfZgJPlEEICr0J/dGGsYOEk+SyVqciZnKvX99MNgUywAY3EPgUgUowngJ7geEJ+EocwCx5dOlWY9ZxCFDhv0zR4sHkd4I9dItzsmtYUr9GbgO2gzBB0Xlp0ygWAPHqEsIZ3/ySjD0f1ehvDgIN/Gv8PvybDQ9DBu3MANaBylDxbfB+yQ/EoFPKJfnS2BUcJLgQ2pCyJB0TT3Z0zqinMfMl2qflXW292qowWVL4fI2tYnmoS3AkiUZut2Oas/+3acqIU2BY3eWiOLbd5pCGdopVdCEiFIwrGi0g7jdBWpyELaYyYDbgA2nzalPoaOo7MuE6w== 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=PVa9IWELyHni7gn3nuBup0HmNm+xItFbTKwgykt4ySE=; b=nmSr4ggtOv9JLOPkAh19OYFJ/Klj3XaTo4oFbtbdQRfwAGxjhu6XsJCFUkOKaL9rIU9AP2w6Mt7aNEBFgSp5B1dal3OCNcivW04uT4HZBfuEEgPbLS+nsq+NgbBvg5GdWQmUWRIgR2rEQEEwqQ0InB3iV5pm942TeKbZE3AgHWfzjxG0+TYSiX4cuJJaBR3ZsZwZBMPE51b713cR3Dh7DIShy53cAxnx1wvUX1NtiGw8i9Uc7We3q9gHVQAei923ofx3sBoSKJidTawW2X+swK0NXQcyxGnIBWUmg/VIgL9jHnCKk9JobmPWuoyl2OYWBGVg40Vp0btUiCK4L2yTCw== 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=PVa9IWELyHni7gn3nuBup0HmNm+xItFbTKwgykt4ySE=; b=Wxt5J1a1C+v2V2NWBnfem7KK20+N2WFAbusMZtZJcZSQkr1KhrK9e00A6kSQmqYJkrkDA9iQywqalwZDXz3Q2du1I37br+2DMpWI9vN+3Qq91HzwKrwcDk5Dy+2bqY8OMpMeBAIqX9az+sxMj/rneNvMo7n0NvKdQOIuKqs3uvU= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) by AM6PR04MB4279.eurprd04.prod.outlook.com (2603:10a6:209:4a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.26; Wed, 20 May 2020 12:35:07 +0000 Received: from AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa]) by AM6PR04MB6630.eurprd04.prod.outlook.com ([fe80::bdbc:dab3:70f7:d5fa%6]) with mapi id 15.20.3000.034; Wed, 20 May 2020 12:35:07 +0000 From: Robin Gong To: mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, vkoul@kernel.org, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de, linux-imx@nxp.com Subject: [PATCH v8 13/13] dmaengine: imx-sdma: add uart rom script Date: Thu, 21 May 2020 04:34:25 +0800 Message-Id: <1590006865-20900-14-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> References: <1590006865-20900-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) To AM6PR04MB6630.eurprd04.prod.outlook.com (2603:10a6:20b:f4::33) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR03CA0103.apcprd03.prod.outlook.com (2603:1096:4:7c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3021.12 via Frontend Transport; Wed, 20 May 2020 12:35: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: e1de97e8-79b2-446a-8858-08d7fcba3a23 X-MS-TrafficTypeDiagnostic: AM6PR04MB4279: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-Forefront-PRVS: 04097B7F7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mi5hlGs0tdYjOFEuLNJVEN4cK+IsTNWO9ex87kFhJy7KIL/63WKYILmbjVTq7NAk+xtBn8KLx7k6lFkM6wuQbqLMeKTM8S8yNgYkXFbt19bVG7PYjuhEIjG9GFcJ6FbFWLIyTbGv2p4avTqgaVpIPTDvRPUVl4hhVTKhycWqMhDfitmHv3hCukE32qQbnHDWPkvYCGRs3LtbIcJUX7vgYLNCmIgPj4B8wJO1tgCczIJgSaIecty4SXo6lGg+PgdOOTdZ8kauHIm5/V4TAwd6aeWZgdcru5KGjDiNw03z2wYWR0s+GbXQ4NbAssqchq7zTq3CBpq5ip07EXB0k3Y2311r2EonnX28+CNIrVkiQSjSo53H5a29FaZatqB8+KGmN/Zs9JnqzF0RcuFjIiJ0SttrUsHPW0j5fCtMSg0lJ4H0aE7ywmAVydaDsk24WpInl4mKehF6R0pko8CJK9VewdTk4IU6jO+BA7VIBRQ1j3tAK+iPmR37+NDBOx/d996dGkB0IcVvXwYOHt6uT3R9i/BKvWxmhU9o1hMP80XJNM8QvQi5es+sIjhTKLq5E1Y+ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR04MB6630.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(366004)(376002)(136003)(396003)(39860400002)(6512007)(36756003)(8676002)(6666004)(52116002)(66946007)(66556008)(7416002)(8936002)(66476007)(86362001)(5660300002)(186003)(966005)(478600001)(316002)(26005)(6506007)(6486002)(956004)(2616005)(4326008)(2906002)(16526019)(921003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: mUvhQsFsX7x9AG0T9clLFbQ8Zix1LHkokOt5dtPfBYdV+ryvMb0GQeP8gkN93Xbah5N6MqU/F2Mhmw0IAsvWY66qCcLvRgWnTVnm6M8Ou/fPU11B9SlGg14zB/L+xzwFM/hR4kPkPAcNu9J3fAI9N5Ov8NQeRr1yC3UTw9jb52B0OjBUVt0RQVKVIfys70E/tEGteLHmNKXHOBRl+P5SmTig8RocKdIG8xqn3bfwg0ud68PtN9lxPfblsnMFTwCt/2K8Q7LPlblt2UDdDHtKvDgv4Ajx0TnbQfQhWFX3ss8FSeNM3qK8kKKc4xNDr5iZqak5DFcJZJxLJKZq3278ayL84foQzC3OYLV1kbDMVAW7tTPDJLfyQNVQZTzQor7d8m1htJMHwBSVHwiMiCrk1c9voGtYXCyGZrOOAvKbLQEq7QF8y9+x8K2NVDKGYGcjEJPEed+fCrnHPh2KvFNovhXE16Fkgi4OtrcEsGitP0c= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1de97e8-79b2-446a-8858-08d7fcba3a23 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2020 12:35:07.1475 (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: QHqH0MGLCroThVXnRdh6qnqA0ODuYsoL2CWRLacVz1yvkNq4W5x0U1S+/hOPbmvPaV9Cl6zKFsUJnE9PmgVzKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4279 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org For the compatibility of NXP internal legacy kernel before 4.19 which is based on uart ram script and upstreaming kernel based on uart rom script, add both uart ram/rom script in latest sdma firmware. By default uart rom script used. Besides, add two multi-fifo scripts for SAI/PDM on i.mx8m/8mm and add back qspi script miss for v4(i.mx7d/8m/8mm family, but v3 is for i.mx6). rom script: uart_2_mcu_addr uartsh_2_mcu_addr /* through spba bus */ am script: uart_2_mcu_ram_addr uartsh_2_mcu_ram_addr /* through spba bus */ Please get latest sdma firmware from the below and put them into the path (/lib/firmware/imx/sdma/): https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git /tree/imx/sdma Signed-off-by: Robin Gong Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 4 ++-- include/linux/platform_data/dma-imx-sdma.h | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 320104f..2ca7935 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 */