Skip to content

Commit bef75a9

Browse files
committed
spi: atmel: Downgrade to dev_dbg when dma_request_chan() fails
The IP's DMA capabilities are described in the SoC dtsi, to spare users duplicating the DMA bindings in their board device tree. Users that don't want to use DMA, have to overwrite the DMA bindings in their board device tree. An example is: commit ddcdaeb ("ARM: dts: at91: sama5d2: Add DMA bindings for the SPI and UART flx4 functions") When the DMA bindings are overwritten, one could see on the console: atmel_spi fc018400.spi: error -ENODEV: No TX DMA channel, DMA is disabled atmel_spi fc018400.spi: Atmel SPI Controller using PIO only Choosing to not use DMA is not a reason to print an error message. More, the user is already informed when PIO is used: "Atmel SPI Controller using PIO only". Downgrade to dev_dbg when dma_request_chan() fails. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/20201030121116.869105-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 23fc86e) Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent d9cbc2f commit bef75a9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/spi/spi-atmel.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ static int atmel_spi_configure_dma(struct spi_master *master,
512512

513513
master->dma_tx = dma_request_chan(dev, "tx");
514514
if (IS_ERR(master->dma_tx)) {
515-
err = dev_err_probe(dev, PTR_ERR(master->dma_tx),
516-
"No TX DMA channel, DMA is disabled\n");
515+
err = PTR_ERR(master->dma_tx);
516+
dev_dbg(dev, "No TX DMA channel, DMA is disabled\n");
517517
goto error_clear;
518518
}
519519

@@ -524,7 +524,7 @@ static int atmel_spi_configure_dma(struct spi_master *master,
524524
* No reason to check EPROBE_DEFER here since we have already
525525
* requested tx channel.
526526
*/
527-
dev_err(dev, "No RX DMA channel, DMA is disabled\n");
527+
dev_dbg(dev, "No RX DMA channel, DMA is disabled\n");
528528
goto error;
529529
}
530530

0 commit comments

Comments
 (0)