mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Faiz Abbas <faiz_abbas@ti.com>
To: Chunyan Zhang <zhang.chunyan@linaro.org>,
	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: Re: [PATCH v2 2/3] mmc: sdhci-omap: Add using external dma
Date: Mon, 3 Dec 2018 19:20:03 +0530	[thread overview]
Message-ID: <8c54a77e-564d-40fc-32fe-eb4cee0181f1@ti.com> (raw)
In-Reply-To: <1542007566-9449-3-git-send-email-zhang.chunyan@linaro.org>

Chunyan,

On 12/11/18 12:56 PM, Chunyan Zhang wrote:
> sdhci-omap can support both external dma controller via dmaengine framework
> as well as ADMA which standard SD host controller provides.
> 
> Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
> ---
>  drivers/mmc/host/sdhci-omap.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
> index 88347ce..ccc79f2 100644
> --- a/drivers/mmc/host/sdhci-omap.c
> +++ b/drivers/mmc/host/sdhci-omap.c
> @@ -896,6 +896,7 @@ static int sdhci_omap_probe(struct platform_device *pdev)
>  	const struct of_device_id *match;
>  	struct sdhci_omap_data *data;
>  	const struct soc_device_attribute *soc;
> +	struct resource *regs;
>  
>  	match = of_match_device(omap_sdhci_match, dev);
>  	if (!match)
> @@ -908,6 +909,10 @@ static int sdhci_omap_probe(struct platform_device *pdev)
>  	}
>  	offset = data->offset;
>  
> +	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	if (!regs)
> +		return -ENXIO;
> +
>  	host = sdhci_pltfm_init(pdev, &sdhci_omap_pdata,
>  				sizeof(*omap_host));
>  	if (IS_ERR(host)) {
> @@ -924,6 +929,7 @@ static int sdhci_omap_probe(struct platform_device *pdev)
>  	omap_host->timing = MMC_TIMING_LEGACY;
>  	omap_host->flags = data->flags;
>  	host->ioaddr += offset;
> +	host->mapbase = regs->start;
>  
>  	mmc = host->mmc;
>  	sdhci_get_of_property(pdev);
> @@ -991,6 +997,7 @@ static int sdhci_omap_probe(struct platform_device *pdev)
>  	host->mmc_host_ops.execute_tuning = sdhci_omap_execute_tuning;
>  	host->mmc_host_ops.enable_sdio_irq = sdhci_omap_enable_sdio_irq;
>  
> +	sdhci_switch_external_dma(host, true);

You should give the user a choice based on a dt property whether to use
ADMA or use external DMA. We might still want to use external DMA for
some platforms and ADMA for other platforms.

Thanks,
Faiz

  reply	other threads:[~2018-12-03 13:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  7:26 [PATCH v2 0/3] Add support for using external dma in SDHCI Chunyan Zhang
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 10:46         ` Chunyan Zhang
2018-12-03 12:15     ` 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 [this message]
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-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=8c54a77e-564d-40fc-32fe-eb4cee0181f1@ti.com \
    --to=faiz_abbas@ti.com \
    --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.chunyan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®