mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
Subsystems (3)
PATCH v2 1/1 mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()
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.
---
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(-)
drivers/mmc/host/bcm2835.c +11 -1
@@ -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)) {
Signature · 4 lines
Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Quoted 8 lines · Peter Ujfalusi
dma_request_slave_channel()is a wrapper on top ofdma_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 <[email protected]>---
Quoted 34 lines
Hi,
Changes since v1:
- instead of returning jump to err: to free up resourcesRegards,
Peterdrivers/mmc/host/bcm2835.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)drivers/mmc/host/bcm2835.c +11
-1@@ -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)) {
Ulf Hansson
AppliedQuoted 8 lines · Peter Ujfalusi
dma_request_slave_channel()is a wrapper on top ofdma_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 <[email protected]>
Applied this one and the other related patches, thanks!
Kind regards
Uffe
Quoted 41 lines
---
Hi,Changes since v1:
- instead of returning jump to err: to free up resourcesRegards,
Peterdrivers/mmc/host/bcm2835.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)drivers/mmc/host/bcm2835.c +11
-2@@ -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