提交 7758e390 编写于 作者: L Ludovic Desroches 提交者: Mark Brown

spi: atmel: remove compat for non DT board when requesting dma chan

All boards with a dma controller have DT support so using
dma_request_slave_channel_compat is no more needed.
Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 c1ee8f3f
...@@ -417,23 +417,6 @@ static int atmel_spi_dma_slave_config(struct atmel_spi *as, ...@@ -417,23 +417,6 @@ static int atmel_spi_dma_slave_config(struct atmel_spi *as,
return err; return err;
} }
static bool filter(struct dma_chan *chan, void *pdata)
{
struct atmel_spi_dma *sl_pdata = pdata;
struct at_dma_slave *sl;
if (!sl_pdata)
return false;
sl = &sl_pdata->dma_slave;
if (sl->dma_dev == chan->device->dev) {
chan->private = sl;
return true;
} else {
return false;
}
}
static int atmel_spi_configure_dma(struct atmel_spi *as) static int atmel_spi_configure_dma(struct atmel_spi *as)
{ {
struct dma_slave_config slave_config; struct dma_slave_config slave_config;
...@@ -444,9 +427,7 @@ static int atmel_spi_configure_dma(struct atmel_spi *as) ...@@ -444,9 +427,7 @@ static int atmel_spi_configure_dma(struct atmel_spi *as)
dma_cap_zero(mask); dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask); dma_cap_set(DMA_SLAVE, mask);
as->dma.chan_tx = dma_request_slave_channel_compat(mask, filter, as->dma.chan_tx = dma_request_slave_channel(dev, "tx");
&as->dma,
dev, "tx");
if (!as->dma.chan_tx) { if (!as->dma.chan_tx) {
dev_err(dev, dev_err(dev,
"DMA TX channel not available, SPI unable to use DMA\n"); "DMA TX channel not available, SPI unable to use DMA\n");
...@@ -454,9 +435,7 @@ static int atmel_spi_configure_dma(struct atmel_spi *as) ...@@ -454,9 +435,7 @@ static int atmel_spi_configure_dma(struct atmel_spi *as)
goto error; goto error;
} }
as->dma.chan_rx = dma_request_slave_channel_compat(mask, filter, as->dma.chan_rx = dma_request_slave_channel(dev, "rx");
&as->dma,
dev, "rx");
if (!as->dma.chan_rx) { if (!as->dma.chan_rx) {
dev_err(dev, dev_err(dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册