Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3065902imu; Mon, 19 Nov 2018 10:06:45 -0800 (PST) X-Google-Smtp-Source: AJdET5d5rfVGezTVpy7e3cmgySToDqlP7vttNiTD8LmI9exIB7UKWM9h6TIojtb1yB/sd6siQvdO X-Received: by 2002:a63:7e5b:: with SMTP id o27mr20885141pgn.214.1542650805122; Mon, 19 Nov 2018 10:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542650805; cv=none; d=google.com; s=arc-20160816; b=c73xFfXDs4qd9+oZ2ud2mrDSP9s0g2c9XsEzRJYXbJZoCzQWEwmUNYGVbxhBXelWQe ycob/lIgKXODycGQZknukM1aO0S0n8ghZg2yglOc3afE2mxWBmbtRX+2f6SWkrh9PlEU 2WJ949XJrAeG/bq2EmStsJcqQ40g0TImYdRE4jdiy3sRGaCrY8d1mYbjhOH6hbklq37b aX9NT8FCwUC1HF7dX08aGCAF5rWF3wEXkAhT9l3XR4f0e3wSC7clCpTtNyhSk1g9Mbmy HUgBGmBT6fSKSr9f0lnxoasWYHqu5oiyrLWk7mt9IdIBBZ+YSqahYNmd8Fa6P0aSmRwR MwFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=AgiikwE28IRGj4NGL1R9Q0Vtntndov4NVIEhl2+L9do=; b=0H5x3PPr3DtayBhoHIY8F47EEzEXUO2DstyFAiUs3TOwW6TL5ATOOj1/wBHkyvB70p YBPWV+x4MMzhi7N3mlbGoZI4OrSxowdCum1AvlLogmIj+XDmPXS5J238Gx66R0r0CmHp gRiWChZBK3rS2eOI6NbdmEVD+lqRFeeBeISQrp4QSbWMW1pOqhkfnZlavXXbBjQ51WWh jAYr0dBC635icLoLxiGXPx/mMddIh/REi6gxpMM9UOGHrnDW+4PzgiryB+O4MfmVEeyp A+pzersZ64PJuXRpNWI9rmE2FoThz2p2mnHpD/Am5qf545KWFE1URA+4HsY1WyAEFezt M56g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MCbL9DOk; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si8110348plp.130.2018.11.19.10.06.29; Mon, 19 Nov 2018 10:06:45 -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; dkim=pass header.i=@linaro.org header.s=google header.b=MCbL9DOk; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731005AbeKTC5O (ORCPT + 99 others); Mon, 19 Nov 2018 21:57:14 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:43729 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730994AbeKTC5N (ORCPT ); Mon, 19 Nov 2018 21:57:13 -0500 Received: by mail-io1-f66.google.com with SMTP id g8so5927380iop.10 for ; Mon, 19 Nov 2018 08:33:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=AgiikwE28IRGj4NGL1R9Q0Vtntndov4NVIEhl2+L9do=; b=MCbL9DOkKGCEiqTn1Lpcq05QbCifJRemU+ZS0e5O8IUzu85E7QcyIkkSybSa34duCZ Y6ZIdfsbl4rTlTxb+seJLzPGMOm1nxLal4lCrHBWsaqsob66GylhLaSXq1IGbT2YNFco wkAn55dLJj7L1DmfNMrF919jlAKGsjCPvLVAI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=AgiikwE28IRGj4NGL1R9Q0Vtntndov4NVIEhl2+L9do=; b=MArC9q6+JBL7kwYok9SM6pvQl3BY88n9NMdPSYUsWcio15k/N9592gDLnbVJvSCWk3 JTj1pWpDtg7xjedhAKoTE4xcHQvWFhprrbM37awqPxdl0xFHrk0teIfKFumMO4I83/M1 d59WrlafjKuQc7M7FhC7XAv3g3hPk2iiASraW4vhqTO9eTeJavzAEMf+zfEbhcdK8Iqw OD9OXNdplX310RxBrX9utudRkT7T4uD8M9C/ayKdw1Ux2u5lSqx2UmKFXHMsAxZvlKuk 6zFbJZ6KwTIrSIC6oHzZe9MboVoPB+h8wfDVtRJRV3zl3IlPJQwruUX79urwa6UuUI8m AIvQ== X-Gm-Message-State: AA+aEWbPTP0LjeLTqMyGU3hpzDkg53C/KbTD01+mRCFqQpdeAs+mrX1S cWnj7UiYeUgk+JZpZ8Mgxt6aeHZmJpoZUOA/isu1XA== X-Received: by 2002:a6b:3b4f:: with SMTP id i76mr18829642ioa.266.1542645185475; Mon, 19 Nov 2018 08:33:05 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a02:70c8:0:0:0:0:0 with HTTP; Mon, 19 Nov 2018 08:32:25 -0800 (PST) In-Reply-To: <44e1a97e-0446-283f-72f7-fd8d39a74b0f@ti.com> References: <1541387810-24867-1-git-send-email-zhang.chunyan@linaro.org> <1541387810-24867-3-git-send-email-zhang.chunyan@linaro.org> <44e1a97e-0446-283f-72f7-fd8d39a74b0f@ti.com> From: Ulf Hansson Date: Mon, 19 Nov 2018 17:32:25 +0100 Message-ID: Subject: Re: [PATCH RFC 2/3] mmc: sdhci-omap: Add using external dma To: Kishon Vijay Abraham I , Arnd Bergmann , Chunyan Zhang Cc: Adrian Hunter , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Mark Brown , Sekhar Nori , Chunyan Zhang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9 November 2018 at 06:27, Kishon Vijay Abraham I wrote: > Hi Arnd, > > On 06/11/18 6:21 PM, Arnd Bergmann wrote: >> On 11/5/18, Kishon Vijay Abraham I wrote: >>> On 05/11/18 8:46 AM, Chunyan Zhang wrote: >>>> >>>> + sdhci_switch_extdma(host, true); >>> >>> A number of devices using sdhci-omap supports ADMA. So switching to >>> external >>> DMA shouldn't be unconditional. >>> >>> IMHO sdhci.c should see if the device supports ADMA or SDMA. If not it >>> should >>> try switching to external DMA and if external DMA too is not supported, it >>> should use PIO. >> >> What's the reasoning for preferring ADMA/SDMA over external DMA if >> both are supported? > > Generally from our experiments we've found ADMA gives better throughput than > DMA. I have to ascertain the actual reasons for that. >> >> I'd expect that if the external DMA for some reason is worse than >> ADMA, we just wouldn't list it in the DT at all, but if it's listed and >> ADMA also works, then the driver should try to use it before falling >> back to ADMA. > > I would agree that for newer dtbs. However if you consider omap_hsmmc, external > DMA bindings are already added in dt. If we try to switch to sdhci-omap with > the same bindings, systems with older dtbs will use external DMA and give > lesser throughput. I was under the impression that the internal DMA (for old versions) is rather poor. However, in the end this is a software policy decision of what to use. I have no strong opinion, so feel free to pick what you think makes best sense. Maybe Adrian also have some thoughts? Kind regards Uffe