Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1816942imu; Tue, 6 Nov 2018 04:57:35 -0800 (PST) X-Google-Smtp-Source: AJdET5cKfRq20vjZeVI0D6y+n6o+9x5ORJ4Edl4YlpCeyMs3S5zt4ju3T0+mhoXBo8/TB5dFhK76 X-Received: by 2002:a63:2e02:: with SMTP id u2mr3788623pgu.9.1541509055336; Tue, 06 Nov 2018 04:57:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541509055; cv=none; d=google.com; s=arc-20160816; b=GvQ8bgpqUO1dWcYcTTNOyKV5BavTA1dXjNE5P03DXMlZJVzmwljH55C3CzmorXj4nj UFultYvvj5EDmGfbKp5BjEcw3tUc201dKKLOv7MkwxVqmWQ9huF/ov0w+SNGFtB5Kzqs dc82U3thudufSsVjn0QkCivyXEERdtUYW8qzmLjJGEye+XoDfsqKvpV+4Qdo6gtP1AWa J+SE2PGICzz/tkFfNhZZnxUCClLobaoHs2qckWUr6N6HGKHpjY2D+4Tjc6ftMhuCNFqq 3T85WJbZmAP2478yL/UpltbjBG7IUMMMDdGGX5RO0Az0cPFQTPOd5I+88O8+UrgPWCWx fOnA== 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=Buf6Hucrj9YwiniqARNftu2Pu7TU9+iAoIz/xRrY3Cw=; b=mt6t9aFKy5B79bY7JeMD5wEUfy9oG1kjdpwg6HIYMdqSBfw3pBLzCxKA/aEIeIqaNQ poaNjTI2baHfrf8Dv28Q6AYe3Rx+UTqpo6cMDwzygHD1GtjODOiM8LwQlVGCJq2O8/st fS0CJ1g+O8PQBsDBks3w+W5OY7YNSRS0Q6yF8BpZsoJLuFoS5Fp+DJb5Nxm1GYMVmtfT lEtWbxrGCzdzi4uUg3o4uYbilOl4NhC3vAZZrmvyGXaDUuXxjAVsgTbQuE07YQALogwF OktYqemb/QbMQZ7pmxLlmemt/lKkc0I2s9ABzjOZFec/OgVB6JGxpY7RLtN0/3Q1TNm/ AE6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="Ycg/oHIB"; 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 1-v6si46912441ply.390.2018.11.06.04.57.19; Tue, 06 Nov 2018 04:57:35 -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=fail header.i=@gmail.com header.s=20161025 header.b="Ycg/oHIB"; 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 S2388176AbeKFWQZ (ORCPT + 99 others); Tue, 6 Nov 2018 17:16:25 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:36870 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729272AbeKFWQY (ORCPT ); Tue, 6 Nov 2018 17:16:24 -0500 Received: by mail-qk1-f196.google.com with SMTP id 131so18318424qkd.4; Tue, 06 Nov 2018 04:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Buf6Hucrj9YwiniqARNftu2Pu7TU9+iAoIz/xRrY3Cw=; b=Ycg/oHIBRKh/fsVQqQRXAL5gGsI7BLrLRrzFn5adDlmet65syvTTE8GfyLvRgjoX30 XkT8KpPzHI2LJCUdk/gUj6zG2Kh0ZaWSlF4cjL2OO1VDfSsiRyuKsLEFtnGaOuNFhl+U bE3ZKTqKlGadTTNRz8dVfPm7D3TpOqXDxKeLluG5DR9mu9LFvsImRAg8ktP1UUcocHon YNbtxrlooBH3eNP2G2RqxgQ+4pAFO/4GEfCs3tDnKnORwwTv34H3I3bzSlCz5eNjjsa+ /NNkvIUUT+Bw3vWOHFtZlIIiCWOiKpdAjsH5e0wNOdW7fvCMEh7UxbrxMCwDRSMBfohg olJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Buf6Hucrj9YwiniqARNftu2Pu7TU9+iAoIz/xRrY3Cw=; b=m0DZZwVONsgRKAYEEIk5zxC2UiNHu7HsiFQ9+/Q1rCXECCMn5BMTw5ai040NDIazEd eNCRtwxuIa5tr4bQmhVrhnpI/DZ1NYHtt5HrWugQM8jvCnyffSew+gohHdZLL/iX2fDd j76FEr7T0N7dHKSHzFcVexrvx7BiqxMAzkQkEym5BhYRhpdVPsIejXdg4UTTGUUEgKmd lRxt91scz7EkuyCt2sVlaD1pMefNqZhB8vCJ3vQpuLPAozrLNZWycV4dW85MOBpuKDfy YfkjGVB+9k3gDtn9TdrKYWu4WdGDzJPAEhVkajSUWakvsj6fpx1XHYdGDap/b8AugPEX axgg== X-Gm-Message-State: AGRZ1gLu5DgI5Zt83xZbyzAKmU2aXds9Xka9MXkp9aezgR3NLyF47U0Y Vf6rPSG0RTBGvaIdkgepYRb07dQQr6pnSGh7sgk= X-Received: by 2002:a37:4116:: with SMTP id o22-v6mr23327155qka.107.1541508678961; Tue, 06 Nov 2018 04:51:18 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a0c:9881:0:0:0:0:0 with HTTP; Tue, 6 Nov 2018 04:51:17 -0800 (PST) In-Reply-To: References: <1541387810-24867-1-git-send-email-zhang.chunyan@linaro.org> <1541387810-24867-3-git-send-email-zhang.chunyan@linaro.org> From: Arnd Bergmann Date: Tue, 6 Nov 2018 13:51:17 +0100 X-Google-Sender-Auth: T94ROnoRH2UfrymrCT8HtqLfMO4 Message-ID: Subject: Re: [PATCH RFC 2/3] mmc: sdhci-omap: Add using external dma To: Kishon Vijay Abraham I Cc: Chunyan Zhang , Ulf Hansson , Adrian Hunter , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, 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 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? 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. Arnd