Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2947337ybi; Mon, 10 Jun 2019 01:18:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4uDAEJlCMIU+LhBWcwY0BPlGFiV4WS3ntEq6FF8SjeIpGnt2zBFdwF+4fQkMQMtVE5ul5 X-Received: by 2002:a62:5303:: with SMTP id h3mr20594504pfb.58.1560154702019; Mon, 10 Jun 2019 01:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560154702; cv=none; d=google.com; s=arc-20160816; b=ITQd/88mfCTLhhzOm7CNl43WdkTlG8TEXCWC72QiDYcosZ0PUCIOK0pbpEfwcbC5Mj fPOJ3CtyGlS44sVJnCzfvYteQQsKRR/OBRX8T/ffSKgzduKjwJYlFt99ujKIr/a26AIv 1073fXMupMb0ABKf/MRTfy+gMWIyT7a4JfRW72j9k7QXiKZpTTD9Y47sZc1njMsU6UiE GyDZKDUa7voAyJ4QmcdOcQIApz3caG4Q/XbYMPzxOuJcCCoptqqjtE3Heh8Tf8eRGArQ ckRNl9weUixr4Il51wrCtXEuyAr83WURBS35kqOPAPecX6fWnRh7c6E/Wj4/DO6e1Ux+ 3nvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=60aFf/UTUtlBLh5cC2sMsqDP6nQ5A8VMoMd/XjMzZmM=; b=Dt68JUIwc+rT+iUQq1KzqyCp3Ufm7QYeEzmn2A1P1rFPy5O0dxvZtvY2oSKAyhRlaZ VEkHGepEkr1EYckN7G+W/pVGgHfEtSZ09InTZ8SyS8O0GXeMhgFrLaeHcbvefJj7NvB9 MAeX16PW0h3sXdD/+yUmp79EaSJoQceXPyCDz8dNHnC1TLrmYxxrDIvQDFfYMTdPOSkq 5AVYiSDX90S2z/2Mdsi75J39Hzo6Edz/VTlBnv30ZswelTRS33hlh/M6zDUXU7Bjcqzg agBLklSKDw2p4QSw8pBWGsOTZGWoOKiH+diqlSykbuxYug6izss1V6ozuYLL2FrSusG9 bk1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a65si9697695pfb.204.2019.06.10.01.18.07; Mon, 10 Jun 2019 01:18:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388261AbfFJIQ3 (ORCPT + 99 others); Mon, 10 Jun 2019 04:16:29 -0400 Received: from inva021.nxp.com ([92.121.34.21]:37208 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388064AbfFJIQ1 (ORCPT ); Mon, 10 Jun 2019 04:16:27 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id CB7F9200738; Mon, 10 Jun 2019 10:16:24 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C92BB200736; Mon, 10 Jun 2019 10:16:16 +0200 (CEST) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 32A2E4031E; Mon, 10 Jun 2019 16:16:07 +0800 (SGT) From: yibin.gong@nxp.com To: robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, broonie@kernel.org, festevam@gmail.com, vkoul@kernel.org, dan.j.williams@intel.com, u.kleine-koenig@pengutronix.de, catalin.marinas@arm.com, l.stach@pengutronix.de, will.deacon@arm.com Cc: linux-spi@vger.kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v5 03/15] Revert "dmaengine: imx-sdma: refine to load context only once" Date: Mon, 10 Jun 2019 16:17:41 +0800 Message-Id: <20190610081753.11422-4-yibin.gong@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190610081753.11422-1-yibin.gong@nxp.com> References: <20190610081753.11422-1-yibin.gong@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robin Gong This reverts commit ad0d92d7ba6aecbe2705907c38ff8d8be4da1e9c, because in spi-imx case, burst length may be changed dynamically. Signed-off-by: Robin Gong --- drivers/dma/imx-sdma.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index ca296f0..21db6b69 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -377,7 +377,6 @@ struct sdma_channel { unsigned long watermark_level; u32 shp_addr, per_addr; enum dma_status status; - bool context_loaded; struct imx_dma_data data; struct work_struct terminate_worker; }; @@ -988,9 +987,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) @@ -1033,8 +1029,6 @@ static int sdma_load_context(struct sdma_channel *sdmac) spin_unlock_irqrestore(&sdma->channel_0_lock, flags); - sdmac->context_loaded = true; - return ret; } @@ -1074,7 +1068,6 @@ static void sdma_channel_terminate_work(struct work_struct *work) sdmac->desc = NULL; spin_unlock_irqrestore(&sdmac->vc.lock, flags); vchan_dma_desc_free_list(&sdmac->vc, &head); - sdmac->context_loaded = false; } static int sdma_disable_channel_async(struct dma_chan *chan) -- 2.7.4