All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunyan Zhang <zhang.chunyan@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>,
	Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Sekhar Nori <nsekhar@ti.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>
Subject: [PATCH v2 0/3] Add support for using external dma in SDHCI
Date: Mon, 12 Nov 2018 15:26:03 +0800	[thread overview]
Message-ID: <1542007566-9449-1-git-send-email-zhang.chunyan@linaro.org> (raw)

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

Changes from v1 (https://lkml.org/lkml/2018/11/5/110):
(The code on patch 1/3 only was revised)
* Address comments from Arnd:
- Release channel when failed to request it unconditionally;
- Skip warning message if get EPROBE_DEFER;
* Address Andrian's comments:
- Replace extdma with external_dma;
- Add release dma resources in sdhci_cleanup_host() and sdhci_remove_host();
- Release dma resources once dmaengine_submit() failed.
- Put rx/tx_chan in struct sdhci_host, and removed unused structure.
* Fall back to the DMA/PIO which standard SDHCI supports, if sdhci_external_dma_setup()
  or sdhci_external_dma_init failed;

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 external dma

 .../devicetree/bindings/mmc/sdhci-omap.txt         |   7 +
 drivers/mmc/host/Kconfig                           |  13 ++
 drivers/mmc/host/sdhci-omap.c                      |   7 +
 drivers/mmc/host/sdhci.c                           | 181 ++++++++++++++++++++-
 drivers/mmc/host/sdhci.h                           |   8 +
 5 files changed, 215 insertions(+), 1 deletion(-)

-- 
2.7.4


             reply	other threads:[~2018-11-12  7:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  7:26 Chunyan Zhang [this message]
2018-11-12  7:26 ` [PATCH v2 1/3] mmc: sdhci: add support for using external DMA devices Chunyan Zhang
2018-11-20 13:39   ` Adrian Hunter
2018-11-29  6:22     ` Chunyan Zhang
2018-11-29  7:35       ` Adrian Hunter
2018-11-29  9:59         ` Chunyan Zhang
2018-11-29 10:48           ` Adrian Hunter
2018-11-30  1:15           ` Shawn Lin
2018-12-03 10:47             ` Chunyan Zhang
2018-11-29  6:07   ` [PATCH V3 " Chunyan Zhang
2018-11-29  9:23     ` Adrian Hunter
2018-11-29  9:44       ` Chunyan Zhang
2018-11-29 10:39         ` Adrian Hunter
2018-11-29 10:46           ` Chunyan Zhang
2018-12-03  9:03       ` Faiz Abbas
2018-12-03  9:03         ` Faiz Abbas
2018-12-03 10:46         ` Chunyan Zhang
2018-12-03 12:15     ` Faiz Abbas
2018-12-03 12:15       ` Faiz Abbas
2018-12-03 13:58       ` Faiz Abbas
2018-12-03 13:58         ` Faiz Abbas
2018-12-04  3:11         ` Chunyan Zhang
2018-11-12  7:26 ` [PATCH v2 2/3] mmc: sdhci-omap: Add using external dma Chunyan Zhang
2018-12-03 13:50   ` Faiz Abbas
2018-12-03 13:50     ` Faiz Abbas
2018-12-04  3:01     ` Chunyan Zhang
2018-11-12  7:26 ` [PATCH v2 3/3] dt-bindings: sdhci-omap: Add example for " Chunyan Zhang
2018-11-21 11:47 ` [PATCH v2 0/3] Add support for using external dma in SDHCI Faiz Abbas
2018-11-21 11:47   ` Faiz Abbas
2018-11-28 16:58   ` Rizvi, Mohammad Faiz Abbas
2018-11-28 16:58     ` Rizvi, Mohammad Faiz Abbas
2018-11-29  6:14     ` Chunyan Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1542007566-9449-1-git-send-email-zhang.chunyan@linaro.org \
    --to=zhang.chunyan@linaro.org \
    --cc=adrian.hunter@intel.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=ulf.hansson@linaro.org \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.