Skip to content

Commit

Permalink
Merge branch 'at91-5.4-trunk/base_spi' into linux-5.4-at91
Browse files Browse the repository at this point in the history
  • Loading branch information
noglitch committed Nov 6, 2020
2 parents ba7eab1 + bef75a9 commit 1950801
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/spi/spi-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/interrupt.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <linux/platform_data/dma-atmel.h>
#include <linux/of.h>

#include <linux/io.h>
Expand Down Expand Up @@ -514,8 +513,7 @@ static int atmel_spi_configure_dma(struct spi_master *master,
master->dma_tx = dma_request_chan(dev, "tx");
if (IS_ERR(master->dma_tx)) {
err = PTR_ERR(master->dma_tx);
if (err != -EPROBE_DEFER)
dev_err(dev, "No TX DMA channel, DMA is disabled\n");
dev_dbg(dev, "No TX DMA channel, DMA is disabled\n");
goto error_clear;
}

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

Expand Down Expand Up @@ -706,6 +704,7 @@ static void atmel_spi_next_xfer_pio(struct spi_master *master,
static int atmel_spi_next_xfer_dma_submit(struct spi_master *master,
struct spi_transfer *xfer,
u32 *plen)
__must_hold(&as->lock)
{
struct atmel_spi *as = spi_master_get_devdata(master);
struct dma_chan *rxchan = master->dma_rx;
Expand Down Expand Up @@ -858,6 +857,7 @@ static int atmel_spi_set_xfer_speed(struct atmel_spi *as,
csr = spi_readl(as, CSR0 + 4 * chip_select);
csr = SPI_BFINS(SCBR, scbr, csr);
spi_writel(as, CSR0 + 4 * chip_select, csr);
xfer->effective_speed_hz = bus_hz / scbr;

return 0;
}
Expand Down Expand Up @@ -1524,10 +1524,9 @@ static int atmel_spi_probe(struct platform_device *pdev)
return PTR_ERR(clk);

/* setup spi core then atmel-specific driver state */
ret = -ENOMEM;
master = spi_alloc_master(&pdev->dev, sizeof(*as));
if (!master)
goto out_free;
return -ENOMEM;

/* the spi->mode bits understood by this driver: */
master->use_gpio_descriptors = true;
Expand Down Expand Up @@ -1656,7 +1655,6 @@ static int atmel_spi_probe(struct platform_device *pdev)
clk_disable_unprepare(clk);
out_free_irq:
out_unmap_regs:
out_free:
spi_master_put(master);
return ret;
}
Expand Down

0 comments on commit 1950801

Please sign in to comment.