From: Ulf Hansson <ulf.hansson@linaro.org>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
Vinod Koul <vkoul@kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
linux-rpi-kernel@lists.infradead.org,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
Date: Thu, 16 Jan 2020 15:40:04 +0100 [thread overview]
Message-ID: <CAPDyKFqjiwqP-QzHQT4r-YXzLD2rdjNZK5Vb9=KC1SDTuhwtOw@mail.gmail.com> (raw)
In-Reply-To: <20200107104040.14500-1-peter.ujfalusi@ti.com>
On Tue, 7 Jan 2020 at 11:40, Peter Ujfalusi <peter.ujfalusi@ti.com> wrote:
>
> dma_request_slave_channel() is a wrapper on top of dma_request_chan()
> eating up the error code.
>
> By using dma_request_chan() directly the driver can support deferred
> probing against DMA.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
I thought I had already applied this, but maybe I didn't publish my
branch back then.
Oh well, please double check so the code has been included in my next branch.
Kind regards
Uffe
> ---
> Hi,
>
> Changes since v1:
> - jump to err: instead of returning in case of EPROBE_DEFER
>
> Regards,
> Peter
>
> drivers/mmc/host/bcm2835.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c
> index 99f61fd2a658..c3d949847cbd 100644
> --- a/drivers/mmc/host/bcm2835.c
> +++ b/drivers/mmc/host/bcm2835.c
> @@ -1393,7 +1393,17 @@ static int bcm2835_probe(struct platform_device *pdev)
> host->dma_chan = NULL;
> host->dma_desc = NULL;
>
> - host->dma_chan_rxtx = dma_request_slave_channel(dev, "rx-tx");
> + host->dma_chan_rxtx = dma_request_chan(dev, "rx-tx");
> + if (IS_ERR(host->dma_chan_rxtx)) {
> + ret = PTR_ERR(host->dma_chan_rxtx);
> + host->dma_chan_rxtx = NULL;
> +
> + if (ret == -EPROBE_DEFER)
> + goto err;
> +
> + /* Ignore errors to fall back to PIO mode */
> + }
> +
>
> clk = devm_clk_get(dev, NULL);
> if (IS_ERR(clk)) {
> --
> Peter
>
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
>
next prev parent reply other threads:[~2020-01-16 14:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 10:40 [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2020-01-07 10:49 ` Nicolas Saenz Julienne
2020-01-16 14:40 ` Ulf Hansson [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-12-17 12:22 Peter Ujfalusi
2019-12-17 12:34 ` Nicolas Saenz Julienne
2019-12-19 14:32 ` Ulf Hansson
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='CAPDyKFqjiwqP-QzHQT4r-YXzLD2rdjNZK5Vb9=KC1SDTuhwtOw@mail.gmail.com' \
--to=ulf.hansson@linaro.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=nsaenzjulienne@suse.de \
--cc=peter.ujfalusi@ti.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=vkoul@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).