From patchwork Wed Jul 14 10:20: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: 12375531 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF5CAC07E96 for ; Wed, 14 Jul 2021 02:07: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 9C40760C3E for ; Wed, 14 Jul 2021 02:07:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C40760C3E 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=mcP4TvzHgtH+Xh 4FOLkDG2IzN91MKfxARbLs+DoazvDI9pZ0nS4RabNV7USXbklv/FEq+PvvDX/hYpQC41ZVowdcjnu QRBFB47BIZmbCbvGgs4KpQENxwl216NMmqAueIjUqhSSXXV0JJokKwmgb9ZEQRWpy+T36adk4o4I2 1QSVYrmeGLMIjaj/OnO+QVJSUt9GjNVmuyeC6ckEgkwAoxjJNJm9Gy3bpTqlZrEJyl6cA5nVsAsKa lUC7qE9fgqT28Y9RAqQiKYzkuhpCT8PRHFU6JgkTqfyOokN36VnbsD5kLPeaOCoalBs5uLFQDh9ow frD1TDHnrNtbDYKs9Rvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGU-00BtAJ-Oc; Wed, 14 Jul 2021 02:04:47 +0000 Received: from mail-eopbgr60051.outbound.protection.outlook.com ([40.107.6.51] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGM-00Bt8b-Fw for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:04:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DLIPhJuBF+4SSEZXRVXTpR4sJZkbNXiDAjIBdyojPwX0SQDK2gLcJbZRrLOwvoRBF8+8+wA1xhAkiMmh4nIj5th1qHEFUjrZSoM+RxN/HXKyqdqNfxjqfZDUu8h9IEwT+tmoNBs2KKtpkFLgsyOvQEH1Cc/gJ/oVFPAsiz/AbysvI7OIvOUGQfIeYrer0gfZ9GSvSTwlZgeJGs3cZhb3CiRszeYWEecT4/Dr5lir3iOkciAe4Rti1I7TnBmva2crp7nU9En7sdiaMWjAAUpMOJLGrNUWQ0PZg6NRqpzktMdYT/FcfxFgREhzwffnEEQgUuC1IA0rEpYHsYCJgcPNYg== 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=JI5eMoe5pwpWMhwXt2rY/yyoDX6kr3X9tQGM05GskFUDXchHCnc7W0BwAYWJ4KwzlCf0NBORS8k6tBsJ7qIuHvysh8LmG2t899v4J4Kz4dvbNBC2Bg4T1c21m4UJXdDuG+kE15MmaaDVhWktoH3Q9x2WERCS6fa8/zdTwB0MKeN4JIBMLIP+yirqghjbvH/va7V5ahfpLJkxG9Wbacn1vqoeDz9oLrr3EC5hbN2LAR5nR1OhpRg65nKzvkAk0QqYGIyCzt/MGQYctTUW2Yd9jz9QtvHwwG3ftR5GjniMxYmV37KglBtKwbOOoE9wBQYi+M8GhTn2EkccJ8d7rJkbew== 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=E67z2GYD5ITcuV7WCAtN7a3PnMIae8We2cuZvZb5jwMqQqWoXoCbsmMzf6+zur7oRfLNy0LifpDSDLFocVsI6bY0OBKSgUZrkJDlfXjWankvwQ7Eqq1IsrTZMau3ZUPcZ5NioyY1s3rR4Rd5MUPRm0WvtchsUtZzAsm1DZyxhpE= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:04:33 +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.4331.021; Wed, 14 Jul 2021 02:04:33 +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 v16 01/12] Revert "ARM: dts: imx6q: Use correct SDMA script for SPI5 core" Date: Wed, 14 Jul 2021 18:20:41 +0800 Message-Id: <1626258052-22198-2-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:04:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 37fdf83c-a0b9-42e5-cf7c-08d9466bb8c0 X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: pnkJ5qOHuQraGkO+kP3zjYkfgv3zY3Z/T0IOI4sfShcHAmAOfTbowFi0qKvaAN2MW+KJ7lO1kirSmV83bHDgy2Vz+N39g04ZGHxyN/dR/xM/YpKcX5NmtJmIpgV6duyvSGk8zXJ48T0QxL+3TvW9nrgbD20gnno5nT2jmslUNQGQSvIozShlLAbFu9B9rcr3VztFJEBWI92BGJdRfJibL38JH5uYS1vGT06NqFDLYJA2AJSvhZHXQpjdEPASi74pMI2lOkLe0icOX7h0Oyhbyk8cow/Q2Qwfu2UfE0zSxtI0kOFykmna039RUTAvIlzpcdxektYeKFznOuk8+XjjqT0oRIYgwWMP92zJzwT9pUiRAUkSoS76NIEDsP1PUBHUiJwneO//xx/OnYGzI86nqks3b+RNimIOlC+Y1RIcIzxxzi6EMSPsDRqBZPtA70czsnZbuRp9dNl+9TgNW5X99no/NncRsFuZsgFg5F8qObZzvwz2yymUJ9YbPUnwGrTGknc9ERpuYNc/6U9Qrl3YGdmsi+S6DW0UgUmagaDn8wQLWSvWG7WOwI1793ABGuppjmb/WvdeoXHfw/dMram0aZkcYFuB6WQ/taSxauNbSYRO6US9Ck6JEGQeBxW68f3/SEuIaTbgvKJPa0xi8dnNhz8rQI9g+2STB2wNKEWTA+YVuc4peWSxTGQn5f+ZJeplTRy8w/DhWPDVYN2GBKUWMW6ISzeFrgu467fve2HhL+uAAK1UTKUiWwyXlgbwFaQXr02c3ZV+qNeyPzzs5QXXBRL7qE5C8C8LgMLUQQjwCieC3fThVeiTSMJiWIYOReOrcaAK3J/r0KbSdFeRUjSYlg== 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(83380400001)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(316002)(66946007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jT5eXizo75RlpKQu9OjBhKxVGcZ6yQYMNymDtdL5XvDugASnv+pc/bO3DCKCvCmzd60SrF1udLjRzmJIbyN3s9U5fYMyGAlFFwjFLn70BN0HYJ7YbGGbkrRDlNOMCSyvXcGxSzCQMrgwozoCitJ88jAKdWwRzK6D3lBM/BrdPeFyx770d9YTWypW2a3CybH6JEh3e2kWSu28D7kR1ll5C7Ym17bo8f70IChF4edVBWSiZwOn8615Jl2P10OxEi67YrhnfuLLczOCdJyfxETsJY3SCbzSqz30YToioiWY1R1etr+zzdeVIQX0bArGdNSs2sWgz0BVw2GGelHlOhMQGsI5eevAE0vnE3ERYDnTntnqZuv5Cjh3xh6uiSUgaYuO/hI8qrEsqPCk+syNok540guLYsWE2MkB2oJkMKxoiUJbGmkbA2Y0gVSpjKMLibNkAo0gkq6s3oqICFcXke3d6VsL5bQ4AwtPVIklODVbHz82BtaXfyBg0+lT1OLJ2MSahdNi9jVoKXDQcMHSfxA1x/6zIJjQX6BctD1+Sl8u++ouj8aK7OCKRB1CV+JqwQYzorvZDtMQItrx3dkgMNP5j0PI3ZLmgQf2TEq0i4y1wYhg0ZLcf3qLTBn93OzarUU/vhhkcYW/3taI8mGlqwUuLMfIUlHNd18Cu79k+RBW3YR2m1sC67c/Ie6Q9HaLckH9iHZLdOB1381F7rT52ZilCS7K3IanvkC0RovMSICvRFFDKAnL/r9h/p0jkMAUqCeDRZzzvgG1wttYEqGgCSqQlewjx46/6OthyTnRLC6MNugiMfGTyU701aeXPsBQLjPIrpexpogryfsmdPq+F89h3KDxfkfF4E4PJ4Gce4gJSkBoLBD7dRKGaDr99hUBeTn5wiGKM7py2y17QIUI4110469uwPajqawQAcgrQgd8HJRVIINxGRBUoTo2HNQmu+wHDeeqcVqnylvbtoOa3DGhUmbUd/uaSEbaC0379uPPlvJ4k41Mbtoh62Qh2fLoYGUUtVG2+0ZSDeMT6y3URqF2ONi6/gReGIUhRhp0ljFO9/01EHqPhiI5JlACno67XL0uJ7hnrvFrhlZKSIm5yw6aE/+lYxOQgHHQiOAPS18AQn98iZ5xNe0bzHTzxkMQvBUuL0Evi4Hudw/AGCWsckJN+GIA6l6t6gRhpNpkkZBh16gesr4f+iCaRVMbpWof1OMwr7XHXhyH1zlliDluBknpp+V/F7A3KZ/2MKyazM6CvNXjLBIUab1cldLpgR51ZyyJmznfWeBP//BTpi4W8ZgpLPRpv4CU+xlbPJmMYibWLicUf98PrWuKNlPT/rheLAio X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37fdf83c-a0b9-42e5-cf7c-08d9466bb8c0 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:04:32.9092 (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: SY/aYvTHSPOAwQejCR4g000nMlL6AziIwP/oc64A8RVFwToagHoSGh0FIiQAp/Ua9JySVYxTpMeLpfMz73m3uA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190438_579199_1403808E X-CRM114-Status: GOOD ( 12.99 ) 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 Wed Jul 14 10:20: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: 12375535 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 182A7C07E96 for ; Wed, 14 Jul 2021 02:07:35 +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 D56BF60C3E for ; Wed, 14 Jul 2021 02:07:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D56BF60C3E 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=0VgVIkbEFhW0yk 311Mi8pxvW3zfsJWgUGpYoRiFoV4sLCVw74dD3rvJTtnkJba6BXsfvK7mtmH/hJr8AuDUr5uNAnuS frswYv+9JhdxproG1c8b0C0sUm7PQeMYKJSxI5lY8qHo1xjustmT8vn9rks/LN7rnzeTHFGP627qj AhWaaZ8ILW5LXEhFXmKwNrPIYSaK1CQeCcAB6O1wzHxVLEkWIpYAujZJUtHT8B6QSY6q9TaEIYnO4 fGBizE50LhErsYcp8Kq7G6VenlEnl88mNn82pDB59X8bz9vvtEvhvmpmy/cHibOq4edj76G4cJKCD c3Sx4G0jS64JYXAd0AQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGg-00BtCK-93; Wed, 14 Jul 2021 02:04:58 +0000 Received: from mail-eopbgr60045.outbound.protection.outlook.com ([40.107.6.45] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGR-00Bt9j-Ts for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:04:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YwRVvoMplVB+1nj6DwmweDXl3C+/wqvFcgOBHXTnTg4z/OO2C9/knLsHcJXiesPKmjAUOtRgI9G9+2eCiu/p73zANh+jYNjv6YDvQsuVR7y8SAXASbElnfqVLaNA0shIFAiF88OEXeWwKHFOtYcXaoav21zRJURh69kbKQDXaOqR9UObLS1f8KELPe+xVVXdjlDbqNmmk+V2SSyta1zx1+c6YJU5FmaMDQiQR2KHkj65pA548uKSgZDiEam6h78WoZ1dh9No2egAoVxxTL5klUXKfAIzAqengSg1sniSkKNQ27Ar/jF/NrLAQUF5D5xhygfWFvSLqNyW5COTZwXi3A== 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=TIeQPjDN+M2FbtLO/VggM+pySVspeE1WdcvoCW9FYu2NGZsnnJYRee+JxfZdUmih8COHPAsinI4tD3N4HNxzJhIlC1cGCgpZws7bJ4waMJao9Pp4cnRfW/t/Y9NnTH1xjyXwOoZUFVgVbXHgk5D1RFIHBtTlo/XOkFlC/bD8RiXb91ZKGcXWKYT481ZyGeyYJqUMOy6s6TDkN12st8g/yZxxgOXzamC2GbO2bH6EMkNUvsycIjCl4BEyEBDGmR9cfhMQ0B6qyr/Xcn1S/T6XLQjfi3bjdCxJHZrG0Bo+VZB6QnTaIPAufAqDVyxoHV8rhBRgVKPX0A6AOZIifUfwrg== 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=DKZhO2exOXfggvfnY86QXuFuvObCm6Xwrc3Yr35nINr5Ye5drW8KQ6FqeWPakycmMTLQiT42cI58plD/xCRF2BRUMdhzhSD+Geaks9PRmVv7NFo3/0UwzEK8WFYxDuSE73EjRxTIvj9ERLfzNns7f1N+ULs3dgHmPIUUkc7jC2s= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:04:40 +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.4331.021; Wed, 14 Jul 2021 02:04:39 +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 v16 02/12] Revert "ARM: dts: imx6: Use correct SDMA script for SPI cores" Date: Wed, 14 Jul 2021 18:20:42 +0800 Message-Id: <1626258052-22198-3-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:04:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 54ff3821-b971-4a99-cabc-08d9466bbcf3 X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: 09HmalenueCBsq/veUmZnvJiJNG6pdoHpP1E8MgUaokvuxT3uD1qLzP1lTQFpnMHB66+k0bWOk9n0jSXwb4Z6Ptp5SzHMH2poYZfcs1QOYdQcstYTrnzoyP8qPiZYhTDSIMKR6cjANi7SgoPm+V47LZF1EaRppdMyZF6DwCh+as0iq8WOMgfxQPylviefdYf3gPQMLDxHL1++Mg/sQf2TOEd+OTOTlSGzcEwTYuPOzYojj7q59OJjBofWsep5DmBoKbO30DhbWS+39NTqDJ5g5ZcDs8Xn5+uSJpMffbbFeScWY49DVjQwoHOL2/LWJXhejGwmP4t0oKk3bU0ybbBEcGTo54K/vh1DRU3iUvZrO13Vul10tLEMiMFlvj/HtyxT6ryRlq3WzZWlxI9IV2j3xYL6QfQOpEzUuyA0WSZq75aQg36box3dalDP5WVqccFgydkGpau9SoA2jtofoonKzmufWL1vAfQqj2A9NA1iObrk/wvpvSQtlFRbZF7LN3ukSnoN/d756iWzoEK2pamaJEJq7XPVh7AXDeQlEeNhM+fOsN4duKtwGWplswBqa1fdXHukTIJxW4fVggiM7gtvdq/BxifeQ3qNqTEecf/a/AoLZrHTS+8xabvdxJzSQq11SGK+iFvcjaN6lqYwu6FPq2BsiAXHRYtiGUJ0WQgbyGwt4V8rDquThT7iLOzmPTAtITq075rN5gSKA1X2AS/84LVRgYUOaPUrwFj5EQJTx3i7utdHzdzOU6SomRbxbvpZMRAKiGpc6u0ytXA3kCe+ruJZb/KVWLo12bKONUQhEhozwNiQv2/yqENUU+QUlt2 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(83380400001)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(316002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TpGg2S1xa9i3X2gTHYafKC2NKVvgy5KEo4qUSNUOj1iNRH4XA0bfksJtIQeD0a7pHkYvfHskDu4pjhvxZHfUvrZuWBPH6Kuwi67SNeyBMTVIFWIKjhB6VxxfE2jHe1iDIwv151UL1lRhpFG44MN8olly835asRLeRPvf+h6qrkJlmmIKP0XQbajTPk5uljQjzWvImi7j0i7zFXXtOINyWOjcPoxT5HqzOcC1tXN/jQIsY88FXECIupDKaeOHxcRHtk7rMuviYeIy5hmK4Et6pVcMiqbpERwKrILOL1PkW/JF6MnA/kePRY51919pvt61X5RIIGN/rjTJI52FqIcRT2kYacfLboWy9HU7EJKr+Bw/mn7LWzZs0fb+xgvp4ljrm8LUX1TYFg/el3QG9cD4gG/6R6YT2Y//g9AJjoyLHpEuK0Gd4GS/KCZQdoO8bDkP+x3FoPqX/eL0L2zwp8i78UbMmZQ7IN3dWvj1WknrinqGsquARHi0uPqkn5ouexhjr2o0wduiWYOVB2mcWqCahZ9CDfpPI2T4r4uNuse2ni5PxaEy0RtwNvXKsZTpy4pSrpGNwIaVDIM5Wi2SZRY810iWAxhcCDAYos6vQA9gMMoRsHhZcRlSfcsUPrQrii1IN+hVusWLvcW6l65nghcAY5P7J8Bklwz4Y5jRUj54Zb3Wt/QKINOHfp8d0uBFFVOF9J2Nn8l6vPWmCLZ9818Eqf+VwnLm5lT+647zkL5sZ2ooC/n+DHSicxP06ZhJL3f8yomWFFe+6Txc+lte1hR9xe0CZEzi3ihIwZkJItDsC5aNW1K+0AXD+MSAKBGGUDPmJ5COyuMvfnaXvxAcbcUEnfHamXKILYGTFRRdItKUrpOdubZ0H3sosWfB0qQvQ1oRiMxrd/R09c38mEZYtM75LQGpugRR3Bo2HvLi4g9Vyv9G+6S6KoYHhmjWKkgHwcBrSWuAO0Mc2hZDaEYdJ7mSYt2T+LDCQNOan3g8SHTGCUycol9mh0mvtMapWdsuU5Nh5hQwIjlS+bQ1Z5Wvdb6bACTZPedIpmty/kQWGi84x8V3eXpHY9p/YC6Ul5BBVAUBMSw3UZC6mq9xf+QFPv7lUgzBy3rD6YbwFSz7AQjFpK9iX/H94EHPgPKztpjfUCiEhENtqpWNa5xRChx9NCi8MlfMoHF744+QXj+zFrJNtPlheeKluvO+BrSglFVLuGQ9xL1Iy/6ejGsf661g4b6ZeypCBcVurWsDQgpD+BsTa3RSQOZhSqGo2cWpLtFV12I1cjKyukT0SrySVYASTg04llSHB4BxqHTylogcfPIpXIZZycP0TR0As+aRaBzDDVht X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 54ff3821-b971-4a99-cabc-08d9466bbcf3 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:04:39.8362 (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: lH3BwmuU8G2aPzqb82aCArO9ZHorgnnesgBl92b/eEH76afsm1+gDsfrbPtalBm1UFOP9sLPYuZS49Qc2+3vqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190444_014780_05634407 X-CRM114-Status: GOOD ( 11.22 ) 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 Wed Jul 14 10:20: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: 12375537 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7129C07E95 for ; Wed, 14 Jul 2021 02:07:47 +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 9156661380 for ; Wed, 14 Jul 2021 02:07:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9156661380 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=fzAa8gmkIuMcCu W+U3e0yuRSltbxLVGfNb9TZiGR4PaIBSqsWN2/d/I7orbBJHqtTAGUcNv2C4Qm167F5uP/YDw0pxd OaTxbCdQYmt783kmeIOYNMKJKuN4wpUw9JieAGf3CqCLpEhjjnY2ln/EOUk3r03JqLy6i6q+435Ui mFTYjhpxl+vw1JRCS+VxcI0P7odBSs8jMRf8sueITGwpZ/fNKMIP6QyV3s+lSHOJjSuBOmLGhcRi+ /WfZx2GfFXME+0yD/2LMfkzvBAxfkwoRoC7P+f5MGF/IeEXAIpilYVN9wfW3o1IH6KSiI1+EMeMVz b5kMxHsTToiADOREjshw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGw-00BtGn-89; Wed, 14 Jul 2021 02:05:15 +0000 Received: from mail-eopbgr60071.outbound.protection.outlook.com ([40.107.6.71] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGX-00BtAg-7V for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:04:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i9P4tlJETYWIyaGWVFUas/uM9sae3eAqh45fO4WqpyVR2Z0L02iuqd9T5IvBnZ5xXdzCSy1HM5VGA3nETsn3gT4FrfLcArpf548nXz/dYWRrg+HE4rnkuCH8ifFGuMyIM5V8SQSb3dGBERggELeVgBMJho8TaBeQlpRQgXd3a9dYq4K5N1rmYCHyP7pc+CKlncGke3eglEJ2je5EgLrNBWzbmyZuu4rE52XJjC5ps3cW3w+Wl8JFOlYEj5cwrKPBDWocqavuXKJdkWtlCBmP7ApJmhmOLy4BI4kkzg78aLn1v8oLTjOpnyRbGo8LSke2Gc1RAiuTDk7xBWDJ/nrpZw== 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=Py/moBDAO3I2rA3E4SpLv23EaNddJ8LJ+V5XzVMIkUtXYPDPUJnvX6Be1wltyBJf5ZBagsyJrfWNnsKx8J5DzqU0xcaMPpaNaKe+A0gOn4//mTDSHkIKLKeI6OuF28CVFrvVi4uYlpwL6p7weHas7SMUyOxIxEhvXRRKNNp8IOugBE7ZIr5GbvfX/ZbPu8HWH+oOokMhOG0lwpcWiWk6YDVBgmaWFvCh/CswxcYvJpaioywex/NJV0FTneeFiBShaIlL2vzXXh5yKHOw/pcU0xdEqCYJV0jNCRgeB0R5zengHf8DcT00vS/Wyr4wdDMAXy7oWiyeErh1r/5ofAp2tA== 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=RPuNfkWHvBpOIuoMJDEIqNQUX2GZr9XCQNBn17AhQHybgTHBexvE9q1H4eBdL9/Umlwx92khXNmSryS/plY/Yex5USVp89Dgf+ofs0MkAxwJBRZ7czvdlgsz9bG7/wseC/kNpJlcUf9Lc0kVSMSp0dfR2OiNbXhLglvBqnI7WC0= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:04:46 +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.4331.021; Wed, 14 Jul 2021 02:04:46 +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 v16 03/12] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Wed, 14 Jul 2021 18:20:43 +0800 Message-Id: <1626258052-22198-4-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:04:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 833ae4e0-22c1-4c4d-55f3-08d9466bc11b X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: sYZQbLXg1pLYGWGpzTN/xW9R6t3keS7vWHeXseghPtd7OQOwvAivnd4mYjoPFy25VT3tzXYgBcbiDYsqE2pZupi4Ymh3BevI8sGeQr3JOkS1Zx6FbB4A3kL3A+RwQyTZk8ShoNRFa6yGHG6eMsuWS6TYijK++5VQXjoP4wZ2bD2N2NDP8Z51qaviFibMM6cgGkDVTTHa+7l70wflk3wNgWeIeUmnDFA6Ivwq9WnQnqB+dT7dKOr22rX5v6qSkcxTCw0dh9HkBAKMl0iLSYg5ttHmcYRqQ7x8fGYu3In0iJgEA1fccoO9eueyWwhO2n0RHbarLYuXHHIcocMEnwCgcFJJPtJac4Y5pQ3f+bC7PT9dRivwA8TOBH8NWc9WD3076v9RYE0JMQ91clJI7pP+aSYxZJr30aAlFu5AecGiDu3bmnbnNzG13sguvxE+p393wzcY1tdUaUrf6eDrblFXn1N0OqgpgQFGphCOuWlX5fjFFJLqilARowWM6mngGymrB6eDO6/Sf7FKtDAQxfYCWWKvBY19/xionGqdsJaN4aEgWjaBF7Xu6w2wX5KPvpWrpaxPu6xwq7UMHV0DVuIlBU3//g8mz0F5SVDTyB+ms6fEsLcmdogPZWF9sbwxvUQsA5CdyE50CfDZShmZ/dhjtgPJJll3VmJh7A/2eRLb/wEKZYTzbzCpu+0tj1tVpksvgIIdf/adiAhE7JH1Xi5qCglEySxA/ArrUXTPIVfqN4g= 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(83380400001)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(316002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XstRq1XgUyIKIcOgQYKraCIeQ2UVyfH0fVyefOGv8avl2LldXOc2nqt55m/5J1BZlfPFdOIqxUcjSkMaGOsC/VcG7uhRZmcYUan3XzCM3+f4BclxZZY+XVvIcrh/l8kQDwMn4/FM+eatrW4e5tOcPPRyymbLZOWqj6ObNTXjeGD1IGCZDHrBiiXswLQULag4JzA7RSkrQZC1Sh6/NJ1vmXuS9+Ie2zTFmpPZIY7fiEiTDJcxNEPiseoQEPlWhoFXsjuGDOsWUr6x0SzciSZJp9GrhpfheslcRaAffqqdR1IVhZ2Lg26Y28Kk6Yf6VKnyiEUk8u+lkYyIjaMgnP0g1mYhUGd3uZnYrv/I+TLkVwYk1pc/udhKxIEmXgKE2/KMUMv1/3YFEXPKiW57px7lqINA3mtmJzoYMPxlYOhIt94xEJUnxZfXEGlaEbA0SopODeNJhOAVP7NcrSI9ctxONaamIl+ZdySOGEUC4sDcPexYq6z0qIfiSnCFRe5RFR/gHSodKxAggpFdJ1ul1qxeT9D9AABMSlAq9MQHiTpr3uvIzuzWmWv9pa3Hj7v5p6F2BewBXsJ1Smpt2uM0Rq4JOWPfnvQG/ehTuq5bxf5x+5oRyVGxpckdHEDCqHSdrqGuWcO1w/QK+bwkAOfj80w6xsOBdlqSoE/mkexd1/KpHcSBUsfjkfG9rVp91vSN2VHG1emZfk5bmu6wz2W/YEVwjoUa6aSl7555crt3fCHY1sWcNLkf2JfUDaolV7YxXkwn0ITZzPkBwpzdd4FulNz7cjUPDsRpcPhXO/EMiQ6xHgConnNvOpy88HTB0AA64iHFeo6NOvpt8mnCMo4T9xR1Bq1/n+NEsqGJJmNlKnWye+6Y+6gj71HPZGg1Lgu8hUWMLGEgaASjGKkOwSAZPorpzcCfDzi0JRvAbskkM3jkK8grknf623QehH69Sd+nhVcWqsGj8KR8vpm/knfgk/hG4PMTDLaQHdp/RW7DJs0Eye9ZJ53Jxk0bAfBn4aBIr9BFEaCTdoBe1Ev62Oh4uaTbgn2wLy/cnLkdL3s32PnI685I7Lr6HZZVsTqBr4PsOQx9hDkq0ZSzzUObI80c0K3vqIP7NcnzyEvUSlhkb7WmXnqHjdBAapRSB2rqNMv1V5pyGpeZvOJIYbvUhV7tGDVVuAxGMGTmDO15AMLaoyQu0YmaeYInTjqw46cdP0fCePgi9Nbo710Xbo2ACQX+p+lBLVS/+3ARVUvmG3hWwID9qPsSnQba23gfOFoGKN3QwIUwQbUk3CQ5qdb4Gi9MnQxGg1GptB/lSBzMbZnHwIO2iq6igNgQTnJPAvieAodQOW8U X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 833ae4e0-22c1-4c4d-55f3-08d9466bc11b X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:04:46.7353 (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: cwP9sr/mIEZrLjRUy/LxOQZse+GDDd8ahiXli7SOa7s7wvLoxKEMr8QqiQZFVvBqh0hYlv9EocQSDWupeFHxOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190449_313760_D798B3C6 X-CRM114-Status: GOOD ( 11.18 ) 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 Wed Jul 14 10:20: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: 12375533 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90E45C07E95 for ; Wed, 14 Jul 2021 02:07:34 +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 5E35E61380 for ; Wed, 14 Jul 2021 02:07:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E35E61380 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=AO2YoVAk+FAIU0 WE6pjRQrhfUxzx0lCbluQ5IyNJHdqkhIwJqYlmqg4Xir/OSF2TBBynxYBkC2/flqSGboNG6guDlB2 osQFKCwDRypneolaS6UM1QNhnbae7SyLCmAicWtN5V23MFo3pDSsM4HT0+l/cZRSdaO5SwmBJ87J+ E2XhdmB09JBFh0/Mu4hrwTXQFgUGdzsyS3trnK8cVSoYz2SE4Tv55TctpxeYGKktQ5EWXZnt1DqmN 9WGMQaWDakI9vo9ufy7eIDJXRtwClXIdjxbsoNwM0ZpV1nfTnF8ycomjYHgQOJW8BVpu8dyYDTW58 pzRfZqbGobfg/ZY81bOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UHJ-00BtPq-3O; Wed, 14 Jul 2021 02:05:37 +0000 Received: from mail-eopbgr60042.outbound.protection.outlook.com ([40.107.6.42] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGe-00BtBs-Bl for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:04:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jm2rU8TLwi8eBYdlV7hUwNH774rM70TX16oaHvZbaHHh5LbdRd3CDY2PqCP67Dtxe8NeurzK2AcwzR4zDnzLasuclaLjr5FEyOB5FatpLj8cJLtxFIaX5MZ3tO2kXQs7yxXvdmQQTVkXgM+prCDFYkbfC+KPR3Gynp78gpjWKo9irDi6NhQX7N3QH5Ch4t5Nivd0JdDSrpJyFTdQACEf5jd4TW0IFfi/67vmJALpnaOz6vQk+Y0xshcjtfnXdSCu/6pKcTUKOhwxhFmxp6fAjFID7KpdtUFNSxW9unX7Fy6wYVAhJKHYZ3VW3Dy3+8sjt61hDo3IfvqlLWLUukU/NQ== 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=G8eSYpDDHgWfjcGyI7ppzVksf6nUKHqQmnjzQp4r2Bx+xZW9eGDh95CrffPgGuTWPfsf5SBhTUvtvB4dSJzU8aDbJ6cyi3LoA+ZP+qHp7bvyT8f12FP3/Pv996nztgct1ua5nlo6vKwUOWQxkZlButW/fNwOOIldDjdUIGcazUfXwHbDz49h9mbRdgAXSH8Kz/AVWKDvDqmjN4IcpUOzNhg2TwXtCZGuyOWHgJ5MBmvge3Qjg0yT2zQWPN0y5JFEKA1VUP8vj+3Ag5xv64XX0fn41HiJkUY9mhNIaqV83CILw9/jt/YNprmqW53cI4cBavXdwDjJjXDYbUZsU1RGpQ== 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=YbfXaLhEv4G8aJXScX6kUtLMm/DUE2Z39sKbPunZKmedh+FEr2tbH8aNqXg+VZGNOyMf9A3xkzNzzJNSxMDFUyHffpDGOIE/QW6KLkD4gUbSJ7zxkRZ5Xr7TJpO6u2Eq4BEHu+8Gx8v/+R1ueJbpjsga3bJBKafmlSaLJ+FB9Xc= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:04:53 +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.4331.021; Wed, 14 Jul 2021 02:04:53 +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 v16 04/12] dmaengine: imx-sdma: remove duplicated sdma_load_context Date: Wed, 14 Jul 2021 18:20:44 +0800 Message-Id: <1626258052-22198-5-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:04:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 68ab3e1e-78b9-4eac-c8ba-08d9466bc52a X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: RPrFb04//5rSgYSyqI/R4FVAcUi6NDuomAvdlcx/PGMjsjepb96Ri9099phRZiVxoIfzE91sbo4nRLVACI4QmvjHnNYYly0X6MHmA85BaK77+4TTaFGYPRqKM7U/WY++8rnofzvJ68PbqS1GRQVcFpzsqpGxzGXU7JoRODyZuIYShxDY2DReIIFF2NeUY1x3RQyitp9VVbDT6rujP6LHkdUSC+ESiCrMhk1ieIAsUTz15z9BWvX/2w91wI0AuMYFe9aX/Trj//PYOwzSw8d1K94Gklb3qJ0dj5sX1rmLdL1zqv/RsS8nd7RLGciBmd1rtkybw2OX6pz1E4cVRXBHDE4w8zJY5OzV3bJ3isvjcPqkUJr2Colwj/VKeXzCAP1k8ZElE9zPBi6rPs0+1IIV6ClksPqEmvx/8uv//wdK2Z2FsMZPvRygcFh+sglfBN7rPpK7jRXRaSmdKJ8jRgKZMD1+hBQ7OQpo7nVo71h2Uzp5C0ZpD/7pFChN4/1HKDGYVYW14vyddO6LKQgz2IxgXpOPRFnJcxUmhnd0xo8/GRvSKNZksWFNLNSSqj6ujYBzNkmPNpDnFrwfHi+l1Pk+8Ze/eIwdO3ctyWVyZZCff9ZcAnSNDLLXeRlFhOjkWySbFJtqsq6dZ0BZB+dECdngcDd1eNu7HRtq3lDHvZL8cDxTIIiJWWBTR8Eh2UP8RvnQfv7nAy3K7PIvsCF6wlFzRDOd8EAsdRGraZTc4JHb8ac= 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(83380400001)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(316002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TZ1J8xbRyBmr5g7vOobkENJjGSTRjw5EQWfC0JXxFRjEZzcD8JHdHKNbsFkkNEt1l26e2Wr5PA6WwvEziI2LLZ+8CNq49+UjSfuBntBl0oEHhUjfhVHVraABC83iCEsZusqIVymWOf5RDU1yf/U4o90BtbWQibAhWRMKwuQ9i6Ys8tn73UkXo2S7/0/QekoXL/9rjy3AJ1gMyT8G/gKMpyq7MbP88kh60jRfgSKDq7Mn+eL975oxD4/2z7PvbxEwjWuvrxIjMgF3kBzjR9WpE2BA3ABGfcCQgdB73FZ2gWjCTYoZsO5rGAIqqVPpRsNZ93F7lKFwlR0PnEU30N3/3xD6QOeB4IPhm0/GoD5psyeussGN7JBH/TYyjs2uSyBHrNhidB7vp58vEDK+bNO0gqdfhza75VyLnUGo8tSrrlrTNILoPqZn0ty4Hx9JaYGL8JTCweXTGTlcDM8aI2yENJfVO6QSKIWKc3kUVZpKAWpIuLhhdKXcXQoO9xgy2T/nVBSf3O7HPyN9MmQo0OkQzxoikpaCNG3XSpsKTAMSGqISHrPw1VRMtJUVwayUul9xdw+6VYi4J6LknXGoevBxIjvkbjH3KYFRTkd8DkVo3YDl3QMRp/nNm2hQ6AVRJKSv4d2pNYhmqXjpjLF4WvMjLQCy3pAi4EEMHBKf704kIGGMx1kGvLiW2oqnqOJ6H35/jac1lTL7HcZwKMX/MCx3b8Ay2qEDK0uiTXpZLwnTKLEp8lGbxKKsZlf3ypkhRJtpF5ndGNCyzFaAHKWlPCiHGAC47ecmGIq7ohnaC1PLjTqJVGH/F2aNE8BF8GyV/FNV6Re1zEj0YPi7K/xKxfy0gxXoSvhajFKEGreZLLbyb0ZGO9LBIYfqxrHezn/jJud6aOPpHFJ57/bq3gcDBX1wi8x/Z+tvrBv5dmbfHnuvNSaD1wXiNZA7soY2to7Y4RFAwnj1py6FlW5mAdXweTbbyP3iT0AszX68663fQDDJdLZz0XsE88fw4ZcQupKfx8FfknPkak6/BnGWXe5xoAX5bwV+qYkIxpStPUlRrrpm2SJICbLblafDqdRwlwETj78xcRy20OcODvSa9YEcvctFzD0aQvdOj1MTYnHs3qisPt+QfWRx7WLDSlLzSDmU+f9nyIJk7qmoyVp4AHArRb1uxTcJIsl/OnCl1jSH+rGd8XPcB4xWGaEVw5KmqSgzpBKI903Nlp2mPcO7Pzo1eO+LOGU3Dp2DsoO/Cdf7Ys4FgePPz/FgjLluVdrhbujI2gsYyxZeXBSfJ4fOyj6Hm/2YabtotFWiODn/kfS6Mo6GizcmF8my2gMW/xDW25D6+Awi X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68ab3e1e-78b9-4eac-c8ba-08d9466bc52a X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:04:53.6564 (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: S2+lgaOClQgDnd8Iq4eIG9AucPtjKQkvy5NzhD2MyJN2NnV7q+xVdTrYi8IucEzsPtpUKs0EUD0n5H7CoE9n2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190456_464646_808B4175 X-CRM114-Status: GOOD ( 10.95 ) 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 Wed Jul 14 10:20: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: 12375591 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56B2DC07E95 for ; Wed, 14 Jul 2021 02:08:01 +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 2018260C3E for ; Wed, 14 Jul 2021 02:08:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2018260C3E 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=XSAHM0WoyrAYO9lXQQAZ1t85GsQGwkg929FnV4tbHVQ=; b=0ZT7s0o2p67wkQ PX1SO+U0zPms5AiImWYcaIexnnjzlICSm5EeyjuoKPVKsS+pe/TmPzjEz1G46rBZJZHnF0l6/S9zG aurz+W9jEIGGssMNpU2ZyfTarlepL5FThgvga9rjPx8DomDiACHaRU/2udAy0w4QKBwMoFG43cD2p ym8JiwfW4eUF6J4nN1nUntGYENYE4Ay6RHGcfsNkvw0a5aJQYMbFNIyXiguN7zXUY08QdmP0aRZHr QuDRE12dAAfrVu9XzTe+FgMPyN03mODU03dJWIwedT5Dc4cGB4yS2BtRHrHHysThE/nS57ak6Diyf 5XP2Wr4JAE3Ms4KLvueg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UHl-00BtZl-3Z; Wed, 14 Jul 2021 02:06:06 +0000 Received: from mail-eopbgr60053.outbound.protection.outlook.com ([40.107.6.53] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGl-00BtDQ-60 for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:05:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k+BZ/ZMlEAsYyr4kQcUsATuzdLruiTfTvvcN85+0Cozwozy7dK5siKkSUtTORN8/1J3lwTnRBiWob+ROpmJ3i0PVSyouXIdLB1PUSLYq6yrnQjHYwcWarAXtiYMvqjJqjW/HXaPDheP0ZICVRMpM3LTjFitZqs/zYhgLy+o8kzflBtFX842LvAfZPH1oDUo5g1B0D4nCeyyyINz1yeQYZDD3m9STekbWRowQ1M2bA6nC5r3zSIYxmb7CCjDHTKtX+ftr7IDjUY6IEc1RgoqbBSNia99CxV5d3tB6/CXVHCFYpPtZ9HvLVPvme/Ivd/M4JiXcwDatJN1t3vnvu8R4IQ== 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=L+wNYSXkpgwjMDrrP/9fWqjfNAb2CmAVUWdGJvYPzQQ=; b=h6cDmDm5tdosekmCIjiKnnPPYa4VfoswWKJYYp6Meak/QOByV9BT/9lNI92U0ORXWVpid/LEd6muXogTdOCJ/epssKiFRmtC1AFKZtqFnqFYtrYyJyIQkL+myeya1xDFTdluu5Ob9xQYlhtYuRBSaR4V8qaUXJyd+DXoLK4zo+epQTYBwNGar5xzETEv1lWUDNhGj9sm8xip5VZo9SLx3DGPo6mN31hT6DaDrBoKsH3Idf4C6xGUmZRz07YYx6Q9NQ4GeQVTrQjYMA5sTcoAwgfTbRnML1wlwxbOnnLj9Ss5ROOcs8psr5YFcsEojrSEKl3nZB9iyxze/y/WZB6ECQ== 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=L+wNYSXkpgwjMDrrP/9fWqjfNAb2CmAVUWdGJvYPzQQ=; b=HheEpRqOLpFr8U6zXTr25mmhcOHt4KgOsEe9/JRxS0apx3SO0XGpoAwgZWzZCB3TD/hU+Nd2RHADYElbQRL5eHHWaULhohadZUN+iYKHLyaTh9+ndC0bZKrGosaIwV7hG4eEFajBYdHvR96t8fv6ZUlWX2Yf+i6+fu7E8eZtMxs= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:05:00 +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.4331.021; Wed, 14 Jul 2021 02:05:00 +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 v16 05/12] dmaengine: dma: imx-sdma: add fw_loaded and is_ram_script Date: Wed, 14 Jul 2021 18:20:45 +0800 Message-Id: <1626258052-22198-6-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:04:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 60c91c20-3fa8-4783-c999-08d9466bc949 X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: dZqRkSR2sejJWzwzJvktPfvOBV27KCbwjIzKM53e4x+vMlL8SZAhmRZ9UtGO/Tt3Ea+afNqRC8u8sTATAAY6RYqW9Vk4mKy7FxR8e4Zr+/6p0ZVUMFG2RdvxZHG0ySWTMm7Q72BAAl+JBTB0RsH8AHrMBW+KkHRgC+a4scQnMF+qFoZZcSdGLUEivOI4VGcCBsS6qJtDeRWn+155q7rRym0WhBk/K6cFkJKuFbY2Wv7VmjzW+5hhQC7S63HwledMgIJbKRcITYIKrNl6nAtF05uyXdtWPFvH3Ucx/Nymw1oIUvz4J7N6mv+jmEVvuVjvwmZY22xlhBCPcit8i5ybMtbhkfzk9yuKpi7XGuM45Oedyar6730wY6DN+vn3tgJoapA/Rv/Pd69Yq2++MvOvHJk4IU1mFdSpp/utdVcl+g9eAOUoTPsBp7y6s0bhhQQs7ZaxvoNHXakrpsgmXd/geCXDgx48+0VNh/9l46zsv8s+nrEBgIiN6E7b7rx3t/v/+AXu7dLUCdvP2VPAfxsIU2/PzqmO2Q3fZYo5Ni5fAIq1R5eOxl2Ag05YL9Pz16yTzHXr+DAomm4Pf3xsAbSmdiASYrRj1460SH+pSbgNJfkz1My76jKTCZD5T9L6D6pgXpeQ7Q1i3GbFiNV3pUthnHdaWVvkgRtr4KdVCZ96y/oJkrnSEOiCg5/zI5bCN9uWdHdVLVEs620RxsBqDrL0EI3E8p/ZuH0S7/tNR3c1dso= 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(83380400001)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(316002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: U820x/kAKbbma9XOIy1HoN9k4gE833G8enmUldlf8xSJBbzYFlv6N/n5ugkPab0mxv+AJ/Vwdzm9lMbwwe+e4oM5ncGNKIvZMavwlM10jb+oanWbVahaPWHsnWCSJntNwiE3ndnKACOk3LIz5Qz7VwK1TwQxdmhbDS5/5uWYPcBfzZ/XbAQ4NAsBJK3TFbJ+7xjRLz1U0M9U9SdG28f0q7ZVThEfd5BpU3gPmo9kzEtlLVuy89PzompJ18ZV822PZMpwhv8+qOHLG7xJlY8wc/sFgQKNpW0bPTkpnF/TiIk/f79JU0EjeGzvBfzgOFtjHMSHmTIBJMt29KBr/bn92kWZdnq7WZ1USkJBBcOBBDG206Uisl24yh+EKYah/GlTSnPjXXFChrjerU/BbW7rjntv7uK/mwXpS6VocYU+x2/zl3QqLaf1ZgvYBOKC6F/F1LcIyUSYglLfMgl+4WeoseB2D2AhG8HFzWnpY+g1rEV/+njPo3iieGBHmhB/GfQ5S0Y00E+ZE4xmO1msOf/7aW7sk6milmz8ToUnCNRXJe70XnHYhInvqeiPwSfcmORdjeufVUChD+8Bwjyi6Gn+1pkRk3/bHjj9+IBSUbe9AsRMK/XzfLO3+K4KXvcBRdYCK8lsj6WgUp0PdQkYpRYW8TQmn0A1VF/w4kkPJ1OhK9WGJIa51UDZ4NhgpBjbiJe1hwIE9+RFwLUAaVEK+iQUUiByWbjodLZmCd6mQ2SvA3dk58jgMTu57URZ2D+A3OBJaxWJCJ881hvIJBtv6/bQqeV4TS0XlKruIWA954Y5EK9hyAdEY20fGV7XnClPe+E8R/vPvcN/By/8BXUVO5bNP8wHjfzoN2k6B49SmrdPAHv3LKsJ16E892Ig8APRw4LqoO38olxGh4wAwFeBNnrUHmmkK2CG9lQO7RmrJTlecVEE+TpQOevUpjwJDF81tS7c6ELnx7yEElIF4rSAYSEkC5Dna43kPqr5PepNydVemco+o6QAzIs7FckXqr0AYrQntFWVDkE8UaJgmqz3MFvNa2nY6e/FKuihGwiRE0P/wm35Y3qQRJNyQUP5akHmRl4k/lP9G3JZaEq4OvEJacZ/s/QqONxypLvUXVLPx45abYsef2HvB5teA/MmG6qUlP5kDSDswCajXyYB9TJzAkUHixyilFTHHKkiHpOsY6AxvF/33kIglUpenmadSmTjrIHKOaTOrDQtF820wl81PM+DxZlJzU12zOTKZGdjwryMHSw9FeMkL4PFE3UIqU8Uhzfsz2HPbvM/ZYieObt4CdxCMUQwRmPr0YJoRA6OYK6BgERU+CNx0AeTH+eN15XpnyIv X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60c91c20-3fa8-4783-c999-08d9466bc949 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:05:00.7054 (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: sP4wnIGZ1cbAhB0Z9UwQXEJR9Kmj4tBSe0JXKjN3bcLPi43tTBigmeTMfLzegyEZP3SUVTsyqKKvhDVFD3dqCQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190503_284043_B9534610 X-CRM114-Status: GOOD ( 14.10 ) 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 Acked-by: Vinod Koul Reviewed-by: Lucas Stach --- drivers/dma/imx-sdma.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 665ccbf..d366198 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, @@ -918,6 +920,7 @@ static void sdma_get_pc(struct sdma_channel *sdmac, sdmac->pc_to_device = 0; sdmac->device_to_device = 0; sdmac->pc_to_pc = 0; + sdmac->is_ram_script = false; switch (peripheral_type) { case IMX_DMATYPE_MEMORY: @@ -953,6 +956,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 +971,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 +1368,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; @@ -1792,6 +1802,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 Wed Jul 14 10:20: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: 12375593 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A70F0C07E95 for ; Wed, 14 Jul 2021 02:09:17 +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 6D52360C3E for ; Wed, 14 Jul 2021 02:09:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D52360C3E 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=Eit9lxvQJTNNIAro2orGpuUC/0iD/eFxfdWJUEpUyuY=; b=t+1m+MHssaEqbI SXcrTEE+QXejdnwGX6PzAIkr6us8zz7zf/I6BWBrqi4wCoRtj//+gqIlCa9Pf0oiaAslnFU65z5MO SfWSDx+7/qbUCh0BMMxs8clY2Hn+1jF+YqehH0NmtRyTk5eI+hZt3fI4GwIXCRFKdzhXVqXYpDTC3 wSxThj3lHQorH/25rf7kGYW90bAMLQf3xMNKftedwN1hy6cLc1fZq2YmA5nNHqevtPs/kLC/4tCks /E0fa++iS9Ifw3CQ+BF1vjnnSUNqjtW/SCnllDq8GrYu3iIxm7/Ysh5KsiNz1O3uCHMBZvl/AIfUU HJrgEPZ73LUXJjsLzDaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UIY-00Btqu-66; Wed, 14 Jul 2021 02:06:55 +0000 Received: from mail-eopbgr60049.outbound.protection.outlook.com ([40.107.6.49] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGs-00BtF2-LA for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:05:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OX3aTH4FO2LWhEX6kqy/AmhFipI/VYwaVqEw2j7GYxbIQ07l/J3P1Cke8psLUQghtb0gPqCX3QtBvX11hXM/saHH92lQGe6ARqff0lGl80Hxhwd58DbgeyjgsUnjLooMAgzwFz5/lPJoadM6IkJY2zZlHBt8xXzjlRchv/8bD2ql/eySekxeTuLmZXDN1Xa0mV7BtTdS3s0/4PbPBUVN78almMnTYFam7tjK6JjJmVMz5KLEjeLVBh8wHnc4EaSv9Koi35xlCXjcThihPYXr8i1clNiWxcyfxJys1SD3EFnd9Emf33G51S6v6nj9fGb5ZAE6McaZc8RDDt/tWIyRAQ== 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=ML1ozUJ2orouf71VVS4Lwf0Xz4lvkyqJR463xfc8P88=; b=IGmeqKr/NMKjKurDoeVlHFoYz2IdmtfBz1juabnoNjtYPU/Q29VWZ2Fn5/s/ETV4HxVFunrnd/9c0GrxVtMJghbF2zf4J3INtbe7kCC2lp79EUhtizyou17WaOR8p7MqwJPkS+ZACaXaV8ev3YmHmkmDP/glPBsmakAqDRgDHkjzWka1FnzMCTDwYnET2Ue47dRXJXrVx75mUG2Ms9h5cfXCPYDU1yoX5e/R8o17j+A3OmEQxqRHuRXa4Wb/j8a0VDTClgMkITmAEBzBwBrie5f1U5qAwlm+R2pDsoVBDDnWACMlXIQrr7ih8O2wd7cu1CKdNefh+77n8KMzN7+cHg== 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=ML1ozUJ2orouf71VVS4Lwf0Xz4lvkyqJR463xfc8P88=; b=BCRyXS2MjOhJZ72c6uh5XEsXMWwyoZq7Inpo4wwuuT4jxcl7gvIAXRY+3NpOK0lI2DOHkYb3NIjv+O9x9mcRd/ZYxZdP+P0CHHss/uFMTu5/Fv5HZs1/GWv3AqmzT0sJS9C0xBcGLhSD4apZlZL1weX0voA/5s4CeNY/r7epJFM= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:05:07 +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.4331.021; Wed, 14 Jul 2021 02:05:07 +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 v16 06/12] dmaengine: imx-sdma: add mcu_2_ecspi script Date: Wed, 14 Jul 2021 18:20:46 +0800 Message-Id: <1626258052-22198-7-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:05:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88b1bbc3-4629-4243-74c6-08d9466bcd97 X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: 3/g7DQd4F5TReqhAbBODMDrSclVq1psoGQplH6aVNmCuui+Kh5gN1D+MUmbMWHsNWkA//q37OeuyAX4OtNW9jBIDazhHGErC8jMA+e9+tBRcqT5vj6nMgGY3jAemFVBtlRffqfHygGpuo+gVipcuiaLDYuUXlF1p4cf7Xt9QhFq/kqWCckL3vYLm0Bd3ZMLvjbiLZjxAFVNdMn/CQsFpUEe8xLJcmL7I7gfugImOWPAfcjY93wKGFwqUi2JqvM+7a6HWDKhkRMPNTavYeG/z36KA1kpLUHQt/V3Lndni8Ts6Ol2Vk916wwDeqYE8SVfCjEfyA/HxVdzuPBIWTuyhbYOa2QSnyRNXtlwX34SUzMjpuh7dHaKgYT8N5MiSB/kC/qnFAJ/RJ/8qOHAtqkYMgxs0aklk3KxefbJeg8IeYrnHrYV3JjeEJzMfzC4IC+mpux+r2TSkiR/CSl1UibKG1lG2jAKU1NJMQLJyUOrVhZmtczbchNYXrXzrKsVgPe+b9urXvKnM8f4GjogP/EdNxGEZ58S9Vjil/MeVrmhy2DnAp7AM8Kr6Egtr7duhFUzBw/16vLmlF6RP1PNxGLt6oB0Yomu//pTkS8Yz8MAwxSONmkk2UYt+0h2ku7dr1O0crUEqGgUiueqS4teHGRaPxroMxDZ8kkjHgub3cArFtbQaHmUFjgP9uoFI+0T5QS9h/8MAniPcubb5WgStTbIana9UyyyuwnqfuEFpzbJBmvU= 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(316002)(66946007)(4744005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LX8tQVeTlZVXF++KR3/gBVvBXtxNWRBUHe699jTh8n+sF59FSW4DhzD+ctBPANeOei01pyFHmPEDN+s/YJZl4CYwXEW9IzsuO2ybqJTYGzVrMx53a08UEezgrUsZ0663KmHiH2i0TnPsziXy+yu8GnehyyOjOI8coVaLyeoc3ApNOYScXQ4s5NsMa20L1582/VOhwv0nzgSslesM6mIFt9YmnJ+HuNw9iglptKGvmJZvXIfdMx0FFgbyqy/m1W0OhLja/9QxFC0rUCxmyt8MHy6WuTqWF47FyGPFMNl5m0KIBcD+KhDm71s8mWsChsqmR6PTfu6d1hqGfuJkMe1nuWxyZyVx6b2QkrDXurqOFanUES3VRLd+S90gWm3Q3almu3+bdBDfkhPzchwAIW0wslEq6CC8sD4Dc/qjg8ESlxJHRw72NuEg9K5SB++66f08syBPgLUPwVAHFTG+XCwPbTVp+W8GWOjteRHQKNl9ur6SdKdfzQL7YQUHpUFQ/XBQ1iDh1F4krfguzsbF5QjPuJgl4HG6gq1znFFX77y2dUyoc9nKIbO/rxdoUPYRGHzB4bSjZs46xb3z3tJtXw1pnC4+WIw9eg1MPgveW4klwdi/MQxFD+VRy6eSYbGapE29UYeJlB5y08YF+YaQLz713o6C6e+HSh59RjaSQEvA1a4cD8N1rRtaA1oUH9IFD68q/FB9QWVvmYatJdWANgJrtlbs/mvjIVLJDPixdtv+8LeplqOY/2Fm0dx7Zkhr1+8+9jiPorfhPaV2pLtXqxVu5/0hlY5GEWp9F6Qh8UamQpkUIC3Ru3XHU9aGvwUwde7uX/juMdz/m584souHnwfcBi6csH6fK/Kco2TUvoQQ173OPVEOd7C1A5J6C9HxR81qkv8EQrUeBm0QusXuB0Dadvdhhza1fN22+9h8hj0ZY0vfaHpeXWJmhFHOpG8sAtTUfD/C/hvszwkJE72lt0pIQQzi/GxSYjWlgBtM5ocU5eVW1CX1n/ZYeeoV/d3dSVS759xWt5U8V2t0DhsVgDGxUFuXiXNf8DhyGMywPdK5WQVL9A0GocfcfcMqG3lKR7MSOSU4sbiwtL3kBI3FJDfbK93y2HWge9A/7NXvYO6lp7+0YufxWkTLDS9gYUNRjuyWQra9v+aXaI3Oe5rceSOnprx1HKHbTjocDVqQXlNAuXa0LN8wEts66WXHmeThx5xvnYPAsTiue/A7INc0ks6SIME5qKvF7DLvotgMiZry3eeFNjXqLRk9432BDAvoQfCqldqxIk6sKzoGRSk5s014DDntTrPFyZMYw9lnfQD8J7IZ5+M2bJL28ZhFU6nGt7WX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88b1bbc3-4629-4243-74c6-08d9466bcd97 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:05:07.7973 (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: yFMrWBfX1PilbNumruRhTYvO96gustvG5onN6J9VG+B8XtjZ0sUfK/rir92ta5Zm7xFb4YWDBggHeoqpEF/7ZQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190510_756727_E4DB1DDC X-CRM114-Status: UNSURE ( 9.32 ) 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 d366198..5969df8 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -947,6 +947,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 Wed Jul 14 10:20: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: 12375595 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62CF9C07E95 for ; Wed, 14 Jul 2021 02:10:18 +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 2AC0261260 for ; Wed, 14 Jul 2021 02:10:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AC0261260 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=EKbZF/vDr8nTq4 W3H4BKrOHw0txLqivO/svcXbOwg5BqBJqya/oju46MqrQwg279+bUK07OYB+glYajCajq2/91u7kL 3hAJZYSgnQeIVK/+CeTN8Ev36lMbTJO6IgrRHk12BSXTJZtrOQ0Zlel7NmfJsGNq/6qdXFN7abQPf 8azW/9eADdJL2/xbywMw6/mJ8uzU3OWbBISvgiuWxEleD5RhODy6P0YunTAweU/FXp/xgwlwfOwxn qModkLuUX6ihuWd6x9WcOLaliDaddUWmoGrwWNhQUPsvdmXEkjd1i7qVid6BHgsOu1mbGpBHemke3 wahAr4/vYrF5vhcZ9c1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UJV-00BuDW-DM; Wed, 14 Jul 2021 02:07:55 +0000 Received: from mail-eopbgr60079.outbound.protection.outlook.com ([40.107.6.79] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UGz-00BtHs-8B for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:05:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LubNKwW79mOFWCnWPrqJYIBYHJ20vASlesqOpH6i/nA+hGD8nYz6SJPiLfnWqAcCwec4luYLfxsr+3U1I8fBopmPs59RrlEvJv29iuGmC0feTBxMaifdxqchrv+rADT+BkMHAJ9bay02dtka8Qwoamoj2VDWt979kbqhAMH1jdv8cuuI24kMVG7r5hHBr9ib5QT05bf1kGDBfr/HQHK3XWr5URUZBZGP2FsfuhF7g+18kdq3Vf+HCiMxaN/ATN9YXlb1JBDogzdt06zHE95MECd+hpod76w1RXq0c4y47atC9R82QhgH08y+/udMirf39GVpE2HBMyUou5wJyCOKNQ== 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=bt9pU6agi8mPvA4Hm/1zgBP4m8D7vQ2bWVK7llEURaI0nIuiMl1qcmr3H0M/KyS66+G0uwE6beh1n7HJ0AWyn/ezI2WBYl7UzK7MHZy3650WNUosNXvMOHcc1Syj/+1eGWLMBgtfnzyqbkzmCmjeWMujFvO8LBeKkURbYDgDjx1wShmt8Tya3LrdTNNC30iJWzlDHZCCy1BDCiyR0ttYD/wOFF7gr6/m0YUIzC14KkpxB21qOgmeO3ltamb5fChLtBF5FghDdsLDcs1d99bXCoVgfiLRH8PfFM7P65vy1ztKzjlVwLz7CJyqLU0MQjfmcufDDlOMt79rWrmr48ssEg== 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=oTiro4bYTnDlF5PNDC++7kfiquVB+4X02tx3gGNYgX1vbpyAnsz2FyE8FRiLbpkm1gopnXRxoFgB3q2YFCRRsiZBTF/OMEqVCvrG/bTEAIA38uYPmuRqkRL8IODzYVXv9YlMqY3xSLiLMQCHVVH/XIHqec7mBonHbAudVhLIOco= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:05:14 +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.4331.021; Wed, 14 Jul 2021 02:05:14 +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 v16 07/12] spi: imx: fix ERR009165 Date: Wed, 14 Jul 2021 18:20:47 +0800 Message-Id: <1626258052-22198-8-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:05:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d5ead7d8-3180-41e6-8e8f-08d9466bd1c5 X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: DdlXoprDvwHObC1TBTegO6vDtGBcWY+8KWAahuYEiNCQ2BVra8MSX729OtsyoJk9rmFFi/iN3xjL0R9zSQAB2060GoPMkuHg0qMKBdma6tDtukaCCqvT2+kMmAAe7zWy2c0ClsNYz7a32ZWY5IV5cEgfHefcAYMGvANjpNUjlJIXQ03w0RBwkMmImAs01YjGW4O1qJ8Cd7ZVOLM5VGWBQISnKvZOU8YNBC3+oGI6IZFJJUznkqoTMIoIEWpvA8bnHsZwI3y9DjEuSF7fQPLJhrVMjjeSnNdJOqQf3dalWZbk/LtEqJLFOtHZ644NdqVt8TmvICa5WhUEEz+uGpQ83u9k+pLDUd2H8v6Ap/IZT0UzBt57cOGL4C9MmoJEkEcXXb8oMqn1nk5jFavCuvVm0OuZoRceMnXiwKGhZ6BB8SXZWTf9ZCOQelanr9TzHFgmKg030UTnm0GNHX6BEkKVGBVDsQPseX4V4cxkrFdFp02g85GC8OrAXTSFwr0iMwQw8/Td366JL6AyxteZVt0C9lY1/h5uy1GZ05DPDESzvag4dL3i6MxdwvudEvvvUqxKA/w3DzyIYQmrkgpQk4BYQ3GjulDTLmEgtXzOubA7tqkt39gaDvwbN0xVjIel3K9ZsNskGjLLq+Gh4V1FA1jl5HUMstYxCFXTbPTMkCFvqdtJX6rC7BfHl9OPKnC0pL6MXYilkrO+N1jcYgXqCVEvbiFUr4Osl9ksu0GzCVxH4xVSvNKL1Wa6FVcvbXwO/e7ggj7YHiAzt+MgHnVAEOa1RmrLa+sfjgPB22cLuuUWa34vHupPi+4GJIUikzpUC98y 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(83380400001)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(966005)(316002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c3Dk2NCZMrPlwXDb7T8ZZTprOnF9ro0z+anAJWVB0a41kyKsNOhWxh9Y9h3noTczicWL3NWS9luiOm7UZv8eZzfL6/EYaipnEGLbzYyHv7FGzycj8usRk6d22ZG8sXTZQn/CB1CdbbShrJe5mxZMd4dAR28AjVmSxiyLEixXiHWdIHqDTkjR7XCCmTwv1kDpejUMC67FmuEKRjw3ilb7jNz6XvGRvv/SFNCVIOul9JHmCWYLp2i8f+rOzZo+h85Y9oLxUzhLVD0xyKQTsqlDmrVuuW5YwAuSmgX24PylOhqKLfpxzSUEpP2spELLyWzqbzI3IDzTDGOGKLiMLdjc8vDVgaUHO3/i8uYB3mQD5mR/19AAGd+9GfEUIfCpB6ssbTKJtUdEirDRzs1QDrxkqv65QCmH3KFq8SqJe+apxFU1X1y1bscQcm66jXxuAJcghy/Of3/GPuweAtDfriaO2dR+EhL+4i29UeFPCY4iDqzBy1seC9LIThtpe3ALOMbrNsZlEUJNHsVY+TPxKwAMI6bjjaKbysOG7Ed12FhlNNwkBc8fpGOJvoCAb+RPp/OJIyTWK07Q9ig9X8lmspEwGNyaCofdAAERlKE/ovsb1P7UmiJ1i7nrEvavGFJ8tR/qOvzuxJnUXjtgzBG4rc++eE2aC3k2SYfz8/VoHngyd19c1iqiCp3JzKh/2u6YoJQTprwcElWhrQZQRttZedr2X2jE9D7P10cNp6HKd24VL/QH4iHKYszVTrg7JhGeg6skDsrt/phURdoLk6K4AcPOakQgwcjsQPp6Go0kdKTDG2Pn0IxeGEI7TzkKampaGuJ7yivSAKw6l0Mz4yqvBrE4p2AtUL33Qk2ectqQEU1GKuNsg3qNXkxBVtox/SBmtU94AY7bvQxu2rXH7QNxOWvEmcQb6+ypRi2oNtg/Tkf2JwZexB84sLA92/4urB7hL+b7ZPlQHQ9cKJxAcjB6HD1nIr03pDEaDte3ZJD2ASjM08+byxOf1Su98G7vRW7AVYUtSsXK28HJqFVlVH4d3SnMgRzmROiBFjhjcuB/d+fSWBOy4TeXm4XxP84p8An9g3ECWIfrJpYoyshmD22M60L+sJWD5uAahoJZUP8d2CiBJLg8UUvYv3Eq2O73FRfqEON6Bn6cYUSL+QB1VZkRCtDTyaeCkHZXEuT5F5aQmyfCZANf84D6p+KC9XdzGu3AhjkLClP3Ib1ehXqs6k1pyf1fQoCrhGe0Uhj24VN3lh6dnbu33lfUPpPw4id1dKh2UOFYXv/x9+hNzBO8iyVglY4UO4dP38PEGODy2hT8DvSY9gcleyjDyycA+XF2tjynBZnI X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d5ead7d8-3180-41e6-8e8f-08d9466bd1c5 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:05:14.7054 (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: nZf5iQUGCnuNlqvtX+b258wqBG3MHWIqclSGuLOaAk+OiF86HmzsRj49D3WMO0jjEpgEn1AKpVKQY1lqTF9/aA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190517_326962_A0B6BCFD X-CRM114-Status: GOOD ( 13.11 ) 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 Wed Jul 14 10:20: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: 12375597 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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A88EC07E95 for ; Wed, 14 Jul 2021 02:11:17 +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 2FAF361361 for ; Wed, 14 Jul 2021 02:11:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FAF361361 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=sj72ZGBwcHu+PRvOCSu3XiQGQdyh/bVF81+FRhNjfmo=; b=x2XK4cztfRqL5m 0yY4ppmuZ5cdYCj73iSA433bq7IVRtT8/ypYcBC0B650EGnxawgwam8/X7obiZ1U87Ixa4aX/ukek +UmFp3CiaSc7oQR3A1YoItU80UuhNakoFa47Cg8S5mBaDVReieJwrg5QzqaFq7tOgzKzIYlxts8mc f4BoWt7kDDJXAQLw+bPXM5/EzUpb7J/AKQ4Sy3pVih+/mdZ4go+XHv/AYTMPkKNJ6pjKhwIpOKkys /SK5pF7UlKuu/lGYhPBlY8g9d4al91kfI3K7v3+AZV6Yd/qURpYmUTzZuIgOE4xl7ieR8d3+gKMyM 8QtBs6qB4Q8Z0k5Isrfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UKR-00BuX9-LT; Wed, 14 Jul 2021 02:08:52 +0000 Received: from mail-eopbgr60081.outbound.protection.outlook.com ([40.107.6.81] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UH5-00BtLC-SX for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:05:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AFKohOABPO1YHxdoLuWzaWOgTA5Bpy4Sk4laoI9WAWnU71KNkpuaci1CPi5DiUaUuWKmmYuukX1wUE9C4vCL+vg3UNX4HhHBsT6/mjLA32KHEEBaZ1TxOHIjuazr30yeQExWJ2UcZJR4Xoh75+F8HET/4T3lmd4terLQbgWFHo8fHuRe6oofsBGZKyD94NGiHZjab4rpKfpqc22pUoJPoi1ZTbferUbULojFcQ4XyIY0A46u932MnHjkwzjXQoK1n7DRm7E13HRe7UdykUtbeRcBbgi7N2A8CglgqyGzSs3K38MvWa/kgD3tChxAt40ea4nj+13NbcymnGOTvHWqfw== 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=FkkhS/PLf8tVUbflzlvlcoQbnJLFeyEnpWPzCCb4UtM=; b=iRZVmIngvN9VSRvazGrsGs4NV9/jaI4b/i2Xi58dBifJP0GshtqrTKE8JQpyFYmdMUiTSFJEFgTtxEfeLb5R77CJaEpGK3Tck9p5KnG/OHD6UVW6Ccvl1YiuEO1P71xX1av1WBkcAFr4MTQkvVT66s0UP+1tyPMhC5KqOiuqmUkSJ1qMRDBkoSg7vZatKhNC4tEzGT2oVT26JPx8NVOxnrhjCNmkPjFvtqGdL8JUqEyCFAJrK3Np5GAY/sksYieBqbJsd+GGuWuwSCdJY7U58oYOrFPfUc/fGVAxTKvhoC0y4LSANgieqVItZR76JwrnwHs43g9sh21pImIMugM1jw== 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=FkkhS/PLf8tVUbflzlvlcoQbnJLFeyEnpWPzCCb4UtM=; b=mfI6ihb+180aVHh/bhMN6KVOMWiH2Yif2vR3rWduuvOOn7P5qNs5y9gYiw10PaKt6AfgxiCspy3BfkIkx7IndMOnAa3Y6LHX+r5Uf90spCuF8rI2LxPZfd9g1MM+VeRIaORIxUoQPLkH0z376WYJKOV5f7dLcNAexGA/1Bab9wQ= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:05:21 +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.4331.021; Wed, 14 Jul 2021 02:05:21 +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 v16 08/12] spi: imx: remove ERR009165 workaround on i.mx6ul Date: Wed, 14 Jul 2021 18:20:48 +0800 Message-Id: <1626258052-22198-9-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:05:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f268010e-815c-433e-f1ec-08d9466bd5f5 X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: dzZJUg9QdLeTdnS/6UHBgGcHnDT3nDIh55c/u3PKTZtYr7zEPm0Mb38YrgD7kupmX9Au18vyf851MyJKKoai5lxEvUrVma74jEO1isZbcrQgQdYdfLO4czp2jGNdrrFQSXlb8G143DqJ32E50VH0fwXu1MkZSdIXL9JgweadEYRSCZI5BFj280bzJMJ17RvWznuvw1EKT+msmgsMk2tyn2FR3s7/AfEs8hYwfUicfrCyIFZXrK1kOakAtynp9d0PI6iTX7UNdRjrfRRLlVPKT1xXwS8hcVzSR8S1mDz4v2JCkre9bpHfOyjsSdoGLhNGIbP9Yb79nrx5SHJB9p/+hTbeInYuCJCQzx1DN5YHHJmiJR7Q3OvSqBV6BpBv3rX+wUDbOQw7+GCMWmpY36eW4vS94C03js+g67UCzx5PkaVZLln8qR6BxQSXlAtEfvnElcQoAbDhdVpmOB7zmz+NE6CXzd1Vo/MSQOsaWRWFLwr3iRtrFDSlmvj74sFifOZFFEGWn2vPrxPRaa7xqidqelg77s1fOFCJF8lBpm5NNDWDVie8O7emeLrEWsd6vW39Yl/h9yR9q5HB2DC23QFL7OolpaSPyeb6lMaOAmXnArbEXXZo1aTkhS0Caj+cmCZSMLyBn1FE/PYd1nvxYoeP4Eut5AHGQCW6MJwOuYxSi/fcrDmkxg9SlbpMtQFsIA5J1anD2wSuk5dIs2dP0Vke7zK+/L+UJsg6xycAdWpm0h2x4PymclpAPefUgdcgBqneVKB94Cx6ghRP0PrFVjOJKbq/3u/jgB2xF4dQKJU75SbdfNynzvLbHn2reOLgYWegWTIHpffqYcu8+xGBfFmoA+dBYybGPK9b+A7bmiLhMJg= 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(83380400001)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(966005)(316002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wb1vvwuafwAosLJyats2lG47udmb1v0T0NAJoExsp8I48HO0g/DtaZfsURH7EY+KwQmgNsiGFgs0H05Eoe7JYDA6W4YmOZgFA4rebE8Rry5Oa/ImHPK5RENaYU9F8e4P0BgL0Cv5BJs5FNDjKBAV/N+Eu2Yq6TU7UywjBEasVn27LlzB4FPavRhay6YfcZ+LNM/dk2uejd7PF0d6T84ryU4Yg/yrAVB6/ynPSV6DBmWyCIPtnIjY+5aow0r8qa8XQgW6/Lcn7mKd3kHsEt+n4WVRMxwXpOHIiKZoJKooD17v9gLYf9Gdk/OmX7IVDOmG6ov+wSjG9PujibbRb0gSw6qlYWXNNnJfReEHlYw6KLbg/WkzvPALAOeUPoKFg4GUWZIa97Afw8EosQsbWAhb6IPBX/fDtiC4zW4HK+o6JlZeGpjmwh9GmNL0ZTmUEWk3wTlnLW/9C6ArbY6Tyr/PSkklPewdsTM/jhxZlEiRYltPzBfbSv88dRjoVF7RvN6BMFW6IimYmGnW1myKRcSgwcSK9+NVnDlUl3VxuGC2iwQZ6TUgAFhmJ7zUH62sebnx82wnOKt4g30wHFcsFn5k5wbjCpWsCx2olxGi0rUfn7omCCxlOhg/P6y4X4b9nuxDbeFtGjMkdyIWkulm6SZsoe9ATAO/YJeG3dxH18IhbtUo6OSwOlBDy1LMcmn1Tm8uDtEsmM4Q+P0IYVdPxvXgHTTMTIPkb3lwrBxWtSiY6WgS8PMneAXbHJm3qqcg9mTDMxj9CeW+5cYa/X25v+yvSJ/RtrjeXNgrBKUbu9UXTAUCkqXIpOSgs8Fj/KDz90YDuArCxQtprbZ6KLXHkHyCdGcIOF1MvkdmCa81kO9bjjO2jB1LO8SppGoIPkRfBmji4gg0XI/b9QQQ5mwugioYoapdCtffLr2zAAU4+8R4PkWxEX3wV3VFU2B7vwVunWObUfh0PMj3wCn8yUB4y4oEwGYtSqWBaD8Z5hTZUxJkueYFZjLMohc8pP8DSss04VbZWG8oDMMg/BtbVyPYLnAV3Bi0GRfrYgFj0nUKiR9xOQ5JaEOsyQTB2ZkuEOAaPK9qy1IDDDDj2Rbc60Pt40l+T1gyc4eZ6pAU4BOcjUc8KO21ARRaoA+I368vwROlICbGhthGywA1mC3sxc5WsycToSAPJZR6y/g5cBuoYRVnmQ0Ek3pbNY4556UHVQpIZ1mvnLXzGBlZ3nDTCyXnoiuABtYnNf2Xc+GTujmghRKfcB7Mkv03Z8zaFcY9jjoxfVWI2HE2DAsVgGLLQHP721DXsyrPiyseNI4dYtJrcWGUxRCVfjGapSm9QJBOkGPEUdSW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f268010e-815c-433e-f1ec-08d9466bd5f5 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:05:21.7044 (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: gsBY58sXCXrNL9KLyfErznL9IKX9Tqw4DWjrclGDHojR1zb8dZB0vUCSAfGGIKbrAhWqJ0wbloBqRoJxG/ppUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190524_022722_E1EB81A5 X-CRM114-Status: GOOD ( 17.07 ) 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 Reviewed-by: Lucas Stach Acked-by: Mark Brown --- 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 Wed Jul 14 10:20: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: 12375599 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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61408C07E95 for ; Wed, 14 Jul 2021 02:12:12 +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 2FC16611AB for ; Wed, 14 Jul 2021 02:12:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FC16611AB 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=mUtsfWJNNDoWq50CBo9Ei5dvAZLyQ1ut+Y6MK1f/rIc=; b=KYwQrivjhrES5E 1gaTPoCfv8P7GmG4Y1akhXAOGgtQyimbhbF9JVxdWBuHvzJ+S/86GFyDjJRif3AfyDOMQPm91qA7w ZT0tDgt1kcbJwEwcMRhYvJqmOOqG8safRAeiT49l5K1WGzAQIWYJyEUFV3Y910euUzGZJl0sLPAoM jZUonJxu5rJOiSqzGPPnQ/2CVikRBLppwNRhozzRaa6hsv3Tloydu3T7FOuvARt4H9eemVq2cR1w9 CQDFEtLq/q3wa7Tqt+3azxRsPayuCr59wfjp1eiUBZ0N2QXtgLitMcplZj/I/qipPEJfvav17BvVr lHU1qVPLcYDIq9N1TR9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3ULF-00Bulv-8f; Wed, 14 Jul 2021 02:09:42 +0000 Received: from mail-eopbgr60080.outbound.protection.outlook.com ([40.107.6.80] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UHE-00BtOF-DH for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:05:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I6eMyITtqrZZ/mkCxiyxluxRcVauHHTdY9ZxohhbrvfhBcYi3FwOjrUSEpLmvm/8GVyHmBCZVmYXeS1mfXL4ckp59A4et3M2R26RK+k4Us4LxJMtvuJTESEiWuEgR6tOE6lSaqoHNvET46RVqmHV157Jq8OKJTPtUhKJXKofKJkVRWgqIQG1DhWsyItdow53MWqTpQjJfzPcBsP0any1SP6P2MkZsbuuB0OXZBzdvbGOXPaiReULX7YivvFBxVNHKbs6TBmAu/l6DJtmezfiSl8+w25knXiN2pwy9SlQUg0FjX/aTbimygBmUpNeBV/sIAGcQblqOvrPz7whuHsY5g== 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=xb+X7X4L/mtWzVycwsA3YmjE5CNp5DwSoUVSouktETg=; b=bsmeZN5ONzswG54pSdkDpOSXVhvTYF5wUvFUP6BFNnS+rV/TvpeaDyF/n63DZAk1P1fq8qfMwIDhFGgYme4znLPmIvYijfhH1f78SsB/E8pt3ly3Vl2fI6O3f8NAPH9b19Els0A8qjrQeLfBZnHBATDjn6QpDUHqVFsYsEqAWzCwIdhc8rRKXjINThepZL3tpXQ95pSAYJelUr1QayQPQNKa9p+Gd4AbGJcm/GhNSbRnR2weelXfI3+FKVniyvvcw6PTQqz4U3kNIiLsSkI7OuN8SXjrmqu/Hh7sNi2jKthmxCdcbnEDZ9qBIjyq0n4LyDHVjJ+3c5LeWYiij0ab5g== 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=xb+X7X4L/mtWzVycwsA3YmjE5CNp5DwSoUVSouktETg=; b=eaANw/wAGNsgNAYJxRqJeRiJD4lonTmXQsCzKxtDnbXUt/kuspUeC/kV8ox9FMKRllLAmQPnzHjAVwJoJ55MDh0J4TRRyKEYsalxxtqjbAjC0NM2QuFNX4nTCPtC8NJT/Cmh1YSG/LFvGI2Mv4vzQck+SCrhAVcoF2Gaw6u0/q0= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:05:28 +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.4331.021; Wed, 14 Jul 2021 02:05:28 +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 v16 09/12] dmaengine: imx-sdma: remove ERR009165 on i.mx6ul Date: Wed, 14 Jul 2021 18:20:49 +0800 Message-Id: <1626258052-22198-10-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:05:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 031e0ccf-8fa3-4283-a1f9-08d9466bd9fb X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: IzasPzVL4g1InZcWNeAbWEbtq1JvQuXdr7Er4tTBeKNH70bCw1wkQW4Fs5sEbQYuiGsZ8jzJKWJ39oeBOUAglfUvBO4fGSP8VW2GktiaesqEW5/ZnSAU5J3P4PvOzZZxEN3JmNOUXRZI0q9l5Ian0KnGVrl8iHGGjZO22EdB6nTykquiohGElkSVSuOhV4v7x886lex6eS18LKNMd1vem7s+iQI5ca7/fbZ591eHl3QbiaG443zVL6FVLut0FHwqDDWRJfVvMaW689e593SWvZE8saiEnINeiuaJaNqHg9dw+0x0cdxlCX4IYP2TvPeQ8ogrC3gyv2w4nBujuosIiRvpk35Q5LApcr1De93wOM9ht2ZhQY6YOnbXcrz6cuo3fn8JejR/wagdNydT8kn12DF7zJoeVdx+c81AA7ORitKODwXyQmzHHHRrO/nxzc5CjqmIWg2qVrS7fWpPPEJPovTY7PRydD+feo/OhmPLIIZQGCOXLHPU1j5Xe8ecvhOpC5ZPHZ3wWh2GRcySpZJLl6+3vDDrgftUnqELWqV3xak/TMmuaB2D4gG3j0yDVvy8SVkM1AqmW5VXl2mGhPDuiPpeylFBPizS519hxjc3OCD5pgLc56ZlspqHPSOcgOti8zNIe8kf+3YrUdkddTiFEy3Wf8uUfonMT506CzSaTXSHxqK+VQxOEZX8wx7DRdP4E6rjLfAhMWPWAwY0uczTyQ05/Ucdwr7k+xKC4DVDU2BTyt1h7J0Fgimc+BL8oiJDXIcwKXJNAzJgLS4Rr/sS/xji9ioGWR1LS4VZqQW/baJmfAVADHm6gyb/GWKmeHBn 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(83380400001)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(966005)(316002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wvnZlvVK5bIYz8XqHDFwt/IjGt/+azjIquuknQHs2Okpk6UsnZ+k/i/sLQ+WAJiSzFdW7lNHKHlpfKvxLGFtSZ1o8+NtJb64knoLFpqjjgJk4jDFgikAd3/u2uSafgGeUi3qhiSvgFsMiGm9WzZAXS4MbdY16zHJfD4TdM1WL0y9Zic8rFNH+/zG58C+nJUrAsQHG+D1JD9IMQo4YPwGqGqkF5ykefSJKqCX5WKd4OjcKBs0esMtCj4JuvdbbkG3V6YUBAgQyBPDcZkA7XFadbsN7P1v9V8iYwvUV4t8Mb8ukfMwGqYEMEEyoLK6tIL1xnS38ZHmzhVieAK9B3ii9dhs05UYvJHkAWedG/4gNCpbRdvk845CQdvD0BOBVO2Y9Hgvy4t9U0AyYjgbslHsAjtdNWXngGkV+VG+npVYRV56njHKOcE4JHA0qzb1/q7hk1+gEGGth55OXgDLknbjaU5DoQkuuqel/KGJkin3CGy5nAL+0rbarAgQeFvhVNchOVT4GyfKUjYN6PLNKxyhVOKhF8OdWZ7+aTV3aIQXErZFYvb6wtBVdgdc6uwwy6pRuii30Gwk5OFF13pXxr+zgQIZov2gKbdGVy4OQNIWi74/vmRDHRvJcI/KkxqCeb6aE1Hg5Xoa6eZ3hFk3qD3wuj3z9NEV3APv6AN0ns/EL8i3Bstr5gnYuhQFiq9frYAizL6r8/C/C3kTqHTWHVC4zxHA3T6HvSkOOC7qAzVYRymq98/f4fdikLULk/Tr0epfTn3MKQ4/3FWnthn9iwP4SeyM8Fgd/us+0SdaUbcgNmpQ+/lVq6Aqvd42fVWY/gromRumyAqKbVzhZ24RXRcliRn/Q4M4ViEKVsxL8ABSOCQ7OnaL3lQHDxNbdO0vBMqy+r9ZFLp4BDeo2Sq8IbGNjTgEqbAfNns9lrZN73+pTg7h580jS4jR23HEYE+HEOXQgaauPltnbPV0eP2CR4Mg7Dp/QN7BHy3JsTf2MT0s1HZtCL3eUdMM1gFaIDjrcn9ONWcNW3qJthfFdqQcX4z1xEDssEaiO+cxFfmkFIB9TBmXqHTxqtR3bjyU+fJ/xtDR0Oac2DuXAP3ZaPv2HtVi81dxhHhjOdifVtPmmM2bwkmIPaG6kPG7t6RIM/NOSkNF9ETHOixdddwoTP7FKzqvTupZ7IlUsrxbTJGcWdnk1ngNfz1uHYI5mn5xDr8prclOqUs6vmVWleu48x2ilBeXAEB6Ci9+RRnszlVeF6w2BFzNDapQjv2oxb/DuD695x/dSRi1EyDRsbmyRheKtuYxrzOjMBwkzqLL84vLMeUNy7MANlqfd/XHkEblKs0cmd1A X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 031e0ccf-8fa3-4283-a1f9-08d9466bd9fb X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:05:28.4796 (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: wlO2mHe3dlA6jzoJPf4+MDn9H0F71wuJHXuiEqvI3Ms4xdpIaDwvPt3Vdw99AIYYG601oiHdbflrd28vSOoZHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190532_534370_26969518 X-CRM114-Status: GOOD ( 15.50 ) 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 Reviewed-by: Lucas Stach --- drivers/dma/imx-sdma.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 5969df8..cfcd413 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 */ } }; @@ -948,8 +963,15 @@ 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; + } 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 Wed Jul 14 10:20:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12375601 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E448DC07E95 for ; Wed, 14 Jul 2021 02:13:23 +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 A3A5361361 for ; Wed, 14 Jul 2021 02:13:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3A5361361 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=XoX+wMn6ZicBUY SETyi4DT/UncZnsjQBYlX4WmEgdt1wmiVbggLXoHitaxR0wsDfQIdqinfD8ZlcV2aXUWxA87Xnr2C KJrhFXhwrdOhLW3v+Qfp79/oWdNAjf+ahc5QJEFzuBCth12YYk0+OyJ/6U4fMI5ShiICHUv9/i2zp //tLL7Y0mNMvEnXoG5pub4hMmG8V+mrvVUgO730mk1UnkucsYv6qh5drLnGHgEXKzK4SVkecYbThL DUe0eg9t23mhqfio645sDei/4QjuSYgKyElFVonjqFCNLm2XLv7TZYIyEwtI0D0dDgkwbfZLjjpv1 iMAaDJd3rX0pAtb00RMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UMG-00Bv5F-1W; Wed, 14 Jul 2021 02:10:45 +0000 Received: from mail-eopbgr60052.outbound.protection.outlook.com ([40.107.6.52] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UHJ-00BtQM-Vn for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:05:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m1Y1alP8u7lw7CE8hMFhjXAc5b6nZ8gSty8mBeaVo3w4Opu463XBrQecqCLxgsLBqsqnHrU5YoyPrPxpWRHKKeESOG6ORs3HEvUDbTsUibQOrKjii3ik5DeuzbUdpVMu0jw5W0tl9MP8ZAlsdJn4cShrSYlXP4mnKo8sRyyqerbbhrl747dADC9MR775aHkxkBHcgZ/tIlJBg/BXPyTO8xEF8H5n+0oYFOzLfhYGNSK5Xz4D9KJUQcQ07hUSz8KPUwaJS0P3S6xMNA85Qc0/omxigQG7aoztMXH3C+Umxc/uKvQUhK3Ufl45lWlK1xU0XRkOcJ9LpNqFcUV2KhsAcg== 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=GZnwcZQRBZSnxkqfttz6hjAnW/9fPkvAVKCN007qupy8eAN6kVSiqlsH+CI1kw818a2fjQi4HETrpYrNTCoNhxtGxffstfmEPSSJ96js2Nj8R+zOmJw046evYAiUhHesuCPgyErKrZVMYID0lCOFzc4XWBJLt+3UtvOpmvJOQkUZ+u6rvJuoP6vLL0h/qeG3vZEEQ1VuR7uswnqe74TqlULFoXYHztY4oF5wqGnqdvl6946PdnuTV5Y3lM4FYvGCHzJEjEtbFkt3MYMCfFNF5evRTC2yEHeVlFI4xwpqYEpVNLMTTik8Kmj8O4iP3umEh82azrQ3oL+rsappvyuxuw== 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=c5GJNGuJhm9Fp1laxHoTi6MpFqKdxhsUZfV0iq/bD76A1MDvP6x13P8wH0+2xuQAq5qWcAlGhZyNOJX0dJnyyO0a6dR7QflMdmMRPEoO/6F3lcZMFfYtVUzLEvhkkHc8gBJULSNyQnSt7+zSW2bfJWF3I1riYPOX7NRk3joh7VA= 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 VI1PR04MB4175.eurprd04.prod.outlook.com (2603:10a6:803:40::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:05:35 +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.4331.021; Wed, 14 Jul 2021 02:05:35 +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 v16 10/12] dma: imx-sdma: add i.mx6ul compatible name Date: Wed, 14 Jul 2021 18:20:50 +0800 Message-Id: <1626258052-22198-11-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:05:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6a6d183e-0698-48b4-aba2-08d9466bde16 X-MS-TrafficTypeDiagnostic: VI1PR04MB4175: 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: G0k/axdldK3Cjby3OQ0t8+EgXopMYKRA10rKe17p1aUZo2pvhvH5tSVabBEAauBwI7INFDtECN3b2OTyPzD9nLJzAvGVv7gGdt/Xj8pkfLkQtYFACA/2P1OTjSqgbqaAJej8GJrlx8BpG5NmIrtEvy2WWTRtK3FbPTozAaV+T3Fx+rcqCkCcEtLPrDbB7dlHEMIrTpedZVCaWDw8UGSCi0Ni/UeNqsMnhQpkYwxIWOlAXpgM9Qb7oXp7B0Has4YVjxrcyiMZ04ubdTed88B8v6xXfp0u4eYy09fc6MNTeMjFQoz75ouOdXozC7uan8qF5AZj7K5XRl0S9hvl5oZ+OzzPklzPawj923QwfUMOfdKqosRcywG2nDvNrHzXXTr+No64RqHSax6j4ubF+oM6qJ+AxJL/hGEZxCcx81KO0tin6eHiHwxZK0BCQ5aAYxjdPS6UjrKBK04JLZ0AXbZhlWGL839iZMGDtHPpkK/VZ1WcqaI+DvITgsMBIApx5ehNjn3DW7DqaBUem17eb2ivyT5lAAS8/e7dVjssWQ1xPZg9Lfk+nAELGYuxQ1CBVlDvg838stvookj+bcPtddd4vxkGvautcg0w9ZiIOm0VHa/We0Uzrxh+mmzEnu/S+4Z06abpNuhcELPpJ5AHP/lXWIl2A14TE1SLi2ZT5oIo8ERUnrS9jK3idEpuSehCfjP607eArexEYrHQ/DOIv4gmvOwHNR8n24oa6q9azutgd2g= 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)(396003)(136003)(39860400002)(376002)(346002)(8936002)(7416002)(6512007)(2906002)(921005)(6636002)(6666004)(6506007)(86362001)(26005)(36756003)(4326008)(66476007)(478600001)(66556008)(956004)(52116002)(6486002)(8676002)(38350700002)(38100700002)(186003)(5660300002)(2616005)(316002)(66946007)(4744005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QyoZf19gdLDYraHDNA2HIuncYMSWzE/FG/R06BIM0+Lewp8frLua4RvAw/DnosWk/x5nw2xV7qgYmu5Bhjr3QxYt2Au1c2Z3YIUtWNtp2r0ZusTcmxal1rs0L7Va55j1c5xymjAXqcFKxwrm/6yW+yZsjQ7Zf+dAvTgfT4EvxId68fAkfhUPK1Tp/yQA9QXj/6+Rq4xPPkCYNlTkDY1ZXwxdL0u4WC6YRIwh9Zr19hh5GjBZH45j+9xdldm6UFTTIzDKz+WsaVhg87/Nbd5mWlKgJscL1jtu2+4IxB55KRe1dQaey3WC4LMvuBhnr9TJBdgFkUQRSFioGq1chnWNgQFRAXUjr7cDwbmtyXG+Yv5Jts30+fM331OQNkdmN/nVw1lyUnkqecUg1TFOji42jGc4oND/bpNN4YUy1XBLUjbaxMJYWNP2SEWzYn4o5/9QimvTFcmgNiSE6Gca3mWgkG0VO1vStzg6EAEgOq9b+jWZn7I58mQlhZ8i5x1ApyW4OX/q8UBSUx2eTKTTWwZos92Gnb06M0HADf6RZAQPLOzdVbsVd6hYborunNUk2GJ352GA9OwDGIol8Qpc1cj5c0P1Zmj817bXmyFIboXqtWuQBgch6u264o38n76/TBSiOT3YnEFa6ddM9PMMGbhc0jJSG5aRNCSTCBK+PChp2bcH0Y01G0fssNMrUiZd0DIZ4KVyn/G1Q99NXv790FRRcO1z9ahFUwzw1osk7ZZM7AbMhTfqHVcL3md1FsVNDm/+Fm9JbH1Q0gR/ioOV8plaAMLHtrR6jLboM+Q/qCQyI5LNab2Dge4F809sv3fLxE/YAoS4npCaR3t4aL0twetTLRAvVslPXBRzqMwOmlv6wnpvG2HVkVlN4n3y5LxfUfbSBgMgb+Qy8U0rgt0NV3hec06nKIuBDjmUaKCUK75RrLUBQfvMHKfYmgzHArWrq9WAGVqZYo6x2j3HCJdkVPyoX6LgnvKbtu9tsC8RpccT01Fl9Jylj4Ws+89EWVqvbQrWnG0EX9XzptaWN1c1komrKFQdHSpFWg0kIhiqfg1TJxPYZ5TOCo+f9DMzm7Ma5zx6u7rT6rwKBPGr8a84zj91yIqyVJWNLsgHNMU8gc7hDauuff1QIyc7/tMuJS62lY7qFBAExsjcTX3LmXbtD0OBfpjCOzsm62LTorUx86Bfn0gBqHnLbTxlADpu1Ju17Pqrv74tsmvDNhDo1gXULhtmrwkxZntibflRSUZnMeuS2qnC9s1tQa3etsnk0h2x6/kYdn/Wj36H9T4mQN9+855mAqhAgXdKw5zsZbL2UJqD590pLlqqW8d0noNNkBnNv6B+ X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a6d183e-0698-48b4-aba2-08d9466bde16 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:05:35.5006 (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: ySJWx5dZeFD5GQqS1gyU71euIubsian3+pIpUIT1x2NSurA1u4IFNuLfJ5us03aX0SdhPa4OJRDCjPH2M6Z5Vg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4175 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190538_096274_410D3139 X-CRM114-Status: UNSURE ( 8.35 ) 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 Wed Jul 14 10:20:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12375603 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,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC111C07E95 for ; Wed, 14 Jul 2021 02:14:29 +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 97FFD611AB for ; Wed, 14 Jul 2021 02:14:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97FFD611AB 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=VffwodIi+k1R++CdYOe6gXO47LiFJcKnUbZocwtaBxc=; b=yuud5s89eNUq4n jIEufCAD9NA4LKOgNsKDyJEDPZZ/1kdMv41GIce8I023dh1k2YdfvuMmHTuuXu5rJOLh/vobX1RVF jifNDtMhz5hv8cDOxzsdOU17m+IR7KftMpWxjApAqB0gl/rOaOboYXy6JwymvcA01owH+X/Azzl/S baQJUOXniqdoSD+k9G9IJiFx0BFt31u4n7SuBoJNaU9H2frNNSlaNlmfEqGwN9D19TX6qAIBIT4bi TC6RaYVceukdr/p59mgb1mZPfwEGGhNoM1V7DjsnX+Sl4+6U6Kun8KCxZr0YjdZN/Ng6TbzuXNciN hc/fDJIOQRRGHpVdmOEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UNA-00BvMj-VC; Wed, 14 Jul 2021 02:11:42 +0000 Received: from mail-eopbgr60085.outbound.protection.outlook.com ([40.107.6.85] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UHS-00BtTC-FW for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:05:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QbMNSAcNuZ89WCQEHLFONRDFPipf0ciwLzetiAjjUjZd3kgwWHKFk3KND9CXIh3G8LLweRR5gMC0ET9/NiVN2uk/meZ7OSZZKqfTIinb+MHQILlfU3BlbBx4bc3AkYSSFbEeH4fSi90fEUti+/YRwLl9gcrITMpW+qEAH7MubVOH9CwKfa+ngO6fuwi5DvhHvkrHarK1ccQc2iAuh1jy4xn2/PRSyNSjicLgV4uNesEzFzfBtWNSy4UlW1c01l7d8ufF7GSDP5bmiO5NRVJlyY0BQsYWSTvz475K8xLNIAHF44JcXqz0sF5ClT6dITwHOdEDLWqeKrUgAksugIYxCQ== 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=eivtqmCh/6qtoM7vlA+AvrjcmQeA2UWkk6iZBtAnm+8=; b=InQO5icx+/gl9tGfSeKEHD4Z1L3/bJoqSkxpQ/T6yK9BUjLC12dFGTbw46rzU/do++/yIjw/RfQuj2rtghzhg8QfMuJerz3zpjZuk8SlbJwo5qwZkp33nbFzq7udcwLzdXhlxyKH5NB4qBAk0cxDNVe5+Q2Qv2fTAggCA/E4Dkf3txjSGAoV9BIXnbJ89rBgaq3J9a5CSWiSM0TvyINzeyb5wp0R4RVwkPmKYiqnXsxiny4VxnT0gcjo/XEpHAyDB6GqtEmkxzPcfAn5kqJN+8h4P73anfYn1qLcfulb7QtJeg6g+n5H7P6Nx+ga0Qi4nkqbnTI56j54N54BTsNUUQ== 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=eivtqmCh/6qtoM7vlA+AvrjcmQeA2UWkk6iZBtAnm+8=; b=DX+8QaXMwc4gf9AVvEPBQ74cxVzaMjE+T1nZcw91bli8XX69H9qzGiJqxANLZ2dWU1LLsiahNivcsMJT59FfLh57SQpN7MfNYEgYQZlki1h7SndtIQbDcKGfny+f6P9cyyvFKTSxl9ImpRKHyN21pqwwn7bM9wZfv6sKwxR1DgM= 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 VI1PR04MB5773.eurprd04.prod.outlook.com (2603:10a6:803:e6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:05:42 +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.4331.021; Wed, 14 Jul 2021 02:05:42 +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 v16 11/12] dmaengine: imx-sdma: add uart rom script Date: Wed, 14 Jul 2021 18:20:51 +0800 Message-Id: <1626258052-22198-12-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:05:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 78775705-c336-4c08-7c56-08d9466be239 X-MS-TrafficTypeDiagnostic: VI1PR04MB5773: 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: t+8+YJfnNq9Hh1m/QxjgnkIgtKhyVeek1pzBNT4wU9L1VW/k7rh4EFuGTbZzQ/+1uU5jTr+9ke26neLQXA/+C/gTJa19c6VbYHEhhABjz2xvxKAirO5CYvzBHVxUNoGlWVSB2QbQxS+iUdQu01cCzOu/7zuPCmHtLPAvpyr154nlOlPCW1ciMEeQPb4kYiv0slixrqNQojvQuUIE1nhj5hKjxIA4679REcI0P87sARcpLDfttaTILC5pQSsKbqXIj+xUXqtaPYubk5kesz+kGFKtatB1RNIGZP41fnBDuc5se86pTRJBHGoxY5bOxRi4Q5pw7UZFTxuCCTz5dzewjyGAk2KPHXIT0ET+aoRvbBlMv6VbXjMKAaDAdBPccJGtaJy3+dEgIkXnRhIG7FeVoLc+DURQxoT1BmeOCUbuQGy002njym0j5VTf6syaAoLjNLDJOfk/kZ+b92rR42tIx3pqQR/AbDZuVoelDbs25KHG/izoQ/VN1M84Eirl1L4RJcWmgxKJeAI6KVq4OCZmxwTf1btQd54UeS6lNK4shlkmoMbX+QRumfnitC4tfulkiJXXvTitO1Sx5RWdQrfT7gjjieJ/NIteiECzJ6khPz4J3epj2ZMY4eO57C3d9voRn2Heqp5qRff7RoKxqM4QJpF5EZAichHat7zmYV8GMOe00Kl32JiiyxWkzbDEsIDLfUVKxMIpYQ4ezg/fvqCuNlpPuGAxB7kSdshqdOChAsbHlfEv15yUaTqeWfw0fDVRd03mF7O3QIpiBpX7vOnUmixuCMbBi7Eqib4uL8U1+T55i3VxSNwPgTQ6764wXHBx 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)(376002)(39860400002)(366004)(396003)(346002)(7416002)(2906002)(316002)(6636002)(921005)(6666004)(83380400001)(38100700002)(186003)(6506007)(52116002)(26005)(4326008)(8676002)(478600001)(66556008)(2616005)(956004)(66476007)(36756003)(86362001)(66946007)(8936002)(5660300002)(38350700002)(966005)(6512007)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uATJW4JLqLrCVqgi+7+bdwJme5YS8SUlFr+F+NFwoxlgLAbePtsBwUEtikC+CAcksZw9WJ2bJQ363y3NGW1x/Qi1ZQ05Bk2QRJAIAIMtFQS2LqKk5OPV+CVKjDFLoE42vHHp8LD5bVIZfKgn53ivJEq3rbaWw1K+ZmmymagZT6SJti3h27FMYsdVBWMv3oAK8DrMgmiiE+B0i/VntX9tbvmKR9OoRoYxNRKlqbKLCYSmGOh4M9ae0FMgjI+TlcYPEoxYUtdwETrJSaPsZtV5KFBbZ3tHxfmxcATzCOWD11WBpt4N3UWsXuA5i+JoknMvJD5arzxLxvXmh7Bd6pPLBaj7c1oDR/djo4cUMvLhNBvoutDOsp+iVRBAUaAFfsVBtAdYzAEijbKp8XKYY2Ch7A0/xLSeulPhG1T3T9wRF9tn6jijWBmZZkpMVcfuxLYkmsrM4z9u7uYovR6jgerg0Utq1as4voIUVnnQ81sESPY2qe/1xTtYHjg8QnG/8BolQApLlpYB1aWne3ldIzYFMfQqPANBAXyjTMBv+PSK7aAI7gWuLecLO0g3NO9LyiYbMwGN76hq/WnwGexjSXsK1OzFT/2aIr7DsnoFbuyk/IFuhjCFKhH1/LUxOPJfJVtZ1dPiktlP5zjeT8aD7z1364UhHwyPxpY3IqLQiamksmC3nAcjEP4JrllFzDOAU9Ej7lyuoSHLliBqHFE7q/Z5kAWUIJu/L5HBwfYVPW1C8CS3p/QM5tL4hqm2THRPoFpakE8qagtOi7tAreMdgUj41WQ4YR5XMwaQfQRwYxvUxkcu+Dzarx0HlkTGWxnOOuFlVbIyz/z30nQMJcdV9iYuCW/AOSx+LDzs2Ub1oE8efunAklQW1ze3WzhpnEeJPOGPHxzOzr/aOTfWlDTqQJ2o45ewJUGvcVqfiOYRGua2AT9MfyIAjC+d4/k6epMp9PmWMhZgaEVwG/Nwd08GiGyvxx3xZHbh7qL5SEN9sjt4DXNF2XSPrrHNJ9TyfH96VumPDkpwLi+sqoEbMzh5LePQst+1VHQK0UcCrATD8zu1l5df9ty4rePnE2gvwsV46Pq6cHRwJrD6WgJAoKWyPXuL6znVfJjmOzrodT575ulCwQOOWFSYcq1FOmeeZENNTA+3DgWsIOxWkeIwLilSEPsRB1S0QRC7SzwfME4FAsttHhJJiqxp7TVpz9WWQI8JeWYvZ3SECLiOLw315X3EinxF2MdNP1Oxg1DfLLDf3uTj5DMu9MKGYLjq1gpRzhGeMIxyuvH5Rpi3AIOzmGiAxfV55TvPLZHMGX4RzfxkHmz3mhMFa/IpdeyuI2tx81KonSnM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78775705-c336-4c08-7c56-08d9466be239 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:05:42.4496 (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: G9n/RfTeNXxJV/2vC5d1qxq4XPhQPaDhRkcVc4nWdarNb+zuWhTW7fBvuE68Wa6HJIuSSPPBOh2XE52GDDiFBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5773 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190546_577149_F3AA1D1F X-CRM114-Status: GOOD ( 16.12 ) 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 cfcd413..9ec1edf 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 */ @@ -1747,8 +1751,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) @@ -1772,6 +1776,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 Wed Jul 14 10:20:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 12375605 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,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB791C07E95 for ; Wed, 14 Jul 2021 02:15: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 997B861374 for ; Wed, 14 Jul 2021 02:15:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 997B861374 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=7CsQaOFqofTGYQGbYKWqurLF6Uafgs6WobQB4imj8xc=; b=NFqGl86KZJc3nK bSDxLUz5z7XBDzQ7AY5OGuT55g6qkvPBwZZ+27Od9R9Y3H/T1kLgTNcZT0oi1QJWu8O8VUa0ktP2J hd6VEYsuXWwr1JLMLXvUIRf/YyaaDbXHGFd7UvwX0XYi7XJZ7MRgXLIX2OK43rIdY0+KHc19TxieD av1EeDah+jJHr8fdKDFmWFSlRXiXoHXtuHzWTXMKSrPUgbvQhNz5gYiX5+ftim2CaRLOb/l49A2V1 bDWPh27D6pehIavtOKyPJ9f90oQLGw4JsIiBjv7W+QLXXNq25/bS3pKC/hlc9YJQNg19f5/IMZ/NE hjA0GIMNo+pwyoQ2CpjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UOQ-00Bvg5-F2; Wed, 14 Jul 2021 02:12:59 +0000 Received: from mail-eopbgr60074.outbound.protection.outlook.com ([40.107.6.74] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3UHa-00BtVn-CN for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 02:05:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=di1p67DxNIgNxv5Bx3wHS2VESHUicbhC9njb72ZTHG1HP6XlTRMRgWKqILluPLdg4Idieq0Pc9yqZkLwoEEidBApEPZLLtaC0FhBjeiwMXGRtX7fWVFJgeBpczv0/SIKoMsJjZn+U0036gQNiv9XaqZriOuNDKdYbin9gE4+Wa6SLUNNuNi3Xs7fDnV1nAg+4j0N/Ry/mU90K//OPZYLU0SmgO8qMfStcqOQ0Hun1XnGxz43ROhiFi8SFgb1tCYFoDntKq9+IXAt6UyWCRE2ZtmwaF0bdISeHWsTSqfqXk8K+W3IahXBO+V2S8/8CnBElIdoQI1JdK8KZXQ915walw== 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=Tijq09AUBuAAT+hQVwjjuto6CEluVVVcs2l0lwoJQPs=; b=f3gXlNQi2hB1JfedqUa/FF6067JmkidK83RBSob6X7qJBs/FTxBPc8wkeBzT8Jy/l14jwXrL4ONkd+qtHz5S4C7tv/EvV4k4/fJnok78R4ANa5rxavt2BJoV/CzFi9Oa0X833hbv0eXYCzbwjDIkX9CbSmRh50fKttJYX9MI1BQtKpBJPV7Tu6SRVJt3u0eX8sgSxvCOCAem5jdMRxs5oU0oZb712/c8PiXh9VUaPVOAHu1kXU6+o5zUHXIWOfcswZuLbmaYb7vaqLb8Px59dx1xSKbZLHNS7UFygiyCKgPSJfSZCPsIC4You3ZeI1bgqI7RhtbzwZJR5kPe+YbD1g== 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=Tijq09AUBuAAT+hQVwjjuto6CEluVVVcs2l0lwoJQPs=; b=BHxpO9hqQme2SyA52iaWJYhb7QoaI2Q9esNh0MCe/vjkGG6S4wBSR8MyX2nON7nQXoSn8bvCl6KGqL7L/X1tXyKSZAjidP8g7YLLMBHKPN5LNuOuzp8XrVhZ17WMHWdJ4loSYdefqNjQbw0lVMOG61eouMKfPFCCtoUHr340FBU= 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 VI1PR04MB5773.eurprd04.prod.outlook.com (2603:10a6:803:e6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.22; Wed, 14 Jul 2021 02:05:50 +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.4331.021; Wed, 14 Jul 2021 02:05:49 +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 v16 12/12] dmaengine: imx-sdma: add terminated list for freed descriptor in worker Date: Wed, 14 Jul 2021 18:20:52 +0800 Message-Id: <1626258052-22198-13-git-send-email-yibin.gong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> References: <1626258052-22198-1-git-send-email-yibin.gong@nxp.com> X-ClientProxiedBy: SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) 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 SG2PR02CA0016.apcprd02.prod.outlook.com (2603:1096:3:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4331.21 via Frontend Transport; Wed, 14 Jul 2021 02:05:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9403ecbc-56b2-4029-d957-08d9466be6c3 X-MS-TrafficTypeDiagnostic: VI1PR04MB5773: 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: TTXjcM+JTcP4JQv2QFyBy2Fs2E2H53ypzvR4zFnEB2Bo97n+3Qk6WfNIqN37fKW9lRC91S0TD08H0k9MWDCDEWdWKPRbpgPgoegTVqlJMCJrvDtpRuyIKXM6e/ITjfgP0PfFVUt8A7sf+hfyJv0EJwKPcTwzkek8yXoNu04wCh6s1crNa7+RY6m1HwLaN147/CYQcw6YNlI3ksoJ+BqgK0882NATEt+kQAL1M92LCMMEuMWi+//NbCgZ4cgRomGLQ294dj29TvmzZ52dlAuj48Unq4/JN5TiE3p9pLi/rqQz39WX7n4V9XujsnsvAN69BYcyJU3IIBJgJbmMjUyeoM37eofrFz4yfqn/m0PUG3eaZx2W9Osgy+QmeGoW/uwkFntS3e3obubiMqjB76lvZOfq7W5iw+cDwrLzk99qkeknhFC4wCV8qag4+Wunqo+Vz/VZ/2fi3IWAVxtWX+EuHzjuUkx7J1QCg24RoQ4iGujrYw4PEI0s0NACYUDuTP+0sqZTNlbuerzM3mMgV/lbcDaUrSuqotn7KinybMkwbmbQ3f6vobpZ0dfkwkdM8qhgJRuTmtgwmy/G1U7dSGK+d7A1w7vB2/jOy5jfKZ0djT0taBXgMSpRlXb5Yjw3pBiClKcM5zO7geU7hhorHKiwVeVu5JZYB7ZY7HRIlnFjHMmD4xnd1zx+XW3lXXZHEK4SE8lDYilgYhhBI+FGrVygh05xNnTarSmpGscRQmDuW5L3mJJJe0Z3Lh1Zzlq53uyXcRPxEpbxfMLJ1BJXiQ24xiILfo4tnlCX+UyRsvT0z6iQKtTiHc/25Tbf5+NsJre3 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)(376002)(39860400002)(366004)(396003)(346002)(7416002)(2906002)(316002)(6636002)(921005)(6666004)(83380400001)(38100700002)(186003)(6506007)(52116002)(26005)(4326008)(8676002)(478600001)(66556008)(2616005)(956004)(66476007)(36756003)(86362001)(66946007)(8936002)(5660300002)(38350700002)(966005)(6512007)(6486002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1CZlzsHGrsr+SHpfj7b67mNBMDj4K/Em1qxKZDjOyiOQkJUlPpFwUXyJCRBxYIvVxH74HXb1BGWobM91ITxA3FI2GT34+kJEnewHm+O5/D9Q078Oa6tJJ8VNRL/AljR6+Cr1sl35Bdu3naZpTsBKPC2ervikY+L2Rv7WirQL18aC4KWimE11kYJmvXOELb8Nb4ZHNV0ZuuyF/FDL3YazaojGjQz/XeNPP400MGjVcyU/GmMtiEiMbPyohPJsb6hMK+y7W3VM0ZW9yOmuKfb/js/qZI8AAoBOUMwEbyMyEJS4XP5ayF4bj+Ju/xpdHYxK1tIhoKOnxT4ICh4IFY+zmXBeydvDP/J+XDIrPEikVAcc5nnim2AyA9D49YIXrGtARclQgFU3U/Dsn7eQsfPoCk5wd2XsAAQPt6ieOqfakK7eau9CrSBNg+ww1N9RnI4H4eg00bECYs+G3NPZeHRtPqAbPMuUXhgpFdbBMpaPQdo19Q9YR/X0mxwlHAgKDDdbehgu4kCceHvTFdfm9d2JLXrmcUlJYxP3WR4PA0L7H+rWXrUNrTSC79HKJdwZ+3zWsBn1tAFlSt8QMOZwazy8TPSsOrxP1tEWnTSJRfKsqhXTJFwaXz1Vbi6AC6k937kroNSgtbMpyAVZlmmHFvYylDefHxSBqyqeVHCjk5Q+dU64zatFjpMw+Ljr1yxwOF1JKB24l6lu1V5+y3D9rzMzs2FHzmdQDr46H8+scaG1DdWijNGnvGcHlXocmrf4k5eahBP16qFBy++QWtVciaFPW87RpzczW4WfH5AoHQOb4kBa47rBZH4+gLJh8U3X++IWivdLqv0Wj2hGY+Syeho4cg3BWK1gu+4uN7BKghjeH+2tuY8ndvvzaMzIximyru2CDRxdzxx5Smkr80icCDW8wqWAti9owCt/YhqHRXS9yRMn0VvN0TrrmCU+AxvnOI86i74Xh+IjptgI0PLV748+8mEUl5+DqKoEkd03C308+lpQ3SZdfz9Z5hCK5sFVjXj5a+3k1dpu6f7tHTdI0c//gR+lzk29EeBqCP93zDeOxbXxkbVfiT2dFX77SPTcFCP0CZCgk1LKIaqe32AnsuB2AQwfWqO3JXVbTPcAUHC408hpPLLS9PLFbGPw47j80Sf7lDJFvRYjOUgZl0BBHg0yW0eJp+bN1CQmIg7g2cF9DeUa1uLNiu8QClshdAttqWaL8CQJq8jzwhQFHKWWxPmdvTgihQ9gmO+GxA8E3wUFx8B49CLAxmL5Ww/eGKqq/hUXGd/wx7Br4hRIBTc7qGsQPVV6W8HzAhoxUeMSs7pv10v/oAwFhyesP9JU8NOQ/sBX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9403ecbc-56b2-4029-d957-08d9466be6c3 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2021 02:05:49.8874 (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: Xb3wuVoqQwC+ckXSJaEoyNxS6LuHYgy7KCay1rk9b5b6di/41AitUpAMKYtcIbX8GTaZDXsNWLX8zk/iPFVvUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5773 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210713_190554_486593_254D5AF7 X-CRM114-Status: GOOD ( 15.19 ) 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 9ec1edf..cacc725 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); } @@ -2130,6 +2132,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); /*