* [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
@ 2019-12-17 12:22 Peter Ujfalusi
2019-12-17 12:34 ` Nicolas Saenz Julienne
2019-12-19 14:32 ` Ulf Hansson
0 siblings, 2 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2019-12-17 12:22 UTC (permalink / raw)
To: ulf.hansson, f.fainelli, rjui, sbranden, nsaenzjulienne
Cc: vkoul, linux-mmc, linux-kernel, bcm-kernel-feedback-list,
linux-rpi-kernel, linux-arm-kernel
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>
---
Hi,
Changes since v1:
- instead of returning jump to err: to free up resources
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
2019-12-17 12:22 [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
@ 2019-12-17 12:34 ` Nicolas Saenz Julienne
2019-12-19 14:32 ` Ulf Hansson
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Saenz Julienne @ 2019-12-17 12:34 UTC (permalink / raw)
To: Peter Ujfalusi, ulf.hansson, f.fainelli, rjui, sbranden
Cc: vkoul, linux-mmc, linux-kernel, bcm-kernel-feedback-list,
linux-rpi-kernel, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1381 bytes --]
On Tue, 2019-12-17 at 14:22 +0200, Peter Ujfalusi 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>
> ---
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Hi,
>
> Changes since v1:
> - instead of returning jump to err: to free up resources
>
> 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)) {
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
2019-12-17 12:22 [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-17 12:34 ` Nicolas Saenz Julienne
@ 2019-12-19 14:32 ` Ulf Hansson
1 sibling, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2019-12-19 14:32 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: Florian Fainelli, Ray Jui, Scott Branden, Nicolas Saenz Julienne,
Vinod Koul, linux-mmc, Linux Kernel Mailing List,
BCM Kernel Feedback, linux-rpi-kernel, Linux ARM
On Tue, 17 Dec 2019 at 13:22, 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>
Applied this one and the other related patches, thanks!
Kind regards
Uffe
> ---
> Hi,
>
> Changes since v1:
> - instead of returning jump to err: to free up resources
>
> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
2020-01-07 10:40 Peter Ujfalusi
2020-01-07 10:49 ` Nicolas Saenz Julienne
@ 2020-01-16 14:40 ` Ulf Hansson
1 sibling, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2020-01-16 14:40 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: Florian Fainelli, Ray Jui, Scott Branden, Nicolas Saenz Julienne,
Vinod Koul, linux-mmc, Linux Kernel Mailing List,
BCM Kernel Feedback, linux-rpi-kernel, Linux ARM
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
2020-01-07 10:40 Peter Ujfalusi
@ 2020-01-07 10:49 ` Nicolas Saenz Julienne
2020-01-16 14:40 ` Ulf Hansson
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Saenz Julienne @ 2020-01-07 10:49 UTC (permalink / raw)
To: Peter Ujfalusi, ulf.hansson, f.fainelli, rjui, sbranden
Cc: vkoul, linux-mmc, linux-kernel, bcm-kernel-feedback-list,
linux-rpi-kernel, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]
On Tue, 2020-01-07 at 12:40 +0200, Peter Ujfalusi 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>
> ---
> Hi,
>
> Changes since v1:
> - jump to err: instead of returning in case of EPROBE_DEFER
>
> Regards,
> Peter
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Thanks,
Nicolas
>
> 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)) {
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
@ 2020-01-07 10:40 Peter Ujfalusi
2020-01-07 10:49 ` Nicolas Saenz Julienne
2020-01-16 14:40 ` Ulf Hansson
0 siblings, 2 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2020-01-07 10:40 UTC (permalink / raw)
To: ulf.hansson, f.fainelli, rjui, sbranden, nsaenzjulienne
Cc: vkoul, linux-mmc, linux-kernel, bcm-kernel-feedback-list,
linux-rpi-kernel, linux-arm-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-01-16 14:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 12:22 [PATCH v2] mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel() Peter Ujfalusi
2019-12-17 12:34 ` Nicolas Saenz Julienne
2019-12-19 14:32 ` Ulf Hansson
2020-01-07 10:40 Peter Ujfalusi
2020-01-07 10:49 ` Nicolas Saenz Julienne
2020-01-16 14:40 ` Ulf Hansson
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).