Merge remote-tracking branches 'spi/fix/armada', 'spi/fix/axi', 'spi/fix/davinci', 'spi/fix/dw', 'spi/fix/fsl-dspi' and 'spi/fix/pxa2xx' into spi-linus
This commit is contained in:
commit
3f95ba38e4
|
@ -378,6 +378,7 @@ config SPI_FSL_SPI
|
|||
config SPI_FSL_DSPI
|
||||
tristate "Freescale DSPI controller"
|
||||
select REGMAP_MMIO
|
||||
depends on HAS_DMA
|
||||
depends on SOC_VF610 || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
|
||||
help
|
||||
This enables support for the Freescale DSPI controller in master
|
||||
|
|
|
@ -494,7 +494,8 @@ static int spi_engine_probe(struct platform_device *pdev)
|
|||
SPI_ENGINE_VERSION_MAJOR(version),
|
||||
SPI_ENGINE_VERSION_MINOR(version),
|
||||
SPI_ENGINE_VERSION_PATCH(version));
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto err_put_master;
|
||||
}
|
||||
|
||||
spi_engine->clk = devm_clk_get(&pdev->dev, "s_axi_aclk");
|
||||
|
|
|
@ -646,7 +646,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
|
|||
buf = t->rx_buf;
|
||||
t->rx_dma = dma_map_single(&spi->dev, buf,
|
||||
t->len, DMA_FROM_DEVICE);
|
||||
if (!t->rx_dma) {
|
||||
if (dma_mapping_error(&spi->dev, !t->rx_dma)) {
|
||||
ret = -EFAULT;
|
||||
goto err_rx_map;
|
||||
}
|
||||
|
@ -660,7 +660,7 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t)
|
|||
buf = (void *)t->tx_buf;
|
||||
t->tx_dma = dma_map_single(&spi->dev, buf,
|
||||
t->len, DMA_TO_DEVICE);
|
||||
if (!t->tx_dma) {
|
||||
if (dma_mapping_error(&spi->dev, t->tx_dma)) {
|
||||
ret = -EFAULT;
|
||||
goto err_tx_map;
|
||||
}
|
||||
|
|
|
@ -274,11 +274,11 @@ static int mid_spi_dma_transfer(struct dw_spi *dws, struct spi_transfer *xfer)
|
|||
static void mid_spi_dma_stop(struct dw_spi *dws)
|
||||
{
|
||||
if (test_bit(TX_BUSY, &dws->dma_chan_busy)) {
|
||||
dmaengine_terminate_all(dws->txchan);
|
||||
dmaengine_terminate_sync(dws->txchan);
|
||||
clear_bit(TX_BUSY, &dws->dma_chan_busy);
|
||||
}
|
||||
if (test_bit(RX_BUSY, &dws->dma_chan_busy)) {
|
||||
dmaengine_terminate_all(dws->rxchan);
|
||||
dmaengine_terminate_sync(dws->rxchan);
|
||||
clear_bit(RX_BUSY, &dws->dma_chan_busy);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,10 @@ static const struct file_operations dw_spi_regs_ops = {
|
|||
|
||||
static int dw_spi_debugfs_init(struct dw_spi *dws)
|
||||
{
|
||||
dws->debugfs = debugfs_create_dir("dw_spi", NULL);
|
||||
char name[128];
|
||||
|
||||
snprintf(name, 128, "dw_spi-%s", dev_name(&dws->master->dev));
|
||||
dws->debugfs = debugfs_create_dir(name, NULL);
|
||||
if (!dws->debugfs)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -1690,6 +1690,7 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
|
|||
pxa2xx_spi_write(drv_data, SSCR1, tmp);
|
||||
tmp = SSCR0_SCR(2) | SSCR0_Motorola | SSCR0_DataSize(8);
|
||||
pxa2xx_spi_write(drv_data, SSCR0, tmp);
|
||||
break;
|
||||
default:
|
||||
tmp = SSCR1_RxTresh(RX_THRESH_DFLT) |
|
||||
SSCR1_TxTresh(TX_THRESH_DFLT);
|
||||
|
|
Loading…
Reference in New Issue