From patchwork Mon Nov 5 03:16:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunyan Zhang X-Patchwork-Id: 10667375 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84F481591 for ; Mon, 5 Nov 2018 03:17:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67AC1295DE for ; Mon, 5 Nov 2018 03:17:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A58D296F6; Mon, 5 Nov 2018 03:17:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFD7D295DE for ; Mon, 5 Nov 2018 03:17:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729039AbeKEMe1 (ORCPT ); Mon, 5 Nov 2018 07:34:27 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40244 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728989AbeKEMe1 (ORCPT ); Mon, 5 Nov 2018 07:34:27 -0500 Received: by mail-pf1-f193.google.com with SMTP id g21-v6so3691518pfi.7 for ; Sun, 04 Nov 2018 19:16:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+Abqyr0Tlz0dd8ae03r0keXJovqhbjDX9+vNfD+Uzik=; b=BEPL279pKdQHOlzlhabGHLAJgREkzorzBOB9kb6szIY6paHzHSz0h2CHZGhZ1ryVk9 DTl8TEFBI37jIonnbqdBYmKVNT5cvSr4pCWEjw46mKvVPyfmDzAZM3H6S7vfuMM0PvCq w4ZUxFOaILNGGi/c6dmoxMCx6+FId1Mwa81D4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+Abqyr0Tlz0dd8ae03r0keXJovqhbjDX9+vNfD+Uzik=; b=TgLg2IDkjQzBK5yxr0OkJ+Wp9zZa2yhxbUzW5bUGi2nSXIfGFulrdDeIJbrmnf/xnD aic5Cj9RAVV+3To0fR81rX9EgBEqhOuZr2r8DLrvcdnz3dmCdtJZ/lnOi85tN3mYJ/CH QRZQ4tOupqBJJVpP8+f1n1CKivTyC4uipVXenmAYenBcL8lm4H8JdjeUL983nyr3oJeh hXnWINItAKXroaa5PPc6Dm7fgEIi4cS2v3rz3ON5Xs5ENzU+5yBSDbKtTgxCEUBDgGao 1wksOVarsEzgHU9i6lmh39w6QbTy+IBDHItkqeZQ/b9qF2mDQW0CoxzWPMMwB6Er4Tu0 KVVg== X-Gm-Message-State: AGRZ1gKSNetrwVAvvLl1cRZV86yZUB4kKqO2HsRmjSNwscVQAAulFvSA ogJOuTws0zbNu/d2Yyw06mWFJw== X-Google-Smtp-Source: AJdET5d3IQsBBeeuM+JavzKZOcuTeTNRkChYZ13CdjsmUutLMCCXNZHeOFVNvbg6d4zwdOK9OdT7YA== X-Received: by 2002:a63:ee0e:: with SMTP id e14mr18263487pgi.8.1541387818840; Sun, 04 Nov 2018 19:16:58 -0800 (PST) Received: from ubt.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id f10-v6sm40182773pgp.72.2018.11.04.19.16.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Nov 2018 19:16:57 -0800 (PST) From: Chunyan Zhang To: Ulf Hansson , Adrian Hunter Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Mark Brown , Kishon Vijay Abraham I , Sekhar Nori , Chunyan Zhang Subject: [PATCH RFC 0/3] Add support for using external dma in SDHCI Date: Mon, 5 Nov 2018 11:16:47 +0800 Message-Id: <1541387810-24867-1-git-send-email-zhang.chunyan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the generic SDHCI code in the Linux kernel supports the SD standard DMA integrated into 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 a generic DMA controller with SDHCI which in practice means any SDHCI controller that doesn't have an integrated DMA controller so we should have this as a generic feature. There are already a number of controller specific drivers that have dmaengine code, and some could use sdhci.c actually, but needed to implement mmc_ops->request() in their specific driver for sending command with external dma using dmaengine framework, with this patchset, them will take advantage of the generic support. TI's omap controller is the case as an example. Any comments are very appreciated. Thanks, Chunyan Chunyan Zhang (3): mmc: sdhci: add support for using external DMA devices mmc: sdhci-omap: Add using external dma dt-bindings: sdhci-omap: Add example for using dmaengine .../devicetree/bindings/mmc/sdhci-omap.txt | 7 ++ drivers/mmc/host/Kconfig | 13 ++ drivers/mmc/host/sdhci-omap.c | 7 ++ drivers/mmc/host/sdhci.c | 137 ++++++++++++++++++++- drivers/mmc/host/sdhci.h | 12 ++ 5 files changed, 175 insertions(+), 1 deletion(-)