Skip to content

Commit 1950801

Browse files
committed
Merge branch 'at91-5.4-trunk/base_spi' into linux-5.4-at91
2 parents ba7eab1 + bef75a9 commit 1950801

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

drivers/spi/spi-atmel.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <linux/interrupt.h>
1717
#include <linux/spi/spi.h>
1818
#include <linux/slab.h>
19-
#include <linux/platform_data/dma-atmel.h>
2019
#include <linux/of.h>
2120

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

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

@@ -706,6 +704,7 @@ static void atmel_spi_next_xfer_pio(struct spi_master *master,
706704
static int atmel_spi_next_xfer_dma_submit(struct spi_master *master,
707705
struct spi_transfer *xfer,
708706
u32 *plen)
707+
__must_hold(&as->lock)
709708
{
710709
struct atmel_spi *as = spi_master_get_devdata(master);
711710
struct dma_chan *rxchan = master->dma_rx;
@@ -858,6 +857,7 @@ static int atmel_spi_set_xfer_speed(struct atmel_spi *as,
858857
csr = spi_readl(as, CSR0 + 4 * chip_select);
859858
csr = SPI_BFINS(SCBR, scbr, csr);
860859
spi_writel(as, CSR0 + 4 * chip_select, csr);
860+
xfer->effective_speed_hz = bus_hz / scbr;
861861

862862
return 0;
863863
}
@@ -1524,10 +1524,9 @@ static int atmel_spi_probe(struct platform_device *pdev)
15241524
return PTR_ERR(clk);
15251525

15261526
/* setup spi core then atmel-specific driver state */
1527-
ret = -ENOMEM;
15281527
master = spi_alloc_master(&pdev->dev, sizeof(*as));
15291528
if (!master)
1530-
goto out_free;
1529+
return -ENOMEM;
15311530

15321531
/* the spi->mode bits understood by this driver: */
15331532
master->use_gpio_descriptors = true;
@@ -1656,7 +1655,6 @@ static int atmel_spi_probe(struct platform_device *pdev)
16561655
clk_disable_unprepare(clk);
16571656
out_free_irq:
16581657
out_unmap_regs:
1659-
out_free:
16601658
spi_master_put(master);
16611659
return ret;
16621660
}

0 commit comments

Comments
 (0)