diff options
author | Mark Brown <broonie@kernel.org> | 2019-05-02 05:20:29 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-02 05:20:29 +0300 |
commit | 2e5f081003f033d37be3faf052aaccc8b6a44aa5 (patch) | |
tree | 6d07a9bfff47b20f997ecce96162b8ca9cf7b19c /drivers/spi/spi-imx.c | |
parent | 58b860ed4a77d9cb17b78e663a0341b79a12e240 (diff) | |
parent | d61ad23cb3be09ff4956e9b9794134456522817f (diff) | |
download | linux-2e5f081003f033d37be3faf052aaccc8b6a44aa5.tar.xz |
Merge branch 'spi-5.2' into spi-next
Diffstat (limited to 'drivers/spi/spi-imx.c')
-rw-r--r-- | drivers/spi/spi-imx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index a81ae29aa68a..09c9a1edb2c6 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -28,6 +28,10 @@ #define DRIVER_NAME "spi_imx" +static bool use_dma = true; +module_param(use_dma, bool, 0644); +MODULE_PARM_DESC(use_dma, "Enable usage of DMA when available (default)"); + #define MXC_CSPIRXDATA 0x00 #define MXC_CSPITXDATA 0x04 #define MXC_CSPICTRL 0x08 @@ -219,6 +223,9 @@ static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi, { struct spi_imx_data *spi_imx = spi_master_get_devdata(master); + if (!use_dma) + return false; + if (!master->dma_rx) return false; |