diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-29 16:30:50 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-29 16:30:50 -0500 |
| commit | 346eef2fc0c6e535f2de74a551223e2e456c1f41 (patch) | |
| tree | e3543710256511f440c62c7c1fc45245269527b0 | |
| parent | 034496f40d64a4de786dfd39aa607d120c8c3cfc (diff) | |
| parent | ee4629f5b2f3dda7c83fa816068a67073abb55d9 (diff) | |
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
| -rw-r--r-- | drivers/spi/spi-img-spfi.c | 8 | ||||
| -rw-r--r-- | drivers/spi/spi-sh-msiof.c | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index b410499cddca..aad6683db81b 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c | |||
| @@ -341,7 +341,7 @@ static int img_spfi_start_dma(struct spi_master *master, | |||
| 341 | default: | 341 | default: |
| 342 | rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA; | 342 | rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA; |
| 343 | rxconf.src_addr_width = 1; | 343 | rxconf.src_addr_width = 1; |
| 344 | rxconf.src_maxburst = 1; | 344 | rxconf.src_maxburst = 4; |
| 345 | } | 345 | } |
| 346 | dmaengine_slave_config(spfi->rx_ch, &rxconf); | 346 | dmaengine_slave_config(spfi->rx_ch, &rxconf); |
| 347 | 347 | ||
| @@ -368,7 +368,7 @@ static int img_spfi_start_dma(struct spi_master *master, | |||
| 368 | default: | 368 | default: |
| 369 | txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA; | 369 | txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA; |
| 370 | txconf.dst_addr_width = 1; | 370 | txconf.dst_addr_width = 1; |
| 371 | txconf.dst_maxburst = 1; | 371 | txconf.dst_maxburst = 4; |
| 372 | break; | 372 | break; |
| 373 | } | 373 | } |
| 374 | dmaengine_slave_config(spfi->tx_ch, &txconf); | 374 | dmaengine_slave_config(spfi->tx_ch, &txconf); |
| @@ -390,14 +390,14 @@ static int img_spfi_start_dma(struct spi_master *master, | |||
| 390 | dma_async_issue_pending(spfi->rx_ch); | 390 | dma_async_issue_pending(spfi->rx_ch); |
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | spfi_start(spfi); | ||
| 394 | |||
| 393 | if (xfer->tx_buf) { | 395 | if (xfer->tx_buf) { |
| 394 | spfi->tx_dma_busy = true; | 396 | spfi->tx_dma_busy = true; |
| 395 | dmaengine_submit(txdesc); | 397 | dmaengine_submit(txdesc); |
| 396 | dma_async_issue_pending(spfi->tx_ch); | 398 | dma_async_issue_pending(spfi->tx_ch); |
| 397 | } | 399 | } |
| 398 | 400 | ||
| 399 | spfi_start(spfi); | ||
| 400 | |||
| 401 | return 1; | 401 | return 1; |
| 402 | 402 | ||
| 403 | stop_dma: | 403 | stop_dma: |
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 239be7cbe5a8..96a5fc0878d8 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c | |||
| @@ -480,6 +480,8 @@ static int sh_msiof_spi_setup(struct spi_device *spi) | |||
| 480 | struct device_node *np = spi->master->dev.of_node; | 480 | struct device_node *np = spi->master->dev.of_node; |
| 481 | struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master); | 481 | struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master); |
| 482 | 482 | ||
| 483 | pm_runtime_get_sync(&p->pdev->dev); | ||
| 484 | |||
| 483 | if (!np) { | 485 | if (!np) { |
| 484 | /* | 486 | /* |
| 485 | * Use spi->controller_data for CS (same strategy as spi_gpio), | 487 | * 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 | if (spi->cs_gpio >= 0) | 500 | if (spi->cs_gpio >= 0) |
| 499 | gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); | 501 | gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); |
| 500 | 502 | ||
| 503 | |||
| 504 | pm_runtime_put_sync(&p->pdev->dev); | ||
| 505 | |||
| 501 | return 0; | 506 | return 0; |
| 502 | } | 507 | } |
| 503 | 508 | ||
