Commit 346eef2f authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'spi-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few driver specific fixes here, the DMA burst size increase in the
  spfi driver is a fix to make the hardware happier in some situations"

* tag 'spi-v3.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: img-spfi: Increase DMA burst size
  spi: img-spfi: Enable controller before starting TX DMA
  spi: sh-msiof: Add runtime PM lock in initializing
parents 034496f4 ee4629f5
...@@ -341,7 +341,7 @@ static int img_spfi_start_dma(struct spi_master *master, ...@@ -341,7 +341,7 @@ static int img_spfi_start_dma(struct spi_master *master,
default: default:
rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA; rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA;
rxconf.src_addr_width = 1; rxconf.src_addr_width = 1;
rxconf.src_maxburst = 1; rxconf.src_maxburst = 4;
} }
dmaengine_slave_config(spfi->rx_ch, &rxconf); dmaengine_slave_config(spfi->rx_ch, &rxconf);
...@@ -368,7 +368,7 @@ static int img_spfi_start_dma(struct spi_master *master, ...@@ -368,7 +368,7 @@ static int img_spfi_start_dma(struct spi_master *master,
default: default:
txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA; txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA;
txconf.dst_addr_width = 1; txconf.dst_addr_width = 1;
txconf.dst_maxburst = 1; txconf.dst_maxburst = 4;
break; break;
} }
dmaengine_slave_config(spfi->tx_ch, &txconf); dmaengine_slave_config(spfi->tx_ch, &txconf);
...@@ -390,14 +390,14 @@ static int img_spfi_start_dma(struct spi_master *master, ...@@ -390,14 +390,14 @@ static int img_spfi_start_dma(struct spi_master *master,
dma_async_issue_pending(spfi->rx_ch); dma_async_issue_pending(spfi->rx_ch);
} }
spfi_start(spfi);
if (xfer->tx_buf) { if (xfer->tx_buf) {
spfi->tx_dma_busy = true; spfi->tx_dma_busy = true;
dmaengine_submit(txdesc); dmaengine_submit(txdesc);
dma_async_issue_pending(spfi->tx_ch); dma_async_issue_pending(spfi->tx_ch);
} }
spfi_start(spfi);
return 1; return 1;
stop_dma: stop_dma:
......
...@@ -480,6 +480,8 @@ static int sh_msiof_spi_setup(struct spi_device *spi) ...@@ -480,6 +480,8 @@ static int sh_msiof_spi_setup(struct spi_device *spi)
struct device_node *np = spi->master->dev.of_node; struct device_node *np = spi->master->dev.of_node;
struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master); struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master);
pm_runtime_get_sync(&p->pdev->dev);
if (!np) { if (!np) {
/* /*
* Use spi->controller_data for CS (same strategy as spi_gpio), * Use spi->controller_data for CS (same strategy as spi_gpio),
...@@ -498,6 +500,9 @@ static int sh_msiof_spi_setup(struct spi_device *spi) ...@@ -498,6 +500,9 @@ static int sh_msiof_spi_setup(struct spi_device *spi)
if (spi->cs_gpio >= 0) if (spi->cs_gpio >= 0)
gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH));
pm_runtime_put_sync(&p->pdev->dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment