From patchwork Tue Jul 13 18:41:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373569 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58B83C07E95 for ; Tue, 13 Jul 2021 10:47:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DB0C61260 for ; Tue, 13 Jul 2021 10:47:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DB0C61260 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QDjvtORebGD9Xcw6MwhDInwMXDDga8gHH5+X8Ntb+FM=; b=wEwUIt93POC7c5 xWzjMO2EEmrL64pRt6PuQXgl07e42Dm3QXRhdflavx+vsQEqWyrVKqdtPP8jzYlAyB+bqhKmtkI6u W3F5yOQ4LP5hhizFmvWuJzZbmoqRzWskKtiZz2NAVZcHTo6RhT6gG529fDjX4t/bpuTub65m37aqw 0t+Mq0SpubzSgFbkPwTtVMR8BR13eJo8+QQ0kw5flgOivb/22bJgPURp2W7dRyLPVlYpSzNYjwppe TwYA/JIwKQuD/cllAi6tQKOM6MQxRt3l0pKStHF/w/fWdwzkE4tI1Amo5Qfd6w55oFYT1KE2yP0qW DcuQDFbQoOUP78ZvTQkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3FuD-00A0fa-7K; Tue, 13 Jul 2021 10:44:52 +0000 Received: from mail-eopbgr20061.outbound.protection.outlook.com ([40.107.2.61] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fba-009uKk-Ck for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:25:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A7a8hxnPgyM9gHI0WUHIyqmRXsw7IiOp80G0o4jKSSqCoufi8QHcS8cW8aDUh7yqNRyU1ebInHE6qyiA+d1Kkem3wPaorU67NLPBdYCZyv04wU/j9y//HbYDKEycluaUoXQwjCqfnF3UN1dtNrCkovf0hTUS54m61FFSeXqpB5CJhjBwzpgYU8P3OQSt8E4nNfyJ/J0Hrw9XSTY4DMdzRpXlINeRg00drb4pppQhE2YQjzswFIgYZskGKGjmVB6tTqa3UFlJzi7GNDfEDejYWNxvl9IYp7JWNExy8kQxAuKDZLMyYNPo1EK6IX8m/G/bwPoWFo0PgAaThRsDlmSAxA== 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=QJ72kGobutbcDxLx+bWS8PzUgxHjzbso6I9Vt7rhhAY=; b=LdvLJxqlN+L9+mAxhJDMyoj0ha/+O8gKTP6f7AyOYLgZNrYgU9F/WsP5o1CFG0BvB8b4sIyXS4TrfLgtZpS8CURycc/5jqLgd2Ij0qnbBzL6fZwumtqIOlAAkY1e11oM9NW5dCYXM/m7TOMie5En5BC5vEhxtRcSaj+BDjrLKxo/T54a95TSNsr1OkpTTIE8BqrieMPoH+tZOwatmV9JA/1b+7pTYCz5Vfclz8VwNyWAtOtMJ7IsSd+eSvFT4LgJ6U4eu6U2qQZ5E9cy+yV9Lj/Aa+2PcOfBzDEXeAfdFeqD7LtUrWfHBeEYt3GqJ31Wta8QReEHi5KHWWk+aR07FQ== 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=QJ72kGobutbcDxLx+bWS8PzUgxHjzbso6I9Vt7rhhAY=; b=UEYIgDHIFj6kaapJ1xs8zF1YGiJBuCultzIxoC52tVR5qE14fN/+ExtY9gS8JU4FhqNpE8BZsuxYkq9YJyBmKJRkjLaNd9gjZBu2QT24Atpe05dxCDnT7/CqGSSi98/wnHE8OUuT6dR6a1kVh1pf77ZEVCbihrcp63WLmk69yI8= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:25:31 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:25:31 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 01/12] Revert "ARM: dts: imx6q: Use correct SDMA script for SPI5 core" Date: Wed, 14 Jul 2021 02:41:38 +0800 Message-Id: <1626201709-19643-2-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1b99b9d6-3140-4a6d-b8ea-08d945e88abc X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KALfZ8SykTSUAymceeL2W/KodJm6Hfvhs0IegKZHBXTpvQGoMdf2L6x3HHuxV96iySJ5xxUJp7yVu/MATB4A2PwgaIr3JI18Ga6ZlOnUkN1BfyeIurUdaLcSLGX0ev/kN02AZutuS1nIfei4l213Hff4SCw7YK0XPDlbqh/XQ/jW7qb9NeKHSzeRBBe6tNTzPQ/AjlsYUMqn0K3be4WWsSk6S5lcDB6qb4BSK8vpRFp3TYFoasUpRznC9EOTQeWtZkhspz1IJOgRiSIMaxBM2hZgSQs+U9Oze6QjT1RkoLKs7tvymr6mERegU6+IGsX5S6yk9BzUAMALL5u6k97IYstdVmVH1eIJxWNDE8TOzyTQn4ct8SJ7urj2mN9EVFrfAlTPzc7CUtbKX9QJHq/UZDE6smIupTQARQdckeb1Ezj7axQUHyt6ZmozndxObKgntkhTBEQW/NBK9lM+FAardg+pkKpH6nTcjB8xBAsG2z621YT0NYy3cXn9H9920Syj+EcVwclfZ1V9YrX51yWllDyNMXCWD3P1TH6bYVdp2/hZarmYfqFPhmzb1/Iz4EfbsN13H8ckcqnPe1BmXSXhvJNSBCstChqhzpDjNCocIriwne09XYkrFPev2/71W2K3VGu4mjcBYKehLq1updKtP6Y4xA4Qzwsi0TLFCxI6ny4N1SixffSvpa3h4D4Gll4EobqcyO9Ut2dSqi9vyMOPocuYfBaig7e0mVagiZX7jBPI8t0i7TJVLozvVci1iVK/wWQxtWGEWVN2osvmQ1EpVH9OMg7DX/5/4hG5bQFWuw854Vy2Ocpjh5pBhfUvsy2fAqFaLN356vK3Fj3YRrswgg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(83380400001)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MXNdLFsSbsW0Ug3i0ODnxYgzpSkujaqlaVGgfd5D8y3Q9mY9FFnl59ddObJ9hjcQy7uDsRCKhulIcoFddHiImhP4QhwUz+7TrbkJ35M9Fa/Wb7p62MmjCqsmoLmb0qMn+iRYQOSIp2Qzeows4XG/DOengxJ9n90AGz5fyqeOPOtqElDVP1ffGAsl+kWotpR4vCYfBziQ9b9wU/bmkQg0E/4TdfkIyKLo44bL2yY6gNOsIUYkwvCrIdIxgn0WB/b3WX7M6+Y+88WCpBy1feCR9QuUftLBcrJShhBgra8keb4YBqI9Y7m1EicZcQQXnQfK8w/OdtOUxFIeyf4ptdYjmJFeT4PTmvb/9QdD+7X4VDPpKRFFaavLiYBD6E8VxBl4nVzHqugNiFa7PPxEAEuAXW47GuDl7BAj41R0lErSE1OB7R8yH41lKlxZabReCCiD+lsZo1fNBdaymNViZ/2XCXmLQQdZKfDqx2KxBW0W4FSzmC0w90sIj9Ithc0QZj7uL73HxjBRy5PBviVF8puvReZGV26vUNuD2rRrgqaEFPtDapRUKNGSjjFGRUIjbP/ANnvn6IFL+zFSnJ/5osuLyO6CHsDZGQeOTDR3+X3NHbhnJLphMkF3zqBJCJbD226T++aNOavPxQRR9lpvuSN8a/JXuTfW+xSFpN//LOwvx+ExJhIXsLfUqNiwwv3taTDWHXRcyRLBSqvWjwMvN91iNfNteZ/xsuvereWtkttoXXzDMhB7WHLjctPnKjzDm+Z4aHRuBfJic+16Dp7Tz8D/VzimqkbdYEyHTCr5XFFyuuf5y246TRjeUyx0dIV0/75sjL0ywvW6Mhlra0rOQyrTNuRccCI1qW8anMq0UMQyYp06+GtART6lSai/7lB3PYveabd0dWZT6rDvfH8DE3zcFlBTvmzUJi3kHbde8iXLR4H/DySK5QRbrkL2AC+kxYEL/QNRfJCcc9I612X8dgp16Pgs6vlfcAmAw8AjClucX5cPjbNlcxGgyLfC6YM3ubYQvRKrNZ0ZfTdpLzedzEoubKj5Nfy5p9PlUNezzdFKXCGny6ZC/RDzw6P/7yh9j1mI0dhzsHJIDNtlqgYD95q+850TCOerv7u8gcb2vRqRyyXqBJqAXnN5x1a7PvGTf8NPNQIrm/Azqc5rZGEysZaXcSXc8NgDKiA/K+iz2qCW8tY6lClZ/IvMHlmi47DVGaR0TngfgDBpaEYlGK++DxXAGifcqliMdF5zrBIGpiuYe8PvxpqHXoNctwU0NgK6O2NDFgGd2HJn27vkKsZ/BkotMP5C1HNOAFBedJjmaxJT05BZGxzmRnOnzX676XjyOVMP X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b99b9d6-3140-4a6d-b8ea-08d945e88abc X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:25:31.3628 (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: rtFpZwsVfEKvWryRpOzb9qi6a6wEv88//vtDS8zxhRRxOgVzO/5dXHYgrWOcEGuEtMBQ3I3VAA+2gpA1dvSyBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032534_510868_99CAC4A6 X-CRM114-Status: GOOD ( 12.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There are two ways for SDMA accessing SPBA devices: one is SDMA->AIPS ->SPBA(masterA port), another is SDMA->SPBA(masterC port). Please refer to the 'Figure 58-1. i.MX 6Dual/6Quad SPBA connectivity' of i.mx6DQ Reference Manual. SDMA provide the corresponding app_2_mcu/mcu_2_app and shp_2_mcu/mcu_2_shp script for such two options. So both AIPS and SPBA scripts should keep the same behaviour, the issue only caught in AIPS script sounds not solide. The issue is more likely as the ecspi errata ERR009165(http://www.nxp.com/docs/en/errata/IMX6DQCE.pdf): eCSPI: TXFIFO empty flag glitch can cause the current FIFO transfer to be sent twice So revert commit 'df07101e1c4a' firstly. Signed-off-by: Robin Gong Acked-by: Sascha Hauer --- arch/arm/boot/dts/imx6q.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 8d209c1..9caba45 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -177,7 +177,7 @@ clocks = <&clks IMX6Q_CLK_ECSPI5>, <&clks IMX6Q_CLK_ECSPI5>; clock-names = "ipg", "per"; - dmas = <&sdma 11 8 1>, <&sdma 12 8 2>; + dmas = <&sdma 11 7 1>, <&sdma 12 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; From patchwork Tue Jul 13 18:41:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373611 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AC49C07E95 for ; Tue, 13 Jul 2021 10:49:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4284E61260 for ; Tue, 13 Jul 2021 10:49:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4284E61260 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=shdW2v9vwFEPiMtssEBqdAb2Zlh1PvKj/Z7tauDiTC4=; b=ai6ziYC4W1L/+x cE2t0NW/w9OuuRfA57896lFeZ9o1JdPeznZBWIs+1RGOxGI963DIgmTusB47rdr48brxV2AcGVv8k vPUa1CrxzIrxjzTd+35+7xffO6uUAX/CYRxSJ+vsLjzr9b+eI7W2q2gh/emDOcK8Wo+z/Mt0smjxm EaoTvWVT0y1shBErFSCPkN03BHqaRp0XZ7mrgHV4iAVS6UwLG8JVbkijk2RNmHPpCoXvE/dePDY09 9JSvTQOspVkse9qipTyefHCRw4n/hRyZtCCftIi6Z3r4S+8SN/nxqwSpXiPnyv6bfIhPBl9Oez8ef HWmcXuRUI5addtOKNL3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fvv-00A16z-V6; Tue, 13 Jul 2021 10:46:39 +0000 Received: from mail-eopbgr20075.outbound.protection.outlook.com ([40.107.2.75] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fbg-009uNF-Ue for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:25:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lk8p+UUGzfNS4pvswg/A08uMzoqSDFvoQWbTzEVpdM+a7S1w2Wz7kHZL/oOJZCIN7Rg8y/pQ96sAa6/W8fpSM3T8lrKevBuEIarjJl5gDV6oIOBrdTjp9xvKogkrPuptdCXiNsoJmLlRh0I9o9nKZx45EPhfAFdSC8K9uFL9Yv5Nd2Z5sdoxFNgEJUdbl9JZSMbGXmPjX9hibKFbXDpJWDs3uDaTcBM+MYQdse4jUt9YB2fibGUnVH0tMYXGGwCAh6K/4DkFX9p0Nle09oTQQkMzMsr7trwb+ws8zjZjhEfT1y/uJFLOwSYBjL7Lx4K9DV9oAF3DJBewDRfczoGHqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NohpbX1KCjpCzOGoRNYXm1GGmodOK5+pSXpQ//vTgpc=; b=aUJNP/JUaASGsvtbujDplHGbATj5pCE7DAMGLG2nEluMhzX5XDk+iZCyz25tYufe2Mlu28RwUh1e0D+Foc83YwYmgInEKFEt2AIh+VILTKXuD3JSzLmOI8/oaavsLQ3A2dj4JbrYhOCFLVCdmnE1DI4CfZLg79tB5JIjJX2G7PJDlceh00ww1wp+o/koGKH+dfCnBlt6gf/gSuL6cNCOCwPWQgnhySZJ3Tjo7oSjKkcC7qtl69X3h/3D0ccWVetY6d6uI/OCAVnc8PvU5jzVkdvxrfJVhyU7ZrEu4GgQOE5H9p20Dhh0OzuNdBuiOqQC9ibyeTG3/et2HtVHzkIYXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NohpbX1KCjpCzOGoRNYXm1GGmodOK5+pSXpQ//vTgpc=; b=X9Zqie/nXr+toYCm5awaB2BFXI0CjHsqeZ7k9fGb+8Om/+nrIVJUCZo1J4+56PJQAk1BX+lszY9I+rygfVlYvoXheNeu8n8zyYAz/mEnNmkVwYaMfdS5jeViGro31Ug0YfN8TVRDgo19pKMeaRhKNXfvwNzWt7x+DK425hYS+ZM= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:25:38 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:25:38 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 02/12] Revert "ARM: dts: imx6: Use correct SDMA script for SPI cores" Date: Wed, 14 Jul 2021 02:41:39 +0800 Message-Id: <1626201709-19643-3-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 032fb65a-68f1-472e-e923-08d945e88eac X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 47r6EzDbqOy9sLfgWzfRkOXY9m+5hH3whHnDqy7EKVp8g4bzLACC59FysmMVEbI314Y6NwUPpvdc37fLlFLk2ZuxsCFgNf0C6ZRPt680SPe5mQoZJ4H5My4Xz58OX38CRyMwb1dLMZxbvsABimnDuDXA7pYKJ7un0O4TrsWQQyT/ilqpvrQkgER99NPKfhf4vA84fH+FcNOEMGvuSJb8NI9xeXiyc3CDsdDVcZxEqHp1M6P5Y+x7a1R85uWJbUV71THG9cHcDAFCqarDQ68jGg+rxjMSJFoNj9Iv0pNq396Gw/49ngJa99XOuGBHQ44XW/RuqIPfAJB+g7JEUyGIulLKAmdO0iqyhZ4jFrkwihgFxU6/nCu82JiPOUZUfVKhndm8ZIvezR0BNaSFUQCKsXstfaj/7aSwjZq8nb6paBo+q8lOxHnMhP56i1QCNgf7W5f9UlwFgRjXXgJBAK46UXXmdTG3FKzKjBh1Pm8o1YOg2hs+2M6EeZ5gJ9//thr61++L4VS22dtyU1BfmAlfyCuEpGhLXJ6n78uRGyFezrHhsMgjitPT7sjsvS3iuNmV9UuMS8IMj2omxBnOxw9SFzolsUVfuc0LxYY9Wefk5E8O4oEDy0a9m6+biobS2agJRZ8xCgXqGO3chigxk6nLkGqAFo3QZZ220AgBLV2IrIz+hD/HtQ4rmHs6IxRevED2yMrF59cFrOjrV/4dI4Wn8faRQ4Ry+JWXIPP52vltURLS6uMR93oVgQRDNWrZvJ2Jy3rh2KjV2twk8uiNtZBtEBLdAu2GSbqW7ZP8npp+kdX5j8UYEgfGJNTSGVsu5YpQ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6512007)(316002)(83380400001)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /26cykMMDyh8zlIAh83pYxUucS1KvyRXdAcfms3z6HEyn+vhtTIneJPQTgSpoY2RpSLE6zkd1+OQ/jEcUNnPjzI23aHJHCfXxKgArbqrvp9J4fh9aAl6B8oXJ5ICWtB9t4D2YIqM2ooSlSZ3rRyQvsO2oxcf30sJDORSB1HfEoNTqmcBN5RkyJbk3gzqF8FoyVW1oDczY6qUn+bHrjs1qVcBD3BKCsk34T411gHIwxG3JdYXifZgylHDx9F15OonhMXcIq3Z02lS9A3LkbIoQdx9BUxtYBht2Mp1ip7kO6n20oGqKdq4MPslYPNVNOs9TuoYxBhZiWu4/7AZOzDGJE/oMuM9Xyy6bST8Bkp24uMQfrzDaYPEO/2CQ4dysJdcxce/SekN0JH3QAEZO31o3jLC8jjRM8dqg48y87tj1R0RIfWXvq1M0jJ7j3qGIbmsCeo3Wsd8KLyM0dq+xkNdw5WKZ7vPOyMR8qqNSzb1P89z+0HHI/tSa9dbXTFxG/OFbDxM9HjsvNVkGhNKsLxMptqCU5Um5kjl9i89Em3y83qHS9URnoV9dw4Mat0HdRkX5k0NdAjZkAk9brAtjjXQEMc3sCbArEu3mbGO2ADh1n3lomwyRZppKesjUY08/orC4ppjjUiysJIxnoXYKAaOaGSi7W3mL5rOEJXPsqGNijFBuDrbLr/D1vrLQ9r1/tSz9CuSVKLwA8jCKgsnJ73P19az0RzgrdfkWtE1LEBpk0zxpHJJwAn+rKqEnaHRmmC38Z19f/UxGnklJaGp3uVqDf2eY4GkZvLWHwFm55YQTulzH7u27ASj0F0R/tpTv3I9PyGHAftXuDSjKw4epds3Z55eG+sIaYs7zdbHCEiQYbnSN+yAmStulmtXFnmSHvEaU6EARpLifUdu2szh/UFTzE6c35V6CzmU81iQRfjSABhm3Su7jcJvQlwtQVWyZck2R4XzYAgkmiOfFLOEQ4C1EJmENvXPaVUtFi3gPrXmG8N9Lxp7kP53Bzhkshn+YnPB1lctfTWWIRmH4Y5FLWJAE/zsAPOMZhBIxWC1q72zW+Uir21Po4P3YcFtsCgqhae6Lz63qj8cRNRifU8q/dcxmw/Ylg8YD14908JPIHdBNIpH4jG0WE6HzCIKPy9AupcEpaT6IhtVsxRwQzJJ8Vw8JYCrVBHbcTvitx89pL3wbSdu/kw9R8rWjjSc6Ncbg/v5Vw+M8/qEDaIOZSr3RfHkXm2ffB4hIB1l/X1LN+TfxfojIOA22gDHCVmmGgdjYkrcLXtQ17hwNbYeUMYQmCYM3t5RaM51rTmwvyO09TVnNwHnhSAZPVopcpd3vQ9CdyCj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 032fb65a-68f1-472e-e923-08d945e88eac X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:25:37.9960 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Dlp3BC7fQRbPO57ww+bknQV+nawIbVFXXG3DZUmiryQlVEqw6tGZ2P8VlnTqB69lNKhqT4z2ekNVSM7OyR0jCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032541_058216_4E4E4E03 X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There are two ways for SDMA accessing SPBA devices: one is SDMA->AIPS ->SPBA(masterA port), another is SDMA->SPBA(masterC port). Please refer to the 'Figure 58-1. i.MX 6Dual/6Quad SPBA connectivity' of i.mx6DQ Reference Manual. SDMA provide the corresponding app_2_mcu/mcu_2_app and shp_2_mcu/mcu_2_shp script for such two options. So both AIPS and SPBA scripts should keep the same behaviour, the issue only caught in AIPS script sounds not solide. The issue is more likely as the ecspi errata ERR009165(http://www.nxp.com/docs/en/errata/IMX6DQCE.pdf): eCSPI: TXFIFO empty flag glitch can cause the current FIFO transfer to be sent twice So revert commit 'dd4b487b32a3' firstly. Signed-off-by: Robin Gong Acked-by: Sascha Hauer --- arch/arm/boot/dts/imx6qdl.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 82e01ce..89c342f 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -334,7 +334,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI1>, <&clks IMX6QDL_CLK_ECSPI1>; clock-names = "ipg", "per"; - dmas = <&sdma 3 8 1>, <&sdma 4 8 2>; + dmas = <&sdma 3 7 1>, <&sdma 4 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -348,7 +348,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI2>, <&clks IMX6QDL_CLK_ECSPI2>; clock-names = "ipg", "per"; - dmas = <&sdma 5 8 1>, <&sdma 6 8 2>; + dmas = <&sdma 5 7 1>, <&sdma 6 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -362,7 +362,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI3>, <&clks IMX6QDL_CLK_ECSPI3>; clock-names = "ipg", "per"; - dmas = <&sdma 7 8 1>, <&sdma 8 8 2>; + dmas = <&sdma 7 7 1>, <&sdma 8 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; @@ -376,7 +376,7 @@ clocks = <&clks IMX6QDL_CLK_ECSPI4>, <&clks IMX6QDL_CLK_ECSPI4>; clock-names = "ipg", "per"; - dmas = <&sdma 9 8 1>, <&sdma 10 8 2>; + dmas = <&sdma 9 7 1>, <&sdma 10 7 2>; dma-names = "rx", "tx"; status = "disabled"; }; From patchwork Tue Jul 13 18:41:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373613 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF628C07E95 for ; Tue, 13 Jul 2021 10:51:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 755F361260 for ; Tue, 13 Jul 2021 10:51:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 755F361260 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jo/SryjfFhfCGsYA9nqWcPfgCVmLfW5SH4PPFOcbID0=; b=XcSUaXAN36dozL aaux8lS5QktFQuaoMJFZgEiR/jQ+EZW0YqdOhIH4j2q8VViWPWN9SLtpy7bVajQj47Lxka4VVcFC7 RqRyCdljLnMmZcesOaZvrSwq1OnzbAn8ERp+vex5Ne5U82TjG3duI4nG3IQdBuruJ9HzwbAn4zJYY 6HOC5K079SW5w+6SnZ+7coYHFXa9pOo4jp/s6n0tVKWptv9Uaeqo1QG6EG+vqFXR8a33PQXH+BXvP xhQ32Sp6uGSVsF1ZmsSPa+1ETpone4Ioz+W+KuydSBST5e2vjIyQRYTetiZQIkIVZMfv/buxdOIBo 3zIo5VpBvjp7v3PAOWFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fxu-00A1bT-90; Tue, 13 Jul 2021 10:48:41 +0000 Received: from mail-eopbgr20055.outbound.protection.outlook.com ([40.107.2.55] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fbn-009uQ5-NA for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:25:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jt+4RxfFQBy3YX2myUSs1D/UpOuN+dLEZdhDo6uDh4bvR03aOwwASm4lFp2uYRM2R+Ho7WB0pEVVt+1V8znLp9qDAu7MFX8sEgI9erBM46ZkKWmAwo23BRee2FFhoKsUULbPZc0cU6qTX35E9WI5q2by2vUyQf76WTqtVdBThzvGafGE3ogRaaODAenc3SDkTup4dZr0LEfHwkqog5OE0TfQCtQ93dg0OuMwL1Ssxv2m3TfQnq8IP1KMliZA17AK3INuaLNGXGKWDN3PfZTfvUJzZNV4WPuJzmDh8UapObw5pS8InxQbDijMXbxH7suBFovAMT4S4eIy4JtWk/dNsg== 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=O26POmsGphSxwJgUL6Oe/jseTLhWb+pnxNqyrwdqNaU=; b=MoAGHgn5l6EL0nTWedX/4NodJ+e/FJ+9Bi8zSFb0egZpLjc7f7EQ+Jf2qsM+8rgrFwdCZLe6j+R7Wma5xiyuEMmOmXOR78Xq5jBocqs3nC1f5j5N4pbnS00/lMUz8NsrgkZh6ez6bofFc3aVzcnhKWw2NzYNV0EVbcYFtkOUnMBh3vptq2nBwE8woUHF5oJlVd7iSKzNTS027W5i53ymlMXGWZv/qT/1oANar8O9qi0/1KIWCTXiTGydcuaKv6DhaoIgNFEkm/giap64IRFIoUrx6yR8TtYao58GOKNkxqt9MLuaqJvVn6Dnkwv9VQgjwNeAsNjTu+kJ3B15aYvbAA== 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=O26POmsGphSxwJgUL6Oe/jseTLhWb+pnxNqyrwdqNaU=; b=GXOIGyZ7bZ+yCZjfHxNIQcucnw8q8GK29iAzVsswy8kUK2p3FGCye3SCZnnCIUwhkiHus/8/muaNuBMaHKGBAQ4IKNt97cCUYZgRLXIqoOhl/2b4nK8NjSxUl0aYkFsGZaSxXhk8uGTJwd0uQiKr5Ryp7cwsY7N40GXZ155Bv4g= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:25:44 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:25:44 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 03/12] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Wed, 14 Jul 2021 02:41:40 +0800 Message-Id: <1626201709-19643-4-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e3db4daf-d977-4143-6ab0-08d945e892ad X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:132; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YYqsSnLDhJB+B/oVnI8UCQsoNTtVUM7LPD9KtEp+mSwcshlYjrDeFnBuU+MVa2WiZ5a3OJ+BHf7kQzmXyJs1ubTMvfRiuDJC4zIWV2bfvi9O8nppX5K6668fAblRa7AaoK/UihlbIqEWhSIDN1WsV7rAqka4mGB7jbpIOjGGJTEYa3RjzWiSgLvSG5QehAjz+nw78O/VrkOMbo8/wkG+QKLiBfUcnHIsDrmZD0S+W/Grk9YLKx5yPEz/kLMuNiNaSuZlRb5TDmldiOAHDO88FGwRIHiY+o9fEiQDUlzubwJkpphdvE5Z/pl0Z/8ESanNipf5MA1kWJxa0A3UPwNHRU3iClCtEz1N5/8jZmUZT8nB01Ygr6WdjbgbIayFQ2Lg3dz1xuBErmy+15ktMCPWkruE2gOWwd4ROnZqPVZu9MUANYTMD82/oyLAw7E32vQTT6/PqZcLhx8mxg8et5Ut1iRG/vC3fmfqnRqR5zxs0U2kBt8kO4NqgSCnA9gdiD9H1Y7DTH/tzU8H8LX6DrIFbL0PTAdkW2hMfAWkiPAYxDypAkGth9yNGGFGkRhzg7oGjNRZ997DO0KgsA2aAGnniBS+PCmDNriayC8a/jqwxcGizU/csNYiCdg2g2A7Dw4n18PMv5YpQ5FaNq3aFglZMtH8I1lyXYIqB0JeJTNuG9cVMSpGdCZLc74EdDkYNd6gfq4adHOMWGTyREAXa7VEJLDzItWV+6QVz+CTFLM7Lng= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(83380400001)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uykudO1djcQB4KAMJimxSqVSL95HMZOlc2i2pHElgTR8ZRFM6fStWbravtGtr4nGVgqYFcN2Dg/4ZxYQ+whTvpsDG6N76zTS1w2vuHgloLt2+axmCfzlps+sm3IlIvK5SpdNGPKznzPTzx8FmCYXzW0AT5ICILN2b2YroGmvCfulmPDWZYwklsLk68YUEMlRhULWennifDjjKuzL9RhLLv/a+WHqU7psSDJTilyLKh41My/nPopuvWLdABQK5iNBm0eS2Tu883tbC5hcwCfJMU2xPJnkVQSbf5F82fJgybOgJXTBcXbl+ynxYwM10bfD9UaLdBdtg7E9WmBbYeSHR9Dnry/hiLtYJoSwed/KlVcRnGXERsPYiyYPPPSd6libLvqC2Is4wTAdJXrf9+1+gMS0uB4F5lm4AKnTawP3HGeR53CKMZMIcw0/egE94rAp8W8xWZnbiCHV8DjSH0T4toRPY0lmKOxUHB7Yjwz3sJwav+ve9Mv5/9sG/QvB40Nc5EPwONdfdESLdBqrDd9n9IMghX78MDQmlrIFy+FlNJG/1COBF3wqhTb6m/0/Qhe5IgvA1Q9faA7w2yTR/DdTX8B+gNlrQKd1siwC3qaC7u6gSHsCJmvQSz2LpmQLeO3XYRU9UxQnhSiyT3kL0OTS82RagYAPuvNXtULtn2hjMIXjahL20004EcM2I315jIdLGJ636WufOVzpBoyDUR5QgOIbmIAyKMrSspK495yeu6JZ7yevxbsLaMbioxBtS6w+TyipwvHYB9xfyb7/wNzJSLcUTPiFiH0AD200MX1qOFt9Yk9ZwFiQKPlIXFVvEh7VhQOdO2rdtNJfvBiGeu7b/Pr+K+ACMUZOrpLGrmcqv8HdYArVU12nsW35I+isX29ZdW+d6KTigBbYEq1xfYWJFq8k2Y5idNciHS3PuzFDllR519s69edrwEJhAKXFVvsXA4XdeE0Pve/QmYsOPpKlcP4GmvXpWSINQVPxNXF7hP9Pbla8NULeQnnzlYH+8MHdnNqqFMdvazf1kMvmmQsZDX4qgX+VPvOK2UUOjFIZpHKj8r28ez+3tbLcGk3CLfLgeqqvnhPzSN9pPQYLEhr/Kny/z1eh5m5isCMqRdaYg+C/rhLwSnDTzIX69UTHjhzna0nJqfzlWjnYDRUnOB6DXeUdJvd1hfwSpR/WOiF1pshacI+iz0hhZhYvpG3cjuTrKIQNn7frCWE2SNQ/vfw70NjQKPWmIH4vEIvZWLxNAc4mOP5QCSldTlxPcHbNm8JkUERiF7R35V0PpF2i1p8lhmOWm3wd2o+aS4dZnLv2zig0MgIvGfda7othap4G1wwk X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3db4daf-d977-4143-6ab0-08d945e892ad X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:25:44.6812 (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: 8M6IQFngskmyfneFms7Gn8do9DQJcxEv349goatILFcp2/Ey1WxUxqHRDCMAtGZ21gZ1nB+ssWLUxhU998uneA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032547_810938_4090E2D1 X-CRM114-Status: GOOD ( 10.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This reverts commit ad0d92d7ba6aecbe2705907c38ff8d8be4da1e9c, because in spi-imx case, burst length may be changed dynamically. Fixes: ad0d92d7ba6a ("dmaengine: imx-sdma: refine to load context only once") Cc: Signed-off-by: Robin Gong Acked-by: Sascha Hauer Tested-by: Richard Leitner --- drivers/dma/imx-sdma.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 8070fd6..e510df0 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -433,7 +433,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; }; @@ -1008,9 +1007,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) @@ -1053,8 +1049,6 @@ static int sdma_load_context(struct sdma_channel *sdmac) spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - sdmac->context_loaded = true; - return ret; } @@ -1093,7 +1087,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) @@ -1361,7 +1354,6 @@ static void sdma_free_chan_resources(struct dma_chan *chan) sdmac->event_id0 = 0; sdmac->event_id1 = 0; - sdmac->context_loaded = false; sdma_set_channel_priority(sdmac, 0); From patchwork Tue Jul 13 18:41:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373623 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDC44C07E96 for ; Tue, 13 Jul 2021 10:53:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B6F3661284 for ; Tue, 13 Jul 2021 10:53:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B6F3661284 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7y90OBT4R9vf/oNVUGe+9xsLg/TXrnXje7xhXEm+EqE=; b=o70TAgTf3I5uf2 KqV4wTI0uzc5ECOHd9U8PFhfNSVAy8eIus5wuYgsTLSaIh/prUrziRN9uYf4bqouZ92Nm8LyUQoQJ o3tqX1f39dlrhaD0lu0ighqO6F/e0wowwhHYGUt/IUctALmQ63G2G5+/DrZYceCJIWCVMzjXpaAGZ qhb1CnA8HFliwZSIBi7xX7yw3O3R6FRMKE2FDS/PA2qDgzHNpl0ON/jj45kcQRyeZgLnxXUtTTsQG 7GWxcKiZaeygEBBybA7OCFuJAM9K914B1Qp83Bn0tJ2vQHQVPW3uanUcsthQIFg+GNHPZ5C6xaoz2 9WNRueN55pVeUQ+pQgsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fzv-00A1zp-Pm; Tue, 13 Jul 2021 10:50:47 +0000 Received: from mail-eopbgr20067.outbound.protection.outlook.com ([40.107.2.67] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fbu-009uSb-L4 for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:25:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UbIT9zWX4fttyzNoPTf+ZHP5OapjmDaegm0t18vHIpi+7pqx7U4nzJ7foumX1FFQBKetQ/4wgbtWtn0ss0O5aeTPSTpDsT+VzrQvDdamO8piyVSUK7fofHRC4F7IsSdowvViIuRJD8H14EeoOqfuRRTwQ4+x4WYV0tAaXEqb3ZO+hXJfgrKEwdd5mQvJnblujXDC9+vPoqAVNav/CdLz6cCR2hnOWblSaMc2Pi6+TcbNxDBOLYBj5V6dY+LGh5rc6P46Ddt2UJGjIXZ4p6eyiTgnSSGuf9gMJ8fvmbEphPYXdn48gHv6yP03SQf1nIvPUZXrkpE79+WYrAMPUFKNVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ckDPSsFVzv3NWjjrNqcD68iD8bHaj5KBipoUq89jOm0=; b=LSxUMQSe3R1l+yFMw6sH6TD59pIVkjssnuUP4Sk2URKRUfKf71SW1UL98ad4DuqWG6UKJ7Nf0+r9IirX+wSDMWdTzunaqvcXl68hOGRKcV2mezHkX6AHjbUflbOK7gFaEYrv3S/5wmsfwBT+7KWP1a2ZoF9uitd9P2r/JrDYA1Ed4LyPjDrYGqiRbwTs/vQoVUszkhr86sG1P3R+06k3Ci000Hx80sOPbR4XpcGSNRC+5FwO7ZwOzYM0YRiP2vZ4hiPgklzdbITm5C0erXlbt8+j08dzjGzSDX6QbaB/ggy1mV83FRo3Xozp1bNa5L0qkXJURUfFBCt6C8v1T9QqxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ckDPSsFVzv3NWjjrNqcD68iD8bHaj5KBipoUq89jOm0=; b=dTA391NdtttNgWHjBsbqfyHffEqbSQGg1xCRsPJ+gQOjxTVgUK8M3gj1orrbZZHtFebFG4IKXiZZPXgC3gHlDymiqpafPyNO3eddgP14+2LGFJjHRg2v8EK+S6MONQTnKi/3WOpjCh6/EyknphvX0t/OGJ7GsDSeycslFmgHirs= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:25:51 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:25:51 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 04/12] dmaengine: imx-sdma: remove duplicated sdma_load_context Date: Wed, 14 Jul 2021 02:41:41 +0800 Message-Id: <1626201709-19643-5-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c0387ef-e881-4164-ed83-08d945e8969b X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ez5Ef3PcwebbzjWH6MEjz8JzwouDTOjO7DxqfYgV6DuSncjSTbOHctjeiRjUCrwJ5pb6g4VDoWcjwyL64RUMycO3/MbaulnYnpZOKNly/HhVlDHZ+aUvQtpa5W9nF990kh3NC+ng3zMbY9n8JVlsEzZ/cV7gSsvb8AaEG8sahk7EVii6Jhx/aSu/hl9Q5IcUuHXAdtngJezgE4lnAp4JsbeGvMLwAA+7VgsV+cvMfGEcREEUIbsEQBdRaFVn1iNAoizJSPqvf59XQf/h1RguN9UP4a63GP43I/4VUi9SIGdAlWTWgMEei2s1wjrWVZifR1drl9tytLX+RC3WCUXrdXdO6CUDbbwAQLMy7ecK7TqaatvX6DrIJMGhPJ5ougLFDye5BF1qKDfsiQxKHhsZAaNegOumgdOpWT9cWn+qtiKZ9rIByKthZn2wyAmlf6q16rGrA7u+D9holgpsspy+eXtb99iG7DnSx3aFt7SWXWWsEAshCrXbv6t8ObP50FcBr4tMFFDbcLJSI8reE4x1krSw9tnvNIVsUKpYQlYk1xKluGmYu+hvooCoCoMR/SxLcZN1/9G2XkYimfcT0/VFYZtHbssth5OB8jWtvRe0wi42MbaGcKocm8XcAHH8NhPafTO8waeyiqTCdHNUxeRdnH1PGA0CiqBn9oam8gIXgQNXITkUyHmcLvrKYFXc18Zp+OZEIuZ7SFExTtjDj+O21Re1RW8/qgQ5Pe2NccIxHWQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(83380400001)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XzdLGHxl8pTxshZ3vTH8pbs4pqh4Ffhhkv3IFrYZHltFXWcrgYNmiJndiszrtiRpivC38pUWUPaZYrXnj+53FN7/ibFgXYXZHWXChxum5YpqDXuBDJbVvFxTrALPpwl2fDar7lbx9c5Y8FJnoltsiQrHcD7tjABAwEwTJXd9vWBMTfVtiRPA6yBHjCsLd8hv3cAPL0mQerSzOnZXEYoJltbSGyPwWnAPjXMYPkdMPe0zpt08iVumLltxmZxGgUviAyHNxd3ULwE+GWytq0AYY2IFscE1oZMi3Kal7q3V4AC2Q54t+qSopjxfQFSnEtCRmsbxhIhGjV4Ee4HCuovXrhBOjgEVVXNbvXTDOKi5sMMYIPevNMG9C+WTZSwXK4kHqGghjzpaR/c+F2WbDqeSwBFpoITnVEQmU9k6mC55sy52nVJmKGQrmAn8PKKEvd3DWLWtd47BjDIsV8M99S6VDr6NhAxdCJYscq1r3Ogj8nDt7xdVQhTPpjZH7/is6sWsAggSWBNEFY5ez4BDsS4MJGkl/EFIEV6z7yD/mlWULJ9/nQnM9J+OmAGA1MUQ1V+WNRuvl9uvUTKermQpjvu9bPcaNWQrcH+a1InJmw3phlXVrZCOJ2d6R+VNu0Lnj6AIZKvCuLWRp7siiOkyMCAqJYkYX5Fqw+B2621q4+zEyKe4tvyepxS9cHHEMVu+fdl3LabIOo8h4cQjLXcJKxofP8Tqw8UuorKmm2JQVkRyLxM7CJLJR2iBU8WH/3P7sJBYwTZjKJ4Zz1xVGekyErC79P19/u2Y54ETWsxkXzf3YxBnKNS9vd1nVbFBKeyBDyG/FR0DXDl+n+a7uTxbDXpkIZ97a7mnh4RT1y356/ediOquHo9TjrMGZYNfMDJRodDQacvbYJOpm2D4FHiGyBz4vpefdEkOyvelKJ0W1dI1OhKc6asy70PVnfgawIJhfabiwDaPqsCs/7ppHdHAxFoEkl/6ZtKOxLhhWylb8oReioPjt7IsOXReuKKhf0kKDVHki8ldLgsgzUKWsXnkZSxwNOwrZYqf4rcXX8JFv89CeY/YNkQOxAgpXrv6zXQXf9ijg+gBD4xIx3VJ4EwmM2+Km91for9xyvLZ8xb71u+3o4KxB37whHInlCHdalNt5Ba0JUJQdlrDBVwKIK8xwU2MSkZpCK0JZzZa+e3dd4yY5is4tOUOpTyK/gOD4zbmDzAWDtw0ANCrHQzg2A0A4CXj2KK4KydzHV5SadWCX9aLhoO2XQl5Xs33n8PX0YPQJaov2aevK5oukLkmjqYbNAo/zNOMDZiA9JdiprpA36VMACxzdD2KhSGCs4/vByKmrK58 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c0387ef-e881-4164-ed83-08d945e8969b X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:25:51.4204 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pHz4o1ERHJexjpu+avagBUAVQx9VCHNOiRWSk2jES6ej84Z3YY0VHjVHGktHFeyOKpEJcnAaQcJTWTDshnxW+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032554_747273_1D8D51A0 X-CRM114-Status: GOOD ( 10.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since sdma_transfer_init() will do sdma_load_context before any sdma transfer, no need once more in sdma_config_channel(). Fixes: ad0d92d7ba6a ("dmaengine: imx-sdma: refine to load context only once") Cc: Signed-off-by: Robin Gong Acked-by: Vinod Koul Tested-by: Richard Leitner --- drivers/dma/imx-sdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index e510df0..665ccbf 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1161,7 +1161,6 @@ static void sdma_set_watermarklevel_for_p2p(struct sdma_channel *sdmac) static int sdma_config_channel(struct dma_chan *chan) { struct sdma_channel *sdmac = to_sdma_chan(chan); - int ret; sdma_disable_channel(chan); @@ -1201,9 +1200,7 @@ static int sdma_config_channel(struct dma_chan *chan) sdmac->watermark_level = 0; /* FIXME: M3_BASE_ADDRESS */ } - ret = sdma_load_context(sdmac); - - return ret; + return 0; } static int sdma_set_channel_priority(struct sdma_channel *sdmac, From patchwork Tue Jul 13 18:41:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373625 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 033A0C07E95 for ; Tue, 13 Jul 2021 10:55:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B96AC6127C for ; Tue, 13 Jul 2021 10:55:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B96AC6127C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vlYctQ8lE7uqZEqxoQK0kWQr+0ZjG5nG7HZ9PZL4ioI=; b=r7UOBqarUJPGzw EBMRB+ea2RuK97jaBjjDm/k1syqa8xTWPx6A0yAoAnye1fb1eJhMvBahjWoO5WF5R4eBxlRMtJ5cm nRZdvmJGBIGkqUKoEd1++Ep7/ru24/VQGZWs7i858c1sbgdWEI9xwu95JnF26DSZMJ1d0zeK95gZX mpuNrTFFcFxb26WKyO9Y/FGCmCxWF4ZhoWq8qIyxDoiqlQAT9BFpMny5WRJoCpBgjZ/8HG2VRYTMS /jUJLqZP1CUly8mg0KvQujS2D+xXQ55PTDx0WKGTOm5RECA4oFn8lir+bS+nmuiX6IknInBuwb5mv xgT7ZoUMnERtqnPb+kqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3G1t-00A2Wc-Sy; Tue, 13 Jul 2021 10:52:48 +0000 Received: from mail-eopbgr20044.outbound.protection.outlook.com ([40.107.2.44] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fc1-009uVN-6h for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:26:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bFBpxIOsxuzGpsbDRROK6PK7wuLZa3M93rieZVpaX3UmBGgbg2Juuo0KY1S11dEKL829JDw9vn58aqapCQPW49gXc1LkW3KeDET6Y5Ra6mtjPOOmzReb9k37lSdFD9knVOq+tnMgfHkM9XTRVQ0te2eJgbXR63zpIGhhgtyDKCFJgV9ZLUt+OtqO7k8z58fy6/gYEPqHUDh0PuL4XFOlqUPBuPGkjZuOmHivbUYDoX41kwh7OIkcztIb7FBwNrlWtvq+Knz4XxgF9QNWcgCj5JCHN6UzoNZmyJ84BpacS7x/MgXToLezrcDnhf2vA4Phvjo8xh3LCGZW26hOiSKO7w== 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=tV8I4JjD3gMWnLgtLxtbyH9vZk1nNnZoDf9p2hXRPBw=; b=Bcr5XYY8u79ZQVKSXmA+EncCOyCGPQx6u73FO0asHpbZE3EuMdlf1Wlf6t1raS5rIi910eqE3iVu2uP7YLXxhAZ9YFl/FP8vFbW0zVjYxtzeaa7aAGLcOdIp135RSxHIR4Mp2dckAVDWXVbmzvHoz/C0NBqwIXIrHXZXliU5dhQgPeuJO8BSPlD6LJiLW/u8DUpCnoFd2o10AU/czMgWog41HJoj3SdKPylJL5ONHdh7tL5uqyDu8SNLDQImYQ7lBuyRUjC8/fqPzd/7iwIsTOo/+qF00ffYBscB7Muf/gKooP3QFIVX9YRXRvIg7Pu8AigBgT13RGc9ORpOFSIQcw== 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=tV8I4JjD3gMWnLgtLxtbyH9vZk1nNnZoDf9p2hXRPBw=; b=EL/XZqNrdJlggrJQsWg/IEy3jZG/ds2Wl6OefKzXL1DZwSfvjjOslImPcHl/ISexlpwgj2yEgpC5ePsrrViVgkQgUuNX60tVLYDjNDHLahuJ5MiAkyPTHFP44VTttEN1q8m2oz2WHxikKKHe+iEPRGUTjD/KHRotPAV2CJj/P9E= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:25:58 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:25:58 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 05/12] dmaengine: dma: imx-sdma: add fw_loaded and is_ram_script Date: Wed, 14 Jul 2021 02:41:42 +0800 Message-Id: <1626201709-19643-6-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e639e16b-ce30-4ae7-4bde-08d945e89aa3 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: djmkMflvliSP/Mz4eB9shgfsKjSJ/Wkn26GKN2Pr1cNiWxBe8xHQlbhkS4yhK3+O1OVuKyQsU8Vzf+53TG0w+G49SWoI3Kyjv8kpwoGdtdjj86CMIDwECYtngwaEOYdLxRAb8TmSd8HUZO8ypSny4kS9XMm6fa4VVWvOprwALkxshd0bKMy1f2YZLuIilt+oK9+b7AHO4lxKucrzwNIqxaSPL1LZQaIgiixOiNOVBieayaSCuUrQP3z0qmjp+pYIr3hNxswOriRB/xdzc6mJlYFuXyJ9sIqV/Fhyn+kok+GiZzlFizZEQlYCF+iRxr8F+4o8bLnFhk+xJemZ8VPu4c8bpdTDWuSr4mgJE2KTVbrWlD/U7WVht7gxYi8PdNVTAYLnnt9FnHAiZM54w9NALgnONJkGWQcUH2Swk9ud3XPZsjQZRd9De2yjAtZ6qWsewAyCRe4u3oBPVKaCdvbiskaS4tHcUGhj0CP0nV81IeqcQuXF5VfpvKfb2mwY+m/gAVBfsfB6FutKZRCGLDHULkR/+EkMASZPIjvZnMYvPzBjXFXDoyLsYwl4TqBpledwil7lJ3lyeRdfO7I1+eUYoMXpjDXzq1a3NqulphKv321t+/34QTQ6d4o4i4filf88D263T4fRqZLMrYv9jVtWlrEsrwZG/zgxhJQZpAL9UL7umrtIja8r+ZW8Bj66wylgEAbzYoAi0BIKJtQljpB9jPdDqaSF+Gxb2EnN+PbDTWQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(83380400001)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 7xOK2Sr6nz/XI0z2oGDeBvaKTwmkd/BjRpeXvR9EQ1nOwAf99BNtKC7We92+JfzdkfdyheSjBAAVQy+943N6Treb0y4GOzvVjCKeJG/zGoyrRTme23yE0lbgbDddCPokGzc8ricRzum1Pw793wwLk0wy/i0jz1X07l0rtXAJbCYHxa1wrwg4I18WuC5ZuXYUskbAlXmmPHxR8fQE2qTFKJ/U5yDkbCPnrWU8T/ikS0Jxa1QOwMca8/TJLlH791wP8L+BDX0gXJLg3P0fJMcB58PexQ3J9bnPBD+HdsBgzWtWcmRNyvBeJzSQJXT8f1dbMr5SwHNJh9JCusKWfMGgWrJCuhwyzeW2roXvBGGjRFX2nct0qhPMZeTnVfstt7EfCq2Clv1WLzL8PLqk9W7HggPJI4EiOFQuPd/BThy4OAYbRmorhSfvNnKnrjZqQChNnBE1d/UqM8bNTxFY+ZiIJSEc3bTB8TwK+JeVU3XlYZFPApBbk0rce+C25394LApPjbYbsrqPwASjctGGK5mkAcJj0OkJz3d4hcnrVIA5H2hjSn8hymoTIfHdCTnLBKVNjRg10pvhn9NI+tsQvfDW19z4qDb/FW9N+5+C1ol1G3lGyPOyMWk56qhYUbEdpNcZgsutIQHYvF4dzc/d5ed1FrKnI7BkWtmubmMphDzoQXU9njFDZjc7rWVMxoW5YyFnD+R3fJSQS/VTc5VGv2kvRNb+PJ46niMk4umXGHNGG3PFfdmDeQTCRq6+fLMuv7dEMjFaOwWw/M1Vg9sYtIuLxv1Y1CSxbZU5V0HtAch1Q3ICbyKiOqxhaeN3EovA9G2XjY8/EtYDNXqz0fiGX93HveMK0Jf4SCeI+H89+0qUidOeKjm0GYhjRT19FE++iAMFU1FZm5c4scVbdyS5uccyTNfSkwkYKS8RWXKHTdk+E+BKMC3zAq7F8oB9glQAMwXMdexFF0UQ6lwWUyBeyfpYxg8fjOWUlYzUyTh3DSlQEzxJk6qCMMeN2HvZ/eOx44tYYSQc68ACbeWXZEKuzWsYuEvIz+rif7XPGhrTKQZ6kq3KfcP8DevRuvQkBl3Z/16FF4P8d9rDmxHaiyRJQz8WwZH5+k0tXldebHW/kPYLo0l32SifwJlHl7p9IBjzpPMfnh9j4kbtJuhIgnOVqgfyUk1z2qtPuHkG4HQHXAHW5bJN7oSNClnNlfLHGPsMJ7ei1yeRRK/6L0+1FM4VvHp1SWCHHtNYwn3/r4J83PPJJRHfb47Mi+LICLy9pSOTgylmRke3sbzXaIB1pFN744GuCyY3VxK1vM9ejokL7uQCdKJLE1k56pTn6k8IHoCbwfq0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e639e16b-ce30-4ae7-4bde-08d945e89aa3 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:25:58.0507 (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: w2/L+WaCjJUAZQw/4v2NfELC79J8DpZoIlZkBrnjVS5kjko7ob4PqGMRxZGtJ02pD2kA22ScF3+tyUM/RlyUYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032601_332535_2219C30F X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add 'fw_loaded' and 'is_ram_script' to check if the script used by channel is ram script and it's loaded or not, so that could prevent meaningless following malloc dma descriptor and bd allocate in sdma_transfer_init(), otherwise memory may be consumed out potentially without free in case that spi fallback into pio while dma transfer failed by sdma firmware not ready(next ERR009165 patch depends on sdma RAM scripts/firmware). Signed-off-by: Robin Gong Reviewed-by: Lucas Stach Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 665ccbf..639a783 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -435,6 +435,7 @@ struct sdma_channel { enum dma_status status; struct imx_dma_data data; struct work_struct terminate_worker; + bool is_ram_script; }; #define IMX_DMA_SG_LOOP BIT(0) @@ -498,6 +499,7 @@ struct sdma_engine { struct sdma_buffer_descriptor *bd0; /* clock ratio for AHB:SDMA core. 1:1 is 1, 2:1 is 0*/ bool clk_ratio; + bool fw_loaded; }; static int sdma_config_write(struct dma_chan *chan, @@ -953,6 +955,7 @@ static void sdma_get_pc(struct sdma_channel *sdmac, case IMX_DMATYPE_SSI_DUAL: per_2_emi = sdma->script_addrs->ssish_2_mcu_addr; emi_2_per = sdma->script_addrs->mcu_2_ssish_addr; + sdmac->is_ram_script = true; break; case IMX_DMATYPE_SSI_SP: case IMX_DMATYPE_MMC: @@ -967,6 +970,7 @@ static void sdma_get_pc(struct sdma_channel *sdmac, per_2_emi = sdma->script_addrs->asrc_2_mcu_addr; emi_2_per = sdma->script_addrs->asrc_2_mcu_addr; per_2_per = sdma->script_addrs->per_2_per_addr; + sdmac->is_ram_script = true; break; case IMX_DMATYPE_ASRC_SP: per_2_emi = sdma->script_addrs->shp_2_mcu_addr; @@ -1363,6 +1367,11 @@ static struct sdma_desc *sdma_transfer_init(struct sdma_channel *sdmac, { struct sdma_desc *desc; + if (!sdmac->sdma->fw_loaded && sdmac->is_ram_script) { + dev_warn_once(sdmac->sdma->dev, "sdma firmware not ready!\n"); + goto err_out; + } + desc = kzalloc((sizeof(*desc)), GFP_NOWAIT); if (!desc) goto err_out; @@ -1613,6 +1622,8 @@ static int sdma_config_write(struct dma_chan *chan, { struct sdma_channel *sdmac = to_sdma_chan(chan); + sdmac->is_ram_script = false; + if (direction == DMA_DEV_TO_MEM) { sdmac->per_address = dmaengine_cfg->src_addr; sdmac->watermark_level = dmaengine_cfg->src_maxburst * @@ -1792,6 +1803,8 @@ static void sdma_load_firmware(const struct firmware *fw, void *context) sdma_add_scripts(sdma, addr); + sdma->fw_loaded = true; + dev_info(sdma->dev, "loaded firmware %d.%d\n", header->version_major, header->version_minor); From patchwork Tue Jul 13 18:41:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373627 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 752BAC07E95 for ; Tue, 13 Jul 2021 10:58:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39C8461249 for ; Tue, 13 Jul 2021 10:58:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39C8461249 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PmahvumpAxLxGAB0p4CpEfDNh26Hj7Z6N6Hn9ZnvWxo=; b=EZ+cKLtpFWb7h+ tzJCRFE1GqWWtefrSdmmm6m+VsllmDV48zQ7aLzTgjOrWb2BiJRMjzL2Mev1HhEEV0y/ZWOn1b9j2 cVkm0rNJcBms3VyjsFUyZXVbWnuhvB5YRNkfg+hEhRzMeDboFpn3IZ2utIYu0yC7Oft+wKwVhD5+w wbxDlO2UPpntOQiucC3U6weYUezYJvFP0Li1Ma9wKJvGRvgsqYkJbPT0cH/UWmLMmmercZX836elH Z+mpun2/qpwR5y0gN1uLczOj++MGWhXRCQTUlWwCDc8RNPJLTrrbCw690d0TcV+VCxjnAaM3Y1QBC vxIMvINYoMTHNBxo2Wfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3G3l-00A2vM-6K; Tue, 13 Jul 2021 10:54:45 +0000 Received: from mail-eopbgr20086.outbound.protection.outlook.com ([40.107.2.86] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fc8-009uY3-55 for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:26:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F9QYQl+6fHbf+6AeqSZK899HqSymO3PvzSFdlwBxPPSwoY18/sfLbcMLCPaFgO/+WImozy74ocpGEv4kN4h02fudCRLi4nUlfYtd+x2op27ClugxPqiIpnEEomK4MmDIOMKUI3ALQPCvDCsADoKAVqqQ+juoNWOUuqayGwr9VYs9x0GkwK7G0eqrLocBWhD0nbi7ogahP5dNqgvc+fqJhO2jNQMJutrkGTzeX0o2CtcGDnGOPEuSVNL9Fz9PXQKFpI6uMZHmPk1Ir2LhuKgfPXonNSeUEQFVKJps2CNDiBj6hhVKaPpfDCbFHOPvDNfbhk8EWXPQ8eAVF7+CArsJoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5D2/Czfs1P7IlGvBqmpgpZj1U+vvrqQzpMQiJsL/4x8=; b=LlSuIr+DTVR+Pldl/undWtgi36knylMSxYm1ZyUPvnMnkAux2PLKOZBemiip396F250Alwzd5Hz9bfV4hPY3T3NX2yxrV7dQYTKgLvtmpnHBWMgUn+jK1fLNI/P6EMoEYStLK4V7b71z0UVs9D37HQwDSrt8WiUi3DEkXwBnnWDNJnSdOX6Qod5tJJcHD5qHYTUb5Nj7VpyE4duFrnZjqLVArChaUJYTHRDnx3c6BPs0vEk+xcwYnqhtNahg5WaTuPSxRrKmxgRcVeUrQtZInQL92xfvxE1V18IVh+zxjua5QnAL2pQiUbVxi6viHe+mNWxifwJ0Rw+5YzjlF16F0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5D2/Czfs1P7IlGvBqmpgpZj1U+vvrqQzpMQiJsL/4x8=; b=dQ2kHwt+K6QH0extTguJg/QfQQ1tOy0VPZbYJzEmjA5aGNM3/9kIGLgSFn8ubAERcA3rmNKClajHfFQMPwivx4betlmaLkpWN9Dyf3cGRA1YJ/Ad8n6kgvgg7uiOS8fF7/oRZ1hIXCJQ++AZiV9C4eQIvY+rFzB43S3ZSr+caSg= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:26:05 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:05 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 06/12] dmaengine: imx-sdma: add mcu_2_ecspi script Date: Wed, 14 Jul 2021 02:41:43 +0800 Message-Id: <1626201709-19643-7-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:25:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9de4c7f2-86d1-4efa-d14a-08d945e89eaa X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:361; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4zQcKeZcj8dhEZiAmEoMv4o+MgXKF16mcfCx4emFc5mTmV6pyae/qpVRlgmDo8dsdywfHibfY65dqAvyRlGfptRgxe3X8LFK7zi2WjyQvOeG74SzlO0m/VapkJauhaMrPDzyt1sKlWCiA3wEw98welyJyfVZ6hRUnd/LV5gwND7c+RiMmCxsR/VK+Vu5X8BiTjnYdXYHbLX2nO0hGu/Sj05L3edTLD7V5JIzNC+tVYaSMdCpKu0AVW0LxlXPIW5dyVskLvugaYPlI1TDS0nGlsQ4G5ZGi0M3LyIlmruFRQZa2Xv2BIV6feW5BVkc9Rr8nt4aHwTBHVAvsD2G7xH/u3+xo4p42LZQRCFYQxnUbpVc99qalNjyA6HriE4Oz+0VhrtuqWoP5J8kuJMQgQokr6DDUVeWisapz3gFvJdv8iH3ONhaVyNV6wUINPPa6tmICbfGeZ9H/syZMwiK9yrCyTEuzpReidagME7Ilh/VTH3iBfrLJGs21B/H7qrhpVmCJcDjjOLtVzwtH5I4ZasNqSktCyQg09pVVPHeN2ZzYCOUjhy9JHkAUc0c65utysYcxpg8rqkUJrQ2CWxjxFmQe0KHXkv95vml+O8+yQlev4vcmpC4lva3AnGyxyi3jrCkR5/QDXph405bqgLj4Lm69lpHThIC3cKZzTYG3EEdLaksf3eXKfAkDf2nu+SZ0Xm2RymKFIqvJsudkX4PZTBM66IqdOmh2Hg7wTdVSXBPCi8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(66476007)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(4744005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ukQcSG7j3zXW5VOzGIE7DLktOAWy0cuMJ4BThMnGHc+mTvRuvC9K5VwlbDj6Eexb2l45NEV4IvuyLfg9xVCYFTVypbqPx+wjb2iYXB14/UyHEu5A3VhAaa5RVD/H5ryg8icuXCEnfqmTbDLRpx9LNPcSmD1BdSvokUr1jPSsxODVtt8c5zd09qMrcw1YyuXBwc/NfA+ZT3A6u6OyqH236bTZdlJ7Z5gy27hJN+8suDLtLwZoovrA+Qil4Y6clVwe3h1E1R91Oh7VA8HzY7h2RjOL3wZdOFI2UGP90R9bTrHq8udrOXOoe7/Qe68wHTFUbsprG2ZNE+Q7sYF9QMyAeDSvn+xQpGLys+xVbnFzSgmSghYsyDeAGXA8EXLgKi6usPFNSAWUAdqsSKWGxeeT4+goDjyhdh9L8M7bNfYxzM+LWRHwndSShF8heyctwGvGzeVcfZ7DkvI+SPlUdcU8obTKOAvL6SW9gyUSmD45zUbXX/eM6OfvczyLPG9jeM1xCkbG0GjpIH/oaZ9eBl4Ljgqfs64gKvWeZPdLNH7TdxwpzQe2WmKRT078i/CfotbnwSC7vU2/ehdo/lwUPyDfBN6v0ZTOQB9EfEj6gZGbYdo5em9ZcnBn1U1Tiv0wCIkkcuhambFSemenOn6UHWHDkVDClo4jbMLQJJ+MSo0z0Z9Ga1V3cyD8zN34DImZj665WLuv0WkTCu/bJP/2j5ulbity8DGTXVHRbLoiGjZZefQbcf9XHe2QSPi1jDIMgJAUx/S/+I+7852OfvdudQpTIG7PKi2kDiiEBRGpXVufDjvTPp6Ew/AHfPjkjtUUUdVyN5tz2RpF5H0shKNqTHAhyr8GVxOMEoQsKTJ2Gwh9O1on5kXPjf3jskG7B4oiXLlkBfdMV06NJvjqlJaA+up/PCIxjQw0/2mKFQn6yqITj3WVjIz12PQ0BYwkvwt1bj9NtoN02PoLhwslCRDlaJlF8LEIlR+skZRMjy2y3xPreUe+hsxYWzZ/dAr3UpX4NCZEjZ4UdvnUYDml6ZtumSf/pUeCnaeWBvDX8bK+xtlpD1MKY/o/dXEkexEGNlstvKR2dGWKDIXr92ANWyEnRU9tapqi6XQHBN3yj2W5mxYiWN7C7N23h06Zbbv5oRFFI6uFyA6t6QPomdZm0ooNLY0O5x36fWjwdSEj80o0KjWeIPUFFsBIYU6sfJQPu4qpVMUCVWR92I3AHfmhMePSQn14t0/9ONQtt+27e1kewSV8vgWpFfa2Ekmke1D03K09kY35FZdE3YlK/EoXhBmwLJaZIEjK1D5uYeGGffUkA25ZQqRvdVpzxSXj1uEtoNmBwoja X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9de4c7f2-86d1-4efa-d14a-08d945e89eaa X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:04.9368 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zptVrS5cH7TMvVRhjgWvQNqg/yyzM+qncVn+j9DZ75NB3gQcFXJuYltCUobFxM6f21+OMxdOV7pVGEJI4NfYLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032608_254492_CEE00D06 X-CRM114-Status: UNSURE ( 8.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add mcu_2_ecspi script to fix ecspi errata ERR009165. Signed-off-by: Robin Gong Reviewed-by: Lucas Stach Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 639a783..4cb2e84 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -946,6 +946,10 @@ static void sdma_get_pc(struct sdma_channel *sdmac, emi_2_per = sdma->script_addrs->mcu_2_ata_addr; break; case IMX_DMATYPE_CSPI: + per_2_emi = sdma->script_addrs->app_2_mcu_addr; + emi_2_per = sdma->script_addrs->mcu_2_ecspi_addr; + sdmac->is_ram_script = true; + break; case IMX_DMATYPE_EXT: case IMX_DMATYPE_SSI: case IMX_DMATYPE_SAI: From patchwork Tue Jul 13 18:41:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373629 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4008BC07E95 for ; Tue, 13 Jul 2021 11:00:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08C8761279 for ; Tue, 13 Jul 2021 11:00:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08C8761279 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kEbQ/rPmUmqCCF0d/DFyQKy1NUv79Mfvj94Lu2d/S9Y=; b=H0cJ2l3E/ufonC 78XnvVP6A8fqWTMU2Qwpt6N/aSyeVCaoTug59oDUnUV6jmDz3KD2pORpp6edFWZ+Jt/tUnO+Fy/Sl pUaoELktaF9Luo0RC4qgxnhYqBQ9l9s1HDdXJSwCEXJHdhEDjA8lhRKpMsp4VjD3W8JacFWtB6lsr YC9+vLuhQ02VyB4GfxZ1+Gq44qOuNrUNIpQDLCClqnkAg2/G8Bx/uarBP9ZadoE+Q+84GX5QiywKO VeqmSLOR+QPRN9c4rnVhgvT9f2GHBjIUG1OUPN3WtE9s3ES53c3tU9Dq6TjQTt7e/0ik+ypfLKxpp qYm/8sP9wBddQNAJ4jow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3G6G-00A3QD-OQ; Tue, 13 Jul 2021 10:57:23 +0000 Received: from mail-eopbgr20045.outbound.protection.outlook.com ([40.107.2.45] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3FcE-009uaS-8m for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:26:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZ/MPoxV1ENp2mvGi6qzJW53oy7ObM0ZqMzoxg2xAEX0qp1ZmVdnGdJvu/ahkvd35Gx7wt+EnAjalUs71X1TvxaD7I5uToVQmOD2oJJevXfEps0RHdV+Tqo+HqtrdgxB4utV3RYOhit/ZXk9q9XSKqZbKB6Q/T9DNtr1fUrhm/4SiXctAXBeVQsxcFSnKVEVe8M+ok+kSNqYzoVP6wSkRlg1GvSrqpskUl/j4PzG12mP7XNwYUnOkc3naroUg8NX61ZC9sqDKdy5rf3o4JC0sTSvlHoTVwMDcy+zGVfnrXdNwzecRAhugxOVpx5SIJi1FjPaPRH5xB8A28e+PXgvSA== 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=sNYiV5p+Zer9BF/iPd2ivN5XQBG3Brjn3etpGvNEgl8=; b=LUmWbPESvfQ4nqeiLpY3Etr38XFQKPiKUVo5wwTz3BowJkl1+KY+QktJIRo4nh0tcBN8KzrvOosWTjY0ABoxdNF/EOnkCjaieaPl+N+bfKLrbujbHp5qlkNhGRzFrjyN791EpVrTOhXCCmHlS+RRKD9mk18iRZ5TZWoBNbgcj87pJYDW0Uayebt0PiWGrsuW+5treSXh0rpwXgvs0DlcslKwgA9paiM2rns6jKH2gw2NwZyiOfZ1Ys5llcRosr+Herg2IOmRtclpC96CgUJs/Lt89teTeyY5w7Ut09pQL3wNms08GZTO3rATu7yWG35wDt57zOzZdEu0S+5pqin+Ug== 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=sNYiV5p+Zer9BF/iPd2ivN5XQBG3Brjn3etpGvNEgl8=; b=MSAfVND2c4MiqsvHj7VvW0HlbvZlGX9IdvY2IJPZ18MOswD9lR8u8gqeAe7FJL8fLbmc9TOaqxIK5vR+v+4WPtYzzrJRyLZ/Acxu+XD/5Sb36pZATcyPsRWR1j5mLchv1n9FcpuBRDS2GtJY6B5FzFn1FgxwyG1xAWNma7TttfM= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:26:11 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:11 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 07/12] spi: imx: fix ERR009165 Date: Wed, 14 Jul 2021 02:41:44 +0800 Message-Id: <1626201709-19643-8-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 261600eb-471c-4561-86ac-08d945e8a2ae X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y8oRlH5KZPDYU/2PKuOqY5FN6u/Jh8ZvuDKJfJ+0xorLR8L13pokOn4aS2drOQVvHH4Yt8uCwPgvIdYOjPV06f1+xUwIYjam7EZCNfjDoKDzo88a7jn4YkbCJW4fHAmiQqjP7aizDck6KLrM5o19v6FDt1JIpB4L1jd+1u4gStbzxmVX3hTqYE9lw27F+RTYWJC6qb+rOh+eLHefepLBXFOy+4drzHn4aQ21VaKa+PH8ACcsfV9H1gAJX8KsBQreYkShJZiZ14Mkx3GMFUhoKMPJM7aGlTF41/Jl5A6YOWCg41jUCcUBcwtbRGGVBSWzAxLrK+XYnEY0x9FZD0YG21Wppd9gUjTeL1tvQinOO4u28Q0ECMeKl429SIp+1imyfkT5hCmp/sOZVDX9V0FWP5q1zzQ7YjNEaPYGeT7iqMnUdxn295vVESxl5U79XgkRQtSatNU8JNdDJ830ZZoj6A2I3PQLjPK5u4swH7/N5SMYWjGp/G2p+2H947QpnoaAqceCH4B16ByD1KsFZ3ATwhAj8Yv+FC2t5dsxU4ZoNsfNUFFw7zNBK7+r/TjJyCK3wM92Bs5S7Opes3qtnMicopclu+8azagssjCE9K2P4DB3MlQ9ATHMaQxuour9vWDPaE1T3H90sO7GnHWKHbdZCMqGCjjyQNekDDUMZfFLA0ccl7FHWYzJIU2z6bojnKEqxTxUUGXFpqExnfe14H9No+rGcvpAKBfb+l7eNPcKqWIEryPOkHhbd2bEaTL0BVpT/LoQ5pG8P3OvwZDGSSlq91QcwJmbxpIOHXv9/ovUagZhfKjJjSUQs1wxIVPZ1wKP X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(83380400001)(66476007)(966005)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0CuerAGN29Q+tP9WL8vK9/8LaNuUz/ra8S4YdpkSybLz7hN53X9IHqO9OmbnHrQRU8Plc7bouhXSh8k6AsemfFHv77RqVmx1quz59FWHUJADVHh3VJ0PRYu23MYKuy0Yl2nqaNBaWWb5s60ZvjTB44wQdOqbFimoqJIhjgAW7isoAuQshCs69Z5/Hbi8/1uQ+TX+x18FQ7NCWoqtV/yuZEa4lWfkqB8gdEVpDl4aavzmwFJ1TUmVcK4Ms4lTdvK4xXAbtrPs3edb8Y6Ajxct03xRkV2CPs+6WafYXYb1wyqM9yY30v82/zAnkNVhDCPyuiprqJopK8VEpAsNm4zNHSby8HPu+M9ghBXKD+NDyWexdRw7HCCr310jYrZvnIe0V2hdhgHI6jtw22Vs1hZJU/9AKlw2ztLTXMi0E0Uy0z+SRA+J0NwdpT/Pyd4hFrd/0wOjSUt0CHavN4tIJXvX7mEnZaW79Q4Ra622jCCFeY35rAubQ8KLJGuDETqDtWjQv21dzq6cMLk5xgLFj0wWi+tLH1bAg9ACDyd66169DGHP2bEPKtJbC9MYZD2DF9jdH+cSkX+fe7MKzm/95hWDC7zUlSeppwP0dLKT3uAfBJWXvUUiAN6ukbrQERjfZINM2HcykWAyB5c19oKCedyVo0pE5HFFqZ8ah1ppkCOGpl3dYEw8R1O2cnVbYouCowZW0rSw7IgSs2GStMfpU4DVQaMtZF3YLA3RDiMAB7xGMfWJ4rAUqg0CdA2vYOTVJ3FB4dVT6ZRsRwm28fIwqPL/Hp7MwM/tpuY6WrHqNmmTqobwzP43zTy0xE+dcPN6x48T6ZGl+8gi6if3ZpHkFt8EGrjJLbSYPXN2fs612YB6kAXNr4VsDFQh+iOxCfN4/xDruA2cmLUxhEcKPsT7vjf/9s8aRp06arpVzbpvrK2vsZDWIQ1tmc8oBNTazpW/xKuZgq4xgndsN9KpyXQBpqievwMn3EKSHYPN0YTi7cJJiqj2wPx6gWZfZDovRFpStfSoGFIgC0pTE9RXYNq9Slkd6hpVk+InmXVth4QD0S1IdbO/3bZVswF4695iLmMvnzvTjbPIZ2QNFY7FyXydui644n7NwJWl2RefBvNoIpbsXIQXOQAhND6fg8c9pxf6CnGBrGV1haKeJaoyDfzQm0ieWuzgD+cpSxCefTyEJCJPyQP/k+FVcWF6DYMUQQqjRgaof4sLNT34y8D7qy2FXiHrxsLPYP2lIY2ya6SfWUkO80Kv92A4+B/n4pYm2VevkErjvFik5yfFMPchndI4c6S77VrTIavRHDA6lln8YG1Voy/UHRWaclicvUQwdoiF1A3v X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 261600eb-471c-4561-86ac-08d945e8a2ae X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:11.5430 (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: Pj4VGHipYWsF4Er2CeAaYK3LVm5WlsGMMzbuX6v1ZTXIpr0kfNz+9v29U2WoiuPe0xA/nxIjfM5EUi+qkxV4xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032614_379702_0E3EEB29 X-CRM114-Status: GOOD ( 12.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Reviewed-by: Lucas Stach Acked-by: Mark Brown --- drivers/spi/spi-imx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 4aee3db..61e4fa0 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -608,8 +608,8 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, ctrl |= mx51_ecspi_clkdiv(spi_imx, spi_imx->spi_bus_clk, &clk); spi_imx->spi_bus_clk = clk; - if (spi_imx->usedma) - ctrl |= MX51_ECSPI_CTRL_SMC; + /* ERR009165: work in XHC mode as PIO */ + ctrl &= ~MX51_ECSPI_CTRL_SMC; writel(ctrl, spi_imx->base + MX51_ECSPI_CTRL); @@ -623,7 +623,7 @@ static void mx51_setup_wml(struct spi_imx_data *spi_imx) * and enable DMA request. */ writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) | - MX51_ECSPI_DMA_TX_WML(spi_imx->wml) | + MX51_ECSPI_DMA_TX_WML(0) | MX51_ECSPI_DMA_RXT_WML(spi_imx->wml) | MX51_ECSPI_DMA_TEDEN | MX51_ECSPI_DMA_RXDEN | MX51_ECSPI_DMA_RXTDEN, spi_imx->base + MX51_ECSPI_DMA); @@ -1239,10 +1239,6 @@ static int spi_imx_sdma_init(struct device *dev, struct spi_imx_data *spi_imx, { int ret; - /* use pio mode for i.mx6dl chip TKT238285 */ - if (of_machine_is_compatible("fsl,imx6dl")) - return 0; - spi_imx->wml = spi_imx->devtype_data->fifo_size / 2; /* Prepare for TX DMA: */ From patchwork Tue Jul 13 18:41:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373631 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=-12.7 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF4B7C07E95 for ; Tue, 13 Jul 2021 11:02:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AB7F161288 for ; Tue, 13 Jul 2021 11:02:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB7F161288 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jp5LDNFP7f2p2IW408RecD9YLjJ9rGsxyu1gZ2VwaDw=; b=Z1gRIzJti+rf9k r4TWn+XKcwHyXIT3sElil4LRKyl1q4prnVAlcsr9krNvbxT+Ea6TD+rd5Gc2FbXuuPQ7pZ533r1GV x1ewAlzahtsc/j6vV89kE+AHKGZHr+qlMEtgNNMdS/xlFMVACoK5/9M6imEzNjvYGcUCyugW2KJuv 8VWIUi8a0V4nSVxE7fA+L+8v/yufvvh+GhldYraLRwXMFjoVaCwfTDHN0KZ2mh6Us6ZY3ZalSyjpj cRNORbTmDDeQox8nShH1sIaoLAvm4JaC0EjfD6nA6uyLRsP1Ufy/ZFWKq4TkkLWDAP8Uvt69CutMN of7FBMH+3adshwPzmR7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3G8I-00A3uq-8c; Tue, 13 Jul 2021 10:59:25 +0000 Received: from mail-eopbgr20070.outbound.protection.outlook.com ([40.107.2.70] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3FcL-009ucf-5e for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:26:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEO7YItxXInSgDbfOHlQRdpl9O7IYG2xeWDZNstNipUCv3FTNHdTz48elLDKBm6OjRLwlkvb81tORTTGDSgx7JmrUGNiYRr/gYZ4xkx+80RD+XJDkc6vsUJdZcgRcSKUJV1Olw36aZkd4P0uy8CuToZN8kXMdzncEPW17nJsxOzROfQGVXJy6BUb+RsZtf4F22ELBWdZPolHHWDFZwe6PZsuFeH/AbOGrQH9wWQeTaCwCrmY+ndtgkraCY8kKk1Faxheufq7TwnjUUAX5XhYfQZzVcBm4MGd49v3tqn1i1CS8h8FRC6PZgG/MxB4IcZ6Lmvwe93yId7cj9H1SKBZjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=idwxBfwcWMgbvSDKmIijITAOmdmaYljkCXfE7OYchws=; b=DWLGTG29EgXsB25CFnvUhzTIkeKvC0Gtfw35PqVJ+uy8dt63yiRvdublx9H0neGZXrnPQJzF2wdjTdUd08+gPmCHlCWjsJhmccno4arTdf0uwPIwQLGXBhDhtfMxgwiKKa5WK/Ei1B6jDJKZePS6+Al18zMV/7bOHvnDAPBxTSGq2uLoSNF+U9dJAxdFyVdfwmLVnJMGRrdaqF0W1Efe0bC2krJ4dEPnvWH3C5gCZLU2tWpwhs9ovAyKlP5ElyvUwM8S1+byNB0YkKK+P9WfvuJpfg44Pxmw+BgGp4uX+kBdY9RRMvsCDGP9SPv7qe84zch/kmzBam6RVNRvMWng6g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=idwxBfwcWMgbvSDKmIijITAOmdmaYljkCXfE7OYchws=; b=lnIevpDoGT9eFWgodTXsYISSoTYhgyWjTizYUfffgck2MGayBcD9FfQBl2CRGJ6CiSbuD6mMU3fodjigrX5pVrKfQnHrhIY3sdpPKUmtmPhelQKQtFxRQ8RLkhJ6vTM8/T6KLFvU+LUrZxnDQpqf2JGTMchzwAkSl9dTlWXVPU0= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0401MB2288.eurprd04.prod.outlook.com (2603:10a6:800:28::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.25; Tue, 13 Jul 2021 10:26:18 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:18 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 08/12] spi: imx: remove ERR009165 workaround on i.mx6ul Date: Wed, 14 Jul 2021 02:41:45 +0800 Message-Id: <1626201709-19643-9-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 073d1d5f-1e87-4e89-7e93-08d945e8a69d X-MS-TrafficTypeDiagnostic: VI1PR0401MB2288: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kUEKxUYjJg73ENXslLwhm1+R5pKBXcUciOGuahaEMUt/CDOty/srCwhC4jBmtZgkfzCnCi8VwXoOdm//xoffhHHvZjfrj+RoPN36JqjWpu2NKuAo2UI4ES95I7YRTSBm7dPHhwBlGgw3KZlRO2ditzRpUq7GnZzMNQzvUWlA5jkf8RP1WKp1sBsV+M7r8qgInug/nGBYUN4GtgGECsAS5dIwn6rxvosjBZE3Xi+dzGtB9cR/IRz/amCJu5pk3mjOUNTELhShKEGB3iuXl7xcYzO2FZS1qix+wiflG2hSYz4sPgt+Sp68627gBat/hyKz89GrFF14MJlDUlTaigvrml26PHT2g7iIrx4cZ9WWkZUpsZQ0vzRYgGLjJAcxsyUbTOEoe9PZAOp7CZfrfIFYwuOnBMuCupNPYIIv/waCfQ94J4OZucTLaAAwcPgEhuPVLba4AZA6zQTt3tfa4TL6iPrvnuRjS0JdMcSnCYTFvU8Dm38T5zwWrwW+YNT9LhMIcaVm8cKxxvyOzlrWxyH5Luy/uJsQshruZolcJTwb+GKUoXZElRKF4Ggfakq68kvd/LFIqJ1mENHdgg0LNTXuHxdUfEbKy82w5sLPzPgNPXMabyHlHMvLo6V9TEUyAwa2xBa8eHVAVqdMrHl1wuwenus0cZy3anDJbhEh6+cgp/AabsJOK+QkHgOJtxccC8kpIHqLtCoh/DUwhY7ifHhvzlE8cliMlOZ7eR4S6oCWQ+KX4ic5/byKTPSa6N1Hxqvp4Vh+kLSgo02Mn+zmsygHEnTbnp18TwEnHDbSzc816vEteNUM6DNzXEWgMhvjA0xV49zKaHlMb7F1FYNE9arCodH8Fgl9pxP0fZqNJqTje+Q= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(346002)(396003)(39840400004)(376002)(6666004)(6512007)(316002)(83380400001)(66476007)(966005)(38350700002)(52116002)(86362001)(6506007)(8936002)(5660300002)(921005)(8676002)(36756003)(66556008)(186003)(26005)(66946007)(38100700002)(2616005)(2906002)(6636002)(4326008)(478600001)(6486002)(7416002)(956004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AOj3l9qaouTEr77MJWlZbxXLnD6qqXrQMD3jDzG89WSCgezn4ym0h1rhYwG64KAzCAj9aYZ6TLPQE3oCN1gmSUoYiK4J/AdAXOmKhTUohFhA+7S3m55NU81GTbYMBZlHlAPCQ8O2LwMZ0YeAsdz9JBRHryJhAwfjN/FGtHaCTUJ0LLm2qsTviKH5KORoC9tXr8xUk+EmXUBTsNrf+kqdavlLyzY+0SoeLfpt+YaKSowH1QatiV5eLuYfQRAlyu7XR4Vda579YKRrtfO90jqIK7QbxMb/io0qdE94D0+klEAeJ64z5CJwe3bcoDAz5VGa9Sb8bYI7dniLCrdRwf718BI5wUjaa0TpYCaCFlnrzIBThDGMLmPcY9Bs2S21zhA9BWHJB+9pePseXNyycvS430lxeK0KSY2hpJFNth1GNiuN0Xhxk6n56IM1fTjfG5R8af2l5F7gslOTyk0naW1GspG0FgzYZm2kRzz48ybqQUMY2Klab78n54vruzuRQMZOW3FuGCnn0CzHXqrsNH4aBGvQMdaqNhNUyNRMzMEC8u+CXELXnXYyBKpKzeJNaRmYARwRN19eYqfJNQyCCseLvm7bjY6xh+CqlluTv1norJsZEjmRiHKKi3L4BMFH4lHVGSTZtN1+f6nPhjkT0iAldwUALnyWj2VUetznNK4ZdTyuvXMnPuuQ25e3xyHKfNQwChx5I7NMILf9C1m47YRa13x6Uw1V/r5JL/u4NEVi1rBsWKr1DDctAbotV9cwtc71ao/Tp/jnaBsO2eERXoCVgtUfXBuAB68233rVWRQNGq6aOW+lGLBuYXp7UmkrOzuvyzVpKBpJoh6pdajf80wfeVqzxTA8sABxTT7HITpqEJByVaZMZFPL6kz8HQnUVoKPKMTc4SjxqA7tK20mCyFjICjj+pzqp6Fd8AEdpteYvTZYebM3L2/J0AyN+1wKM6qhEOx4pW3LMiSlQ7LkVNeqhjDNRFQ4xI9YZW/aXj9AR2W39QdRVq16uxkeVEq5W+J4dD3kCEV17tecnxJ0njb9e1AKOIcUwCYZKpIpugeVrTSUPsQ3vqLALRQNEiQHd4lU2DTeask8NSt7uCma1JgdmZKH5Nk+OymRIlMDXbLRlZpCQfYBS5UT22ZHzabZabLl9SI3c1T9Ai5nmH0c+H2TWIDMOwlU3YfOQSgAG62swErFopgEusH1+Wh6v6f73dqpsCy7oGUOklqEn9aIV5TnDbAGBPNHJBVKtotMPOEDv8iyAc8ERhrvsIdhVwT/PT6feNbU29HEgGiicu0vgvV92c0UHS29lu4X0Rny6JxwWa+1BmihoFRd52KiFxtJPsM9 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 073d1d5f-1e87-4e89-7e93-08d945e8a69d X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:18.2143 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YvFy0sHplrNiy8QI3N9MAi5/8lZT+ZNMb30pKFYIpSTQ10IkYs7f3ygZsoEoQCRjiSg7cCKfDDoJUbE5kScSrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2288 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032621_289445_13917DEB X-CRM114-Status: GOOD ( 16.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ERR009165 fixed on i.mx6ul/6ull/6sll. All other i.mx6/7 and i.mx8m/8mm still need this errata. Please refer to nxp official errata document from https://www.nxp.com/ . For removing workaround on those chips. Add new i.mx6ul type. Signed-off-by: Robin Gong Acked-by: Mark Brown Reviewed-by: Lucas Stach --- drivers/spi/spi-imx.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 61e4fa0..63a8d7b 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -77,6 +77,11 @@ struct spi_imx_devtype_data { bool has_slavemode; unsigned int fifo_size; bool dynamic_burst; + /* + * ERR009165 fixed or not: + * https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf + */ + bool tx_glitch_fixed; enum spi_imx_devtype devtype; }; @@ -608,8 +613,14 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, ctrl |= mx51_ecspi_clkdiv(spi_imx, spi_imx->spi_bus_clk, &clk); spi_imx->spi_bus_clk = clk; - /* ERR009165: work in XHC mode as PIO */ - ctrl &= ~MX51_ECSPI_CTRL_SMC; + /* + * ERR009165: work in XHC mode instead of SMC as PIO on the chips + * before i.mx6ul. + */ + if (spi_imx->usedma && spi_imx->devtype_data->tx_glitch_fixed) + ctrl |= MX51_ECSPI_CTRL_SMC; + else + ctrl &= ~MX51_ECSPI_CTRL_SMC; writel(ctrl, spi_imx->base + MX51_ECSPI_CTRL); @@ -618,12 +629,16 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx, static void mx51_setup_wml(struct spi_imx_data *spi_imx) { + u32 tx_wml = 0; + + if (spi_imx->devtype_data->tx_glitch_fixed) + tx_wml = spi_imx->wml; /* * Configure the DMA register: setup the watermark * and enable DMA request. */ writel(MX51_ECSPI_DMA_RX_WML(spi_imx->wml - 1) | - MX51_ECSPI_DMA_TX_WML(0) | + MX51_ECSPI_DMA_TX_WML(tx_wml) | MX51_ECSPI_DMA_RXT_WML(spi_imx->wml) | MX51_ECSPI_DMA_TEDEN | MX51_ECSPI_DMA_RXDEN | MX51_ECSPI_DMA_RXTDEN, spi_imx->base + MX51_ECSPI_DMA); @@ -1014,6 +1029,23 @@ static struct spi_imx_devtype_data imx53_ecspi_devtype_data = { .devtype = IMX53_ECSPI, }; +static struct spi_imx_devtype_data imx6ul_ecspi_devtype_data = { + .intctrl = mx51_ecspi_intctrl, + .prepare_message = mx51_ecspi_prepare_message, + .prepare_transfer = mx51_ecspi_prepare_transfer, + .trigger = mx51_ecspi_trigger, + .rx_available = mx51_ecspi_rx_available, + .reset = mx51_ecspi_reset, + .setup_wml = mx51_setup_wml, + .fifo_size = 64, + .has_dmamode = true, + .dynamic_burst = true, + .has_slavemode = true, + .tx_glitch_fixed = true, + .disable = mx51_ecspi_disable, + .devtype = IMX51_ECSPI, +}; + static const struct of_device_id spi_imx_dt_ids[] = { { .compatible = "fsl,imx1-cspi", .data = &imx1_cspi_devtype_data, }, { .compatible = "fsl,imx21-cspi", .data = &imx21_cspi_devtype_data, }, @@ -1022,6 +1054,7 @@ static const struct of_device_id spi_imx_dt_ids[] = { { .compatible = "fsl,imx35-cspi", .data = &imx35_cspi_devtype_data, }, { .compatible = "fsl,imx51-ecspi", .data = &imx51_ecspi_devtype_data, }, { .compatible = "fsl,imx53-ecspi", .data = &imx53_ecspi_devtype_data, }, + { .compatible = "fsl,imx6ul-ecspi", .data = &imx6ul_ecspi_devtype_data, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, spi_imx_dt_ids); From patchwork Tue Jul 13 18:41:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373635 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=-12.7 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2ABCDC07E95 for ; Tue, 13 Jul 2021 11:04:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E10B861152 for ; Tue, 13 Jul 2021 11:04:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E10B861152 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/LNWR95BrMd5XedU8BWWFSKAngSdXJL3Yj6x0AIGcBw=; b=ZtfO6E3rtPVPz0 8poot9MxgPabXEDoNWAKaX/aUPEYqz9+DWeCby3/9QshbIRF4mQeTsj0El3unePABdd8ZJhmmp7R1 +JBaS3uoGMavSxcri+Hy1IstvvER8wxq6v7/YS69/N4vzRGXlu5UCV0hSg6l2PEKm40dI0OECN2tv 8wP4ouXvQvO5o/Ukm/k93iwABR/WtQyyWh4y22XU8GaySSygGoInWbaDYV9SYlS+81tUXP8eQUVYh sOxUu58JtzVaHaPnAa97/kEu2RadbG2B6xTosQLKJaJamLKegYpJOtvJ0fMBQFiy81XI3xu5b5h8O TBL2FAHNKNYJJeFtn4wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3GAE-00A4IG-00; Tue, 13 Jul 2021 11:01:25 +0000 Received: from mail-vi1eur05on20616.outbound.protection.outlook.com ([2a01:111:f400:7d00::616] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3FcS-009uex-4b for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:26:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WzX9rj28NwKkRcLcRplILpYJ+I7MDisVyNeynYlkIAdXhQZIPBg3jg0F+LZsARpyphAu2y1fCjeBrEZaDX85MM25T7+2+9SyHAGpL7V6a8Pcw0ZMXh5QtpvWcVa8d0mrEbAcQjkM5//ZOnz76S6+czzXN0FT+Kn0A0gHeimGdeqwUjgu0I2mPwk66iYtPQN8JOXmS5DEIYWEiC3CkT8/V8PYQ5J9gHpVinEj0sglAO2ROVW8Lhy2YhNPMGqTNujVrPA9tswEZnlIbXMN/+I+2Ayl1EcWx8VbdhqokIJYjkQ50IRJNqDq+2EAazMtQjNZ0RaUdaUI0+KHxA0Ps2g/dw== 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=qEjpmt29fN/46Q58M7W7iDkd/eTz7X5EFhbFaAXZtHQ=; b=jsGYTZ9qzlSLQW6LunTnPAQSerIzK4POavYZp5Ca78CRHcKu1EvwHCdVmrOTXasBt0lXtnhleWW7j8pWJEYfR/CWARf+ZZNKL+VBHdeLidqkNEaJSGW/E3mMAx42SrYwNFpF1WbDS/JpE4Si7fu17oSTaTR1nhjSJgecrM/dmhus61ItASDSgslkvI6Ieb8sW/T/RbEGamKj2vwUL8xCbXYOVBxi8hKskvj4N8g0HgFPqiTpN91aJWSfeQgAqs5VJ6h7Xd4i5hBAn4GkLA/v/TMf4yuYzdsRZLqVNeGlbC+3FTC7yMpaX0pSYGHvHcq+lM/QFGuz5RbLdKuxRTwCIw== 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=qEjpmt29fN/46Q58M7W7iDkd/eTz7X5EFhbFaAXZtHQ=; b=KJZfv6USIis3YVoajlS3KIRcuHWbeXmj8mfcMjU//DQ9SPNMI+UM3rSTNegcxeYZ9dwJ6TQ++64F/a0sARZbVnEIasljCWBvUIs8eAVX/q4/5Xc+7fyzophEO8ZQZ0agUT+MK7ERrTxYWc0m1miy9o8sLAnXgy0kcL5L+fuVCqw= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR04MB6798.eurprd04.prod.outlook.com (2603:10a6:803:131::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.26; Tue, 13 Jul 2021 10:26:25 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:25 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 09/12] dmaengine: imx-sdma: remove ERR009165 on i.mx6ul Date: Wed, 14 Jul 2021 02:41:46 +0800 Message-Id: <1626201709-19643-10-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ca04f06-8e56-459d-dd94-08d945e8aa9b X-MS-TrafficTypeDiagnostic: VI1PR04MB6798: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6/TVlzEIYPtAiG2SfBjwawIWflj0CjsoU40EN4yZruwn9clwPpAtIQ2t13YqHtjPMtxT/G1Qm4fzoYzQekGvl2DjO9EI3dPJq2+c0WCFwuluiUEaN1r06bq8IdbGNDzfpreysEdNgk1RxREkHX8FEEpEL6xGPML7DIIbGPSS3SlBoTLmgtpGPQak637ANHpmK7CkExR70KRS7KnwZdkmzSo6rO1CLLY+xP8b7tsICNI62yg5cm69l9eaiFPTHe9YgHfjlsxbyn6eFJXbOTK0lPr1fqLN3TD2sNmEYd18Cla65Fc7E5jqfehGyGJPYGMCtkOywtTUE2avAOxzb6aLQ3BngJL7d69Xsq+UI1MtwU5I1gFFKPc+et+t491te6VZNIyzPxuHu8jhmBwNChhTRWIOld8rU0ui0BMXTgQHHlzHmoUdv6Y0oeA2pigtdC7fjXcInlAxMYxGAeVP8sFx3EOJA7nSlXQ5gd93yGgfnZoNAhT+q9TzKU0YgWGZv7W2bJkLWgdp+n6bWiBo9QNk+dWicphHmRmnECjIlZ5xrIVlV2gxrtUwyRANMQgRBfpvBWwozoey+EYvkXQXDb8dfEBJTMATVf/6Z2cZlKONHOHUO/lglpVP/vx110EVCOeE4ZXg7jnD4GWY/U9Hfjeg+Ma1w0WleRyRMUr3+ilVW77Nw91Hy7Ax4oSZYiPjlrbvDKsYs6Xu/dfr1rC/US0I9r8CajIqCWgI9Rsg1ocyq69xdtY3+NYRRegxDWV17INzcfzO8mypr9EhgrhPOECXEGwHL1N8ufVLGHPcK/WOsDwnprz20HJWRVje2af3JO7R X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(346002)(39840400004)(396003)(376002)(921005)(316002)(7416002)(8676002)(52116002)(86362001)(6512007)(38350700002)(38100700002)(4326008)(6666004)(36756003)(66556008)(83380400001)(66476007)(66946007)(6636002)(6506007)(26005)(6486002)(2906002)(2616005)(956004)(5660300002)(8936002)(966005)(478600001)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ajVanS6MQKcrJmznbA/WVd8q9ZNH/ON98VhiaUE1bobtMBkol58bnePgnxeQ8xXI+MRWE7CiUu0aACdBx+c3o5b/OYZ6PxK3pE9n24F7Hbw4aJCL/zP3UPO2ZH4Vx5dHvN5fhYTo9Xmf/b2MNd8O308ytTlPGEvVZA9quPJ/2FSm21i4a/Xdbm3mjJ8rsn1eLgAk0miImC2c6LyYbsd3b1fIXyibm5sSARHKkvGwR34dingxBvpyc++gUhCfJdlbpaUTdmZLyzvJeW59yGHM1zUSC2jekIhCnegAyUjzRagWjM8/E7I+IXKgr1eQiJeNDIwESvcl7zcdK+CECTROibprp5AvXuP6/x+uUEsTm6QikXiOZ6VPVMMutrQFF/51E6SybkSBQh5iODMxrqetdyx0zYMkSw9izL/mZ/oDUbeG8E3byCRserO3vyQ9/PP+FaRK+F4a1BbVTi1nLuomrr/MbxbF30bjUbZsuhToUg1cHZKTFXnEV3KONdetV3a6P41m/aZDNUaMgJOw92ac1HMUx28We+r3jZGACM3jNwfahdQza8n9K2UGFX16fawyXLeXx6d6rmN50daaiLhaLg6fqOlott/3cwwwTgfNa33Fj028192z5uHw0pfC9JyIg8sfrlcsdnU0EpU5tB5Cv/BXcw1s+/IIFQGtyUsze0ZU/lwAy9CvjOsvVQ5+x2M1OnmFIuNkXvKxirpIOMGIj5ywBXPA+yS8WugxHvxKZL9OACgxiBD/elxO1d4oHHXPSPBKfhpSj0r/2NFpxyvle3y2yiMklPBK7QcjNx33kWgxA3JIjAs+qiYTEnhPSzBDGeTj8c5ZsXAZfYdI1UsJarM+1rG78FKYoK6U8s0XzHTx3HBQysGO92DPJ9GSU8MD4EkAv83380Ujh0GR4yXckVolk+w9kU0koZ9DDsJMymP2vxnA844lRIKOInkJ3MmgvQfj4UESLdr5toCXm+EbfZT2C6SenM8reuwLyiced2xRebtw2Jp8KzmeQvzyjlgulcA87YZh88gfX45L6EeSDWncrHaFQ+ZbIWCph2l6GSjXo9DvXSXSEUJsiXLxiLV4lvbOWo9GWF2x2B82d1Fl+J6J4WjfiYiJ+cfp0Xya3g4Fzcph/UqSRfHsm94RyvV3d5EHrLTuXZNE0P51kiCVg6glSffJvPf/BWStL9zO8Oj3OiU6L2j+CYFog/8aBkyxMZ7TTAVnzO43CHICbOXhiGE700xR+8j1Ata+1VDOGFbacn2v9fcHNgKuwGuUwAp9z/Gi2U//b7ktipQoFceQ2Zem/l9CBPE3u8wd+I1Gt2e/TU8unhGJJhduybHViP9+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ca04f06-8e56-459d-dd94-08d945e8aa9b X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:24.8415 (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: KewOoG876+UMPd03W+3MStiu+QfFVTxsLe4DfipDnUFafcg6Mcev82+e1+Aj0/YaegSJX5dtSuhgbCDEIEripw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6798 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032628_245865_ED8E5BC0 X-CRM114-Status: GOOD ( 15.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 4cb2e84..211299f 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -476,6 +476,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 { @@ -596,6 +603,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, @@ -629,6 +643,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 */ } }; @@ -947,8 +962,16 @@ static void sdma_get_pc(struct sdma_channel *sdmac, break; case IMX_DMATYPE_CSPI: per_2_emi = sdma->script_addrs->app_2_mcu_addr; - emi_2_per = sdma->script_addrs->mcu_2_ecspi_addr; - sdmac->is_ram_script = true; + + /* Use rom script mcu_2_app if ERR009165 fixed */ + if (sdmac->sdma->drvdata->ecspi_fixed) { + emi_2_per = sdma->script_addrs->mcu_2_app_addr; + sdmac->is_ram_script = false; + } else { + emi_2_per = sdma->script_addrs->mcu_2_ecspi_addr; + sdmac->is_ram_script = true; + } + break; case IMX_DMATYPE_EXT: case IMX_DMATYPE_SSI: From patchwork Tue Jul 13 18:41:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373637 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C3A7C07E95 for ; Tue, 13 Jul 2021 11:07:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4BB786128B for ; Tue, 13 Jul 2021 11:07:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BB786128B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5tUog8zDu/rVVp4KEh9DUcW+Iz7I0zuPfgbC2DGXHlE=; b=igwaBRpPm1b3Ly 3T0Fx9hyxOWC1hbj6oWNOGhqL/mBdRC/pA6svI64hyO75yozYbFElziNZ3PoznvOIQxUnqNyc9wUJ E9+dP2o8oovnBOtBCzB5JNpbyxcjCwqAD794CeTZeqENtbjZeSIeiA2YZQTAy9vKuBlqCNK2+gKHF aSjtWNnCJIor/G8Su2RveCLKnEEAKtDmor54Sou97ZoghH6xcPFwbB+5yMsgzuOYOXdRVayHGylLj cKrmsRWV+kgvQU5yPwmPioeaNVVgysKxrHFYlP85M+X/jQnfzcPVeUcKbaNW5B/tFF6HrHmyy/oof 6gdoPM4cH6M8WPaedjPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3GCJ-00A4fp-Ug; Tue, 13 Jul 2021 11:03:35 +0000 Received: from mail-vi1eur05on20631.outbound.protection.outlook.com ([2a01:111:f400:7d00::631] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3FcZ-009uhs-IW for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:26:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UAFrVqhyEJWRvIRTtjl5D7DS1D6EhgUmYjmAGobLLXrfCyCKJeYJMDqxz0xuN3Chu/Xi+p4+DEfiANBRDG4xbSzGp8+K92BKBbZp95ezv80bZXixLYAMQI3zIzpCnzf7ynhTaRD32jBVSKf48RibIICtG1Bdm4yfUzNHWleNbgNe841Yw5080m5WCbRewEDXKlUt1cp/dEOFECY4bzauTMOwB2ktKfVq8+Y9pvUt2X70bBIXVKTLf72BVMwXXtuY80cJ5YrLZPKFo3w/IEgMz5qvu0yJB9yo2Arfy71ldrF2qecD23C3tc2AG+zNqLnAKEjn9JbZBpL9lzWpXN8nuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sZvU3VGhVcTeYxe4fB6geATT0prKN/x1vEpROhK8pVc=; b=Rl09HtVaoHD5Ykvw51b7L+xLoPdSzbQUHCBjN+8N6iFUldaNh0SO2bra5F+rQskFjMrP9LRov5ea0ElYMEejsRJapxYxkeajGhtZxMNgQjJOaczaveQglpJJwqrzUUSWHDgfh7pKsSwMyMEc5tvqIQtqQDcTO9b3XF5Pap2Ql6lajsM1Lxk5HiRi/iR0QG6IruJgVvKSYeM9rpdMgypc3USVvsgls6ohs9QbP3oGdTZuEJ42bcyXqQoQqKmigSx+qNGGB0lcCt9Hr1eX7J4+RIUt+hmaJtu1NO0Dwq29NQ9D7QiagYcXrQTTiPX3N+/hxdlQQvaVPIil8KgtJygOPQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sZvU3VGhVcTeYxe4fB6geATT0prKN/x1vEpROhK8pVc=; b=QGbG4dHQsefA1DtcvAVWTztuhyzihxji6CIt8wsXrw1Phhw++itAFPFqjAZHqlhqGgRJ1k68I7F/FPpTwLUJWtKmr60Jp3N2HPPgCNxdYniPRPrTWG3B6Cm53f58HABbdGiZa4kDNefiuSUiKIa51A+YjjRoM8fWrXAC/g7kfB8= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0402MB3344.eurprd04.prod.outlook.com (2603:10a6:803:10::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23; Tue, 13 Jul 2021 10:26:31 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:31 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 10/12] dma: imx-sdma: add i.mx6ul compatible name Date: Wed, 14 Jul 2021 02:41:47 +0800 Message-Id: <1626201709-19643-11-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0cc3677-d14e-42fd-b2ea-08d945e8ae88 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3344: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:632; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aiUi93zxXB2e0GuoD27lnL/Up2eSrS4K5USoYaPqn0nsi60vktOaF3fNQO7UpKW2jD7DYHTDgRfFZMHr72LeUwBTYHIckJnFnZQd9SaCpWdJ6rZWOLojyRgb7q7Wxs20r7mSt+kDz7fz2ZNSA44ygfUcXSXw2YfOvQRMNETvz0P48Nb+XrMjmVcHNZ+1svgshruTZlhKLn0TEflJRTg7+gCrR7YAt6AoMfMz4kHrI2Ur6TJNvLl6gNgUj7UuraxIQxA1QBgIPYoAbmSqLokXJIYVGXrdBAISo11LMhQrlzLKh+9GySDsPAngJEuGF5/nhYe6eqnDUetxVsHz1gyyQVKJqHNiS1/X604z3fmqXXseDSNcjp4jUQvD/5+TUZMNjZtdVgplvcRiFXisKbCBImz/pTNyu/uzVbhf6WlVpRFuHwZ8SLACU8L2FQlQQf362R1vk7sYp9yyazJVD/I315abyIbBi1DO3jGjzpGVC4k0hzVyd5dftqKByUfvw9XfPMnVxulUSVtre5CTQr5IjyMkbl7wG81Kzz0+MZbWaK4QeGrJWLWe1eDhIgSzSLnwSGDb1yx4tbk5GjoumIgvVQXFaYs2pxNA1ruScsyBkgcTttYo5nTD6l8bFU5kRxBDJ4IococzMICxjSxNGVscjpSBuwfRC+uCcsLdkOFS2S1lT9CwI6qP2u6lUqBQWOp40DJg3DDaYB3rHvy+wPK8cARI8yVLzybswpXbJGRmBZQ= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(346002)(376002)(39840400004)(4326008)(4744005)(26005)(66476007)(956004)(36756003)(8936002)(6486002)(478600001)(5660300002)(6512007)(86362001)(7416002)(2616005)(6666004)(66946007)(8676002)(66556008)(316002)(38100700002)(38350700002)(6636002)(2906002)(921005)(6506007)(186003)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1ClTsWv/nVMdlyEe39bbdaNc+g50NfBaa0HyskYlKy+QhdP76SEKTaUG6P8sNiYYVaFnoT0cFJSJzoBsth1ETXc+pR1ShWr8soCR+usMAdX0XDVhU2mx1eS9q5v6IooyJ0hNRt8UAN3IB8meEbYPdRvTgAp0LF6CL7pcX63CptJ97SxsAgJBwiGO/TXrx4uRcJi32uP4255GtMSafPwmr8neDqFlyot+AFjEECwNiOvmk2EbMOrKCHveLYKJNcRya0/c0SYcLEkzKfLlnuX3UUVI9tUKdatpB0HnYD+QioFJ162LpYAT6VlPBa7kg9X2Scg3nroR1Yuxeq3SOM6V4oDVhM9VFHIAJi2q3VUFxgFbzXZ1IYJl37ECy+qqlwuGf9O0kqiz2B5sKEB0EdUR3og5RCln89sl3B765jyFsBs0pE+27bibwI3heYcJMZYPzBb2KFX4dSvMmHhbygUvrTNuEEo7JO4ezMfNTnKz2+0B7UNOBGxOrEws+6K0osDuhOXWKJD7JX/ObH9LzHiyLFyBiA+gwecJ+GjpZKkXbv/KBgJl2iaoODlSu4N8i7URAJIhxsFVWZsGEXLB0bOjp5Hq75/rEVghVSRWdCh4jnJKmJ933Bh5u5KKXxEmhtIPNr8s6mbZgcBsrpLnq4hKE9hAuGl79rXeHFOw8I4/ZuhVmpTjtLLFPh4qfzfgDZZHEFXfEsUj7BvBwIXuxevzgqjDTNyLhw98rs+/UWDvwdQ8o5Ci3/WFJLCJBQNahXad1LCUM8JWnSyUEPPFy9vFjGcMo5uViRvEQ8jfb5/J+//UkTkjt3L5tEDjACOFTlMdwPnov0XIn430vu7yToF7M5Kkj4qMun+ESTaaseB3XVmU2P019JGE+is1ERpNJHuFIFnuD1GX81CCGRnfxoJ0C3X3TT5QYr5VF92ux4okK9rQFZb6yGyfsovbPxabGsjKOHFFXbQftHJ8sALmLn3p6icv0JmsQfFIX4Gl+lqC9JyoU4U7uKjiqyT6QW2jNCVxhJ4OZRSvVn4hLWezjIMRBVw+HG/Iia2kXLi+NeEsKKCUJ9BQEJO3drAlWZ/k6V4UZRPztFqRDaJV1+aJPWui/Lq8baGr206y6BG0NNrNKuc1fXYVk4KNq8bdjxtjmkZtZMgyrkwcI0wGE143BnbUCry+Pa6BelpB0szISntDREFqGc6nuhHY+1R3Y88jMYeYciEL0ymS/gyRb3dHuDjl2ycRKFx+Y4CBD53fQagWa8fJDBMQYaHnHNFfYEb6P/YXW+pX8oUg7XKxTTHAaTTGbvDxufWIVhDuEtFJJs8g+cg2eGy66+FEKsjLm8eiHvWw X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0cc3677-d14e-42fd-b2ea-08d945e8ae88 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:31.6457 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SlK2v8ZpXpoUcE5Muo5PjzX8iYa99EqUG24pNti1qFRqfQKP7D3kAxNbZLZL6MZD8E1dKjY+AlQbD76oOn9IbQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3344 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032635_657290_03917271 X-CRM114-Status: UNSURE ( 7.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add i.mx6ul compatible name in binding doc. Signed-off-by: Robin Gong Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt index c9e9740..12c316f 100644 --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt @@ -9,6 +9,7 @@ Required properties: "fsl,imx53-sdma" "fsl,imx6q-sdma" "fsl,imx7d-sdma" + "fsl,imx6ul-sdma" "fsl,imx8mq-sdma" "fsl,imx8mm-sdma" "fsl,imx8mn-sdma" From patchwork Tue Jul 13 18:41:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373639 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=-20.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A963C07E95 for ; Tue, 13 Jul 2021 11:08:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0CA1661289 for ; Tue, 13 Jul 2021 11:08:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CA1661289 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2H2DpSOrV986YOnWZsxpVDyGoilX5JDFOQhOR99vYGI=; b=bDBuQoo/CGuOQO JNwGDN15aDO/co2FLWFhrnTwkvADiMHgANA78HPppynabDZuMOv99RIOT/MCF4QdOdBlX4ScNYcTa mZ9qlVvzvxW7+7cbgdfsIJfZ3t4mVC8bMVHVS4NaGcWKJDE2C2kAbaPWYFFRMHyWV+PMEfj0ruTIK CUX+6Xyiu5eG7lVopSkzTkju/bQCwwNVf2r2r7IlRW4e1WCTFdXQRRWpAPTzaIob2QMK4uhLyCbBZ +slsOYHWjuS46oRDw26cfvauGglXwocjpEJCKFmjCH9wEXxAz1aVYw8VY/euwGUuXLZjq8v8DqfTo TmhgH+I8guFIvAeEh80A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3GEW-00A5A6-Uc; Tue, 13 Jul 2021 11:05:53 +0000 Received: from mail-vi1eur05on2081.outbound.protection.outlook.com ([40.107.21.81] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fcf-009uk6-Kq for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:26:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f8+WIkW9dzr7np9Agfmv2CIAWthL1xBXWP1Petut7DbY2EAWTXywxSwSzh+CUEHlbPOvDHnI/g+bQl4dWknbTzYvoZROErT4M6x3OAIohCfa2fcrwKswmiCleGi3h1v69bOxYTSEX/ItDQA4PCIjF2jUBQfCj8nRBfBhaiHo0JRoW5ZnckFwiTmG50OyvTb25o03hdMUGXoe1U86k2WXmYEwOjucz6zZING4oTpiFDycVn6zLzJjPQB2Fw6Dnu/hSGJlrSNLrQ+tPHAYaI04ShtkuO12M9s2BriJKMuPJejGTzvyrGik+30L0P664bzsQELbyfF6jgfQ0P3UFeOchg== 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=Jy7wYF5hmeBicDao0726iP4rATOZGsJRcrBYBDsOo/g=; b=H9+yrwausTwr/s7/QD7qyquBxGMIb/24kupMVGeR3159E+QG/ICYIzTrlmpLLMV+MzYuMB/heZaD+kPQxBjTeFf5cEw5v1DmilmJa3NbHL85/ooRisVYOMJZZPi54BcYhEXMM53hc9yVRCt4DGLUYhYPYW2GttKc2gh66RUWMAGqopE4sGfUO826ulpFX8xvpOxsLV4Z0ehZSQksAleAHC6YtjH2gmwaad6CoIi5wXNZvJhxjzcmUA+//p5KLkCVkKCsFcm4a53U1uo/C9nCm9dRBzvkcpgnHjfT70uAJd3mG9OFnFIPJJ3CQdrDlClFHwzn2VyjumcYkAiD3G/DHw== 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=Jy7wYF5hmeBicDao0726iP4rATOZGsJRcrBYBDsOo/g=; b=oWDj7LO00CN6EjBhbcwCscLFx47p87pG/qxL4TS9wRKxy3emlSQ7SQwD1BfcRETyhuViISKXdqO4x+DrVO538AR4CHV5UHhbXPky+UftwrSqle69VJ8PkB0gicEajiLjvfdmqNdB0Ok8kyRcl3YqbertqpkBpFiZy52HC1D6sSY= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0402MB3344.eurprd04.prod.outlook.com (2603:10a6:803:10::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23; Tue, 13 Jul 2021 10:26:38 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:38 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 11/12] dmaengine: imx-sdma: add uart rom script Date: Wed, 14 Jul 2021 02:41:48 +0800 Message-Id: <1626201709-19643-12-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bc20d32d-c6ad-408f-4864-08d945e8b2a3 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3344: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /Bj2K5bShk/Simo8Sg5VUl2nea0xaiFDECBuYqHPKU/utcK8f4wxVGXtwi8PbZP3cRkfA46QDnTARyJYo2uIlSI6AJwMFugre0wRUa+nORuUs2KgHhUntB1HYL0XL+gqF8n2dtVT8QWHbr2K6VUubjWEjcINkyYtzyNSdW3ngYOCQt7uhU0GXoY8a/NLcS/A7MucJ5Sq7bM1qMmpOiealq6YZWFmChRYNApyrlUeeaud1TMo9LH6OTCSEvcifwyS7h9ON1MQ8cAmAOXAeLGcFVTE8/Pc4r/ezGhS6Gky8VyiNW2Fh5Ldz4nsOnDYfg32zACaV1+rgTQc/SuxbUUZhqXGMe9hQytNyBurbLq/pBnoN1nxUoN9h8geq78PjM67BnXJhSj4DE/e0/FkNFzkVqwudJXeflTIj2eQs3UBCe1WKA5l8L5KWWwKTTHR+eFeDeymsuuyFyFvHAsPUFbSGiKfV2Hub9BvoFvAe55WtODRMCC/AdG6/5xkn1P4ryqi35qKbb3shodJbhRzVk2nUlBFNUYeKdH6ABRRzcRwGs8ig2MGELP+IedtjbaRSQMcZQ8NW45oZ95sion5bRnEKmBRZXkieDLUGnVQgZ6gMLV4ed6DlNtyoQYrY1zWkCRspjKfvddCvXlXmSDqcGAHQqamFkcxPf8A0y7YpcRT1DXHcPBVoY2K0e7SaZdYX7CzZxKBfEuV4iTkVS0C4337a0jtOLfBiIG4bkrsJZbRb/jr06MGbWm2haQ/jJZzFmNqdGb/uLt3HAhHY6WeVJSZRNmF3E5zqaOKU90YVrJDrWckpvjEeox2kaUIvzvrmghR X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(346002)(376002)(39840400004)(4326008)(26005)(66476007)(956004)(36756003)(8936002)(6486002)(478600001)(5660300002)(6512007)(86362001)(83380400001)(7416002)(2616005)(6666004)(966005)(66946007)(8676002)(66556008)(316002)(38100700002)(38350700002)(6636002)(2906002)(921005)(6506007)(186003)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6D+3dQDAwLFneHH9qZ2vjg6fCajYfH9dphB1Mz4F5C6qf1Xd/p4oZmF7CilweDYWk+bYf5FnWBDfFcIvwfoLqPrPwFu7r+RWhocYe5mhRY06XxLzGXvM7z+Q9TNsUxQNmLoVO3+Bg2QwGMnoveAoraiEwSww9gW2jcS2x4Uyo9CewmvdlG7/DlzIAkWg+HThxxBuFeshS3YqTkvrmgZFJOEQ0WHFH/RZ/Y8zr8oxgyPRG4MONzTUhPGQ+fRAmvDqngua1iXVFefvS6CY1xOlVJ7kCd0hAP8oiFNN+hyOORtyIXBPgr5GT6oxBJ5Al+GLSTK+iYkokUcQPYfo08K6oZBA/Qq/2uQAWHIeZsYlRE51MOGtDTSBA54fPDbf/VjRNyjoYb4ZrHZcIkGMxpMIIjXA7QRMLP8oYoYcqlE3p0ih6TiVqKby1rzxmdoI5DloMbTZO7TvptIvKKIf5pGYTTUq3hw6TwCjHFeeWCvX5eaFBQ+mCqRg2boy2OszbgR16ytZPdV4OyhdjB+JrIoWVfHdBRx7piRRpZLr8WOEoMRq7y0JSscNr3oPQsfntm79HsuOsb8bezBGaXFDF0pX3gXVkcsgeaDmProDLbErtgZ7lcoUIwEF6XbnLvFovFH0z4Q4EJYisxx8rnzxv03bHYcrBYmLZOtz+hsKl26ejeabY8N4x1fHByP6bRDm7qeHdKNbZ+9F+CYZCZIA79Nhw8bh2ZUmENovGIHIv4EoZair2QfRPihjY7fMLTt5zdf46h7b6evTt4++zcv+kCv1xohB4qc6uO96P3+WA8bb0zTfhlo2RmVUsR54NW5EAhxK12xAeb1akIC8O0L9WAtqwFyjbA+1E8OR0O70Bnp7lPUFjuNOctLfZlouhvAanFWN17zqqFA8XksjQgNV+iYvq1gD89wmbiNrBUtnlnGueMItyqihYpcJrG2TqvTjRtbOPCDuJ0RjYgUtLYIbX1oF5Ii9g8FsV+zIEXK7J08PfbAzzvlyh6ID4HBHHFQ4AnpJREIp6je0bIXP2dgDDIosIThES55jokA1QM8diEL24u65857KQmpWxJvn7enQgpTQTRGYkAbbOoTD7E0wZFJYrfl44wLuFNRLVLjiN5kInNZ8CNZ3mFE8G3G9xRFpSes2fa/R8EmgHfu4Q/f3KwvJG0ZzOGO4uT4bNe40yxWE4eQUlSXDzIRdL2vbP7hWzAg8NHQLNADe7WIBWBjTsPqTsHHFPk+TgVm4PghhA1nkyjvas4eMd6cbwHG2PoeQwIiruHIFlXl4l/7+g36QP5Mss6HuZZavUn2gO3SfuazRoViwIGDdPDXAeC6UoZIb84/U X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc20d32d-c6ad-408f-4864-08d945e8b2a3 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:38.3119 (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: F6hu6zdioHi3O56pXaf4n1sI4Uzeh86beI4YPkQu9JZ6EnGZ2+8zFxEv2MRrfzL8TjnVLHdJr1gYkrG2HYjPDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3344 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032641_758518_C68B12CC X-CRM114-Status: GOOD ( 15.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Reviewed-by: Lucas Stach Acked-by: Vinod Koul --- drivers/dma/imx-sdma.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 211299f..c449755 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -198,12 +198,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; @@ -230,6 +230,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 */ @@ -1749,8 +1753,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) @@ -1774,6 +1778,19 @@ static void sdma_add_scripts(struct sdma_engine *sdma, for (i = 0; i < sdma->script_number; i++) if (addr_arr[i] > 0) saddr_arr[i] = addr_arr[i]; + + /* + * get uart_2_mcu_addr/uartsh_2_mcu_addr rom script specially because + * they are now replaced by uart_2_mcu_ram_addr/uartsh_2_mcu_ram_addr + * to be compatible with legacy freescale/nxp sdma firmware, and they + * are located in the bottom part of sdma_script_start_addrs which are + * beyond the SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1. + */ + if (addr->uart_2_mcu_addr) + sdma->script_addrs->uart_2_mcu_addr = addr->uart_2_mcu_addr; + if (addr->uartsh_2_mcu_addr) + sdma->script_addrs->uartsh_2_mcu_addr = addr->uartsh_2_mcu_addr; + } static void sdma_load_firmware(const struct firmware *fw, void *context) From patchwork Tue Jul 13 18:41:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12373641 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=-15.5 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E32DC07E95 for ; Tue, 13 Jul 2021 11:11:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32F2260725 for ; Tue, 13 Jul 2021 11:11:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32F2260725 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V2GTCsTtXQDjvcR8FPwGKYP8iIlBEnQtbkWabRbJSH8=; b=VjXHc2gK5d4wHH RI0yaxe72Al3r0uWiWlXiraJPm/iFklAHH0L7Ez/RMKgHYQcf5JF+PDzezrddzinDWJ2nqTyqnbof 3aLjJEKqMleV1bGVbLYIHCOHxhijfwpWmriLvfJLsV4AddJpPjXpAzAx1tof+BORnhsOrsMt40UL3 QDH36GY5iQiSyBD9nOp9097fxykFhsQIUyfsfWHqiBuO8Uz2AhLDiS4OcoCTBV5JzLSerTqMCShWk NXwUANBBKHlKK1K98vXvZInFy3gVuGYaneyKKwNh6XCsN3mGeKlaBerF/ngZOcSsIFQ8lnZo+QYtL +7URCrClJXOMI/sBB2Mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3GGR-00A5cb-Go; Tue, 13 Jul 2021 11:07:49 +0000 Received: from mail-vi1eur05on2064.outbound.protection.outlook.com ([40.107.21.64] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3Fcl-009umG-Rf for linux-arm-kernel@lists.infradead.org; Tue, 13 Jul 2021 10:26:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lw9JzuuB9vT4M0OTgliRus5AOFxWU6P3hmI2mRox34uIY23yxHxyXRFg2rzdmEtqqwxDPUJv19BZprfxfgYl7p/BhteOqMMohT4iZyNGLqhSeLmiP0j4dLM5vbJ/tPNuOJad5AZi9b+4fl6g6n1OI60z1VD0DcpMlrEOkj0ADwUt0IFEFGjjQaXvWcTKpzKdb9655RLc9nbvtvrLNEcyDjIOaSAkcGJLqs3wTRxcR2S4AUmdyISQQ5vg8tNQHBeiPkivO+nAHDKvuz0SJUkg5MG3b24t+5Np8nkP+F0ay62hjlBP8PuAmSJguyN/BfqDwSGfmmlJ/MqWho3yQaoM8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tW5lZMEUKTmo+F4zrVNicpKnImo9kdoACV6FdhIqYE8=; b=bPSvVzu1u0J1OLwgAamw9BfM/NsfPCeCaIlr1VdYf9t/YqbcalQBJV0DV2WHCt9tzMNko6SyBhpxSvUNnYmifdg3k4x/9WKb3ZHe4akgSLJ2qlQKBw2wxZF+jcRavYyi5xHaGtVQR1IzgRMBLfWKdDYcwrsHBaFpvrGLkzvXaY7YxiL9j829GOFTtvuo1KOaaAMia6As2RnpJ2CE7uQYQJl9tYcuPjEMS0tptg8agpBLqOuHSVM0mmrrme28CWt4GNCt3K9dhhd3CImi2qyyEIJkIjHn0clHznwwHsUlV9ICUlovG1vJR0I5r6Lm0lfQNs5c45mwtC8PsO6ZBa7NSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tW5lZMEUKTmo+F4zrVNicpKnImo9kdoACV6FdhIqYE8=; b=RM/5rz7EWZZmjThDXt9vPsoO/nvs3GpCM3hzCYsN3QIihOcAzLnAWf1jTUkTRdBqrF+UWYx2vDT/V6vMT89WTVP3xjLSSmk+ZST1yag7xFqILxgWPbbEOV7aukE13YNlL24tiNHa9wYecmNKBzwZQxCW8vpl0FQjHV2HNCOfscA= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) by VI1PR0402MB3344.eurprd04.prod.outlook.com (2603:10a6:803:10::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23; Tue, 13 Jul 2021 10:26:45 +0000 Received: from VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076]) by VE1PR04MB6688.eurprd04.prod.outlook.com ([fe80::a978:6f38:2bce:9076%5]) with mapi id 15.20.4308.027; Tue, 13 Jul 2021 10:26:45 +0000 From: Robin Gong To: vkoul@kernel.org, mark.rutland@arm.com, broonie@kernel.org, robh+dt@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, shawnguo@kernel.org, festevam@gmail.com, s.hauer@pengutronix.de, martin.fuzzey@flowbird.group, u.kleine-koenig@pengutronix.de, dan.j.williams@intel.com, matthias.schiffer@ew.tq-group.com, frieder.schrempf@kontron.de, m.felsch@pengutronix.de, l.stach@pengutronix.de, xiaoning.wang@nxp.com Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v15 12/12] dmaengine: imx-sdma: add terminated list for freed descriptor in worker Date: Wed, 14 Jul 2021 02:41:49 +0800 Message-Id: <1626201709-19643-13-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> References: <1626201709-19643-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) To VE1PR04MB6688.eurprd04.prod.outlook.com (2603:10a6:803:127::25) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from robin-OptiPlex-790.ap.freescale.net (119.31.174.66) by SG2PR06CA0198.apcprd06.prod.outlook.com (2603:1096:4:1::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4308.20 via Frontend Transport; Tue, 13 Jul 2021 10:26:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 15601e84-2593-4bb7-c239-08d945e8b695 X-MS-TrafficTypeDiagnostic: VI1PR0402MB3344: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n/lmkUxoYbV/s+9mcZN9UN6Hzmk8yzE+sYF6ifJzcQO5aNKZSXEqToho+dvEWP0gNLHeOiNe0dMsiishgMVPAdWRX10eM6PX0bWNk8aXhCGmNH+RNaowHGg9SbjzuqXHlqrYfmn9qpmebf2qkcPiPfTbWXbMYS39tMsMRrA6Aj2gJyi+YJgtgkaTsle1XNxWdvy3pgmzEr1Ka7sYjYGWX/JgJ6eq+2A7aoJL6V8E/lcIkQrz8m8Jlh3q5D4SuoivrqPCuvYCDIteHo0wrXSaiTXBmvhjDrpb7hDTyGi65UOtGmxbuu+ifxCUccjVcRIC2VM3B68rGAse7f4ixInssuegImLD9jy4f1COuyOLRcr8MyUuNNchbbaRS+x9AFsGQMOD6Krn06iw1/K7RocGsrlHKnF00/4Yh7S1smw43y+xYor07ECS5vR6iGM780kr3jjfL+5l8GIEOD2nE7dfKiqI2HLtjxZmcZqPR3/zUG6WpNh7K/LqVG7WUDSyvLu7sUIUPSEX+JSA2n9fwLTofIboKgSer3QulM8e5noa0DqepWLS4/mTVa0vPz1RYV+mMdReofdrKe85oTvY0oT/x7O/QHRekYFRfs5MqhuB66hJWmmder/thdhTYxd/qBvNAP0VWSozmrYzQfiecUjQdqgZ8P93h2MsVZj1euqmNsuAOXpdjrFxCk0AEzks9c6HFDBpNeJaJ5bkg8bV72Uy3KHxaVQa+nnA7liBUw0HWJywqpS/BxJZ50oGYHyUGUhjwapeC7xSpABrc6OEfiySqPORU/vIlC2RlRzH3tDoTbwOjmEivr+RtnRteVotUwVX X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(346002)(376002)(39850400004)(4326008)(26005)(66476007)(956004)(36756003)(8936002)(6486002)(478600001)(5660300002)(6512007)(86362001)(83380400001)(7416002)(2616005)(6666004)(966005)(66946007)(8676002)(66556008)(316002)(38100700002)(38350700002)(6636002)(2906002)(921005)(6506007)(186003)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oDX9Kw3I+oQ9ya6O+g2zgsMah7CU9WmeNcsPKsN9IVNS3JAXe5zUaodonXXbMlku0IY2LOVsQaUeE43gLJe2e2KqJ+vCylbAtUkEzRaeSHwoYaK2aDGJTQc6dQ9VArP1P3gnIVxWKATbxpK/Tt5/Nc8LGAxcd7wxbwyLmcOMTDjeK6lVT5+NElRbXgia8LAvX7qYaZ+2740m3Wp6CQlU2/poGnS+sUdQ5JWQRCJpEEoWBnBqLHfqzvn8aFMHWZ7IoNUuCzmeNvmu9VZvngVwFZHf3PkRO5ZyRrHTuRG7vGe0+bb4Hv1L4D/KxTr8WhV8lFZ4NMpZ3pwiIJyCQtpFRna2jgyPPqQLQcVg2CcR2rnZW+Zqut/N1RXItOYq6vprRl4nlMQbnr+rPj55wh4G7Yb0r0ccXtZhqhALHdiOgbn2ZNYjUogNTZQJ3oNjlFO2C7MwxlL9nNm2XFStCE2RqQyKFNlwklD9Ct2ioIgJxbXXLA7x1m//tontxmM+iIvPfXPhAvqHyQ5HB0jfKYSABaln5fWLdzS8t/15AiXuRIMjD221w2mOQaHNYHpLVyac3WGZkUAgL5Bz9NCyFTX7m5mgusRtPEbZP+huYjP8iuzU2JiK1slGYuqVPivHa1MhyQHr1V95AeVYKOPY/ebZ/hDcIKDbdz+hKveYQSAi62keO/tUYKr4R6OrMaBBZ7wt2p3MvPBOeQe6MbTUjpeYfquhE0AiK/JtQc8qYB66Wr/RSyicDsroGwUyRsnPza5gecWnBwgof+qpF//+YUzKB99jALg59VhuJ2miC7+2MySW7L4SsQJCATwE4WDdPClUQ869iGO7Mj/QO/T8nMRfSn5BhihV6vikUDLomvlHpoIT7kzkfoJM/fBG/6xlAj2YSDhZaYB0UQZ7AHhSgxrLkg4osqv5G583ONA4F+V5EyfV0Uk1Bz5e4NIRhgPXO6kBRJlSRNJkV8kYKJC0igQYg8vkApxhgV2/QsJ2EOji5uViOqD7HKS+HLTlpunJbhgnJ3jaeV5d56vReWIf+xtyWdfTvRGMMCMu/auec+cSErqnFz2NdUkh5efOQPNxrnHZ0LTzPoHSD4Red7EWnypQxRoUeXSvCxQxBCT9dl8s/FLHCuJ7YTjCZZMA1beU17/2X7JuPuzDUVKwSan6mOsnWhXuEk26lwmqq+xfHKnvV3Gm1zOTgK5AnTUhr56uwK/sQEYkDBdaUA77spiVzLvnWa2x+lnuaOh0cLt8PslOFt8m+1Z1PBPnwM8W9XfjpdWl3sR8nUCxGS5teWKikJHW/2P31RHjKejQHtskiE47I0KPFv4eAqerp+F+VPnaV7Y+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15601e84-2593-4bb7-c239-08d945e8b695 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2021 10:26:44.9232 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: CKfROocsmD6Ng9WVnQTop8begq4dmyfZXtZCXuP5szBcVysqKAc1v6y2pVj/o4lKiYPqQYddhVAN81Avufc6EA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3344 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_032647_960633_DF18BCD3 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add terminated list for keeping descriptor so that it could be freed in worker without any potential involving next descriptor raised up before this descriptor freed, because vchan_get_all_descriptors get all descriptors including the last terminated descriptor and the next descriptor, hence, the next descriptor maybe freed unexpectly when it's done in worker without this patch. https://www.spinics.net/lists/dmaengine/msg23367.html Signed-off-by: Robin Gong Reported-by: Richard Leitner Reviewed-by: Lucas Stach --- drivers/dma/imx-sdma.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index c449755..6e0490d 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -439,6 +439,7 @@ struct sdma_channel { enum dma_status status; struct imx_dma_data data; struct work_struct terminate_worker; + struct list_head terminated; bool is_ram_script; }; @@ -1107,9 +1108,6 @@ static void sdma_channel_terminate_work(struct work_struct *work) { struct sdma_channel *sdmac = container_of(work, struct sdma_channel, terminate_worker); - unsigned long flags; - LIST_HEAD(head); - /* * According to NXP R&D team a delay of one BD SDMA cost time * (maximum is 1ms) should be added after disable of the channel @@ -1118,10 +1116,7 @@ static void sdma_channel_terminate_work(struct work_struct *work) */ usleep_range(1000, 2000); - spin_lock_irqsave(&sdmac->vc.lock, flags); - vchan_get_all_descriptors(&sdmac->vc, &head); - spin_unlock_irqrestore(&sdmac->vc.lock, flags); - vchan_dma_desc_free_list(&sdmac->vc, &head); + vchan_dma_desc_free_list(&sdmac->vc, &sdmac->terminated); } static int sdma_terminate_all(struct dma_chan *chan) @@ -1135,6 +1130,13 @@ static int sdma_terminate_all(struct dma_chan *chan) if (sdmac->desc) { vchan_terminate_vdesc(&sdmac->desc->vd); + /* + * move out current descriptor into terminated list so that + * it could be free in sdma_channel_terminate_work alone + * later without potential involving next descriptor raised + * up before the last descriptor terminated. + */ + vchan_get_all_descriptors(&sdmac->vc, &sdmac->terminated); sdmac->desc = NULL; schedule_work(&sdmac->terminate_worker); } @@ -2132,6 +2134,7 @@ static int sdma_probe(struct platform_device *pdev) sdmac->channel = i; sdmac->vc.desc_free = sdma_desc_free; + INIT_LIST_HEAD(&sdmac->terminated); INIT_WORK(&sdmac->terminate_worker, sdma_channel_terminate_work); /*