Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3178928imu; Thu, 29 Nov 2018 17:17:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/XPSXYk6PQjZWevqFaC72RLNir4yk/3NUypII+iatadymjPGE4U7cJ97NGaAZ26coxxUSUQ X-Received: by 2002:a62:9913:: with SMTP id d19mr3649104pfe.107.1543540663514; Thu, 29 Nov 2018 17:17:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543540663; cv=none; d=google.com; s=arc-20160816; b=iT1/plMJ8wa0dHl2Fx7WRR9x/VcJYPhsXKDMOu52TpIXaFp8cl8gUbQ7GqHT0OtFYW l2mqHGm6XQrQRuKtMlKHw7RPcjyb+QrwdV8MVdvd3VWRz1UNhcjIAn8KhSDEEYUHwxnh 3FerOPofPCKVFFhy0W9ihHfJkMaGy6ojkeYzxOeg/+YXDjwNbqhCzUJiJj+6hZuEKGYk 8oHWbipIPQ2wl6eDgx9B42yiKrtWNkU8GJV3oaabtT1G1BT0KzYVQlVGt8Ai0syrwXLu wzAfY1ykaKnrZnDn9F1wT8dn1N/UaW+dyGafRjGFnergNi4R+uu6BKxUsaLGddhti7Wv RdoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject :cc; bh=w6yVA/vmzRnHScgmYoSkk1393461VZSWLpQBSuSOTyI=; b=qgZvLDBTLgvMGA+xeOzfXN5+fu3rz63eagLO+1hqXOQjct/JSAN6l3VHVk437Eb+m/ nAjxeQibFf8b2qK9G6CkSc0MwDOHkK9t73DPrHZdquVlKbm6sDko4PQqYtionWw97xvF 1wdurnOQJNXxNM2WH8oDgztVGS/peCziQcr05xTwJwEPFQFU66Fiob+mOgzx3O31vJ5A NHD/V1iR1EoCedY6XF6uJxBQfLpETOp+AdmOJoy2TjXlli8i8G9JNrK+VOlVICvszJrU /AFj8R1/qcyICW6Pp54pbkyDjtasTeW9J0w0C2zt8mqhz3TBLAy6nH6b3W93pqjCQOu7 Wzqw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si3685529pls.348.2018.11.29.17.17.29; Thu, 29 Nov 2018 17:17:43 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727158AbeK3MW7 (ORCPT + 99 others); Fri, 30 Nov 2018 07:22:59 -0500 Received: from lucky1.263xmail.com ([211.157.147.135]:37778 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbeK3MW6 (ORCPT ); Fri, 30 Nov 2018 07:22:58 -0500 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.152]) by lucky1.263xmail.com (Postfix) with ESMTP id 0C163969; Fri, 30 Nov 2018 09:15:25 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from [172.16.12.37] (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 9C2D7359; Fri, 30 Nov 2018 09:15:22 +0800 (CST) X-IP-DOMAINF: 1 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: nsekhar@ti.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: <5dce2b9c02548287941551d8bd8ee4e4> X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from [172.16.12.37] (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 24057389YZW; Fri, 30 Nov 2018 09:15:24 +0800 (CST) Cc: shawn.lin@rock-chips.com, Chunyan Zhang , Ulf Hansson , linux-mmc@vger.kernel.org, Linux Kernel Mailing List , Arnd Bergmann , Mark Brown , kishon@ti.com, nsekhar@ti.com Subject: Re: [PATCH v2 1/3] mmc: sdhci: add support for using external DMA devices To: Chunyan Zhang , Adrian Hunter References: <1542007566-9449-1-git-send-email-zhang.chunyan@linaro.org> <1542007566-9449-2-git-send-email-zhang.chunyan@linaro.org> <84836600-c705-9ac3-297e-bb67a611daca@intel.com> From: Shawn Lin Message-ID: <22591bc4-ea34-dcc6-a3d5-8a75e890ff2b@rock-chips.com> Date: Fri, 30 Nov 2018 09:15:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/11/29 17:59, Chunyan Zhang wrote: > Hi Adrian, > > On Thu, 29 Nov 2018 at 15:36, Adrian Hunter wrote: >> >> On 29/11/18 8:22 AM, Chunyan Zhang wrote: >>> On Tue, 20 Nov 2018 at 21:41, Adrian Hunter wrote: >>>> >>>> On 12/11/18 9:26 AM, Chunyan Zhang wrote: >>>>> Some standard SD host controllers can support both external dma >>>>> controllers as well as ADMA/SDMA in which the SD host controller >>>>> acts as DMA master. TI's omap controller is the case as an example. >>>>> >>>>> Currently the generic SDHCI code supports ADMA/SDMA integrated in >>>>> the host controller but does not have any support for external DMA >>>>> controllers implemented using dmaengine, meaning that custom code is >>>>> needed for any systems that use an external DMA controller with SDHCI. >>>> >>>> I still think you probably need to reset the DMA if there are transfer >>>> errors - perhaps you could comment on that. Also there are some comments below. >>> >>> With regard to "transfer error", do you mean if >>> sdhci_external_dma_setup() failed? >> >> No, I mean any error interrupt that can leave the DMA uncompleted. For >> SDHCI, resetting the data circuit cleans that up, but presumably something >> is needed for external DMA? > > Yes, it should need a dmaengine_terminate_all(). > No, dmaengine_terminate_all is deprecated for quite a long time. Please use dmaengine_terminate_{async, sync}() instead. See Documentation/dmaengine/client.txt > How about adding that at here (I will wrap it up of course): > https://elixir.bootlin.com/linux/v4.19.5/source/drivers/mmc/host/sdhci.c#L2553 > > Is there somewhere else I'm missing? > > Thanks, > Chunyan > >