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);