diff options
author | Mark Brown <broonie@kernel.org> | 2015-01-07 12:30:17 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-07 12:30:17 -0500 |
commit | 1285c3fefaddedf5358f52cfde3c2b64d8086a04 (patch) | |
tree | 361f556d6b400e8cb6d16738142db2f69f63ef2f /drivers/spi | |
parent | 6b038c8d2b99b552f0b025c8a134f8a3c417a3e7 (diff) | |
parent | b1940cd21c0f4abdce101253e860feff547291b0 (diff) |
Merge tag 'v3.19-rc3' into spi-sh-msiof
Linux 3.19-rc3
Diffstat (limited to 'drivers/spi')
-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 6b13836de307..c58c2494a297 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c | |||
@@ -525,6 +525,8 @@ static int sh_msiof_spi_setup(struct spi_device *spi) | |||
525 | struct device_node *np = spi->master->dev.of_node; | 525 | struct device_node *np = spi->master->dev.of_node; |
526 | struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master); | 526 | struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master); |
527 | 527 | ||
528 | pm_runtime_get_sync(&p->pdev->dev); | ||
529 | |||
528 | if (!np) { | 530 | if (!np) { |
529 | /* | 531 | /* |
530 | * Use spi->controller_data for CS (same strategy as spi_gpio), | 532 | * Use spi->controller_data for CS (same strategy as spi_gpio), |
@@ -543,6 +545,9 @@ static int sh_msiof_spi_setup(struct spi_device *spi) | |||
543 | if (spi->cs_gpio >= 0) | 545 | if (spi->cs_gpio >= 0) |
544 | gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); | 546 | gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); |
545 | 547 | ||
548 | |||
549 | pm_runtime_put_sync(&p->pdev->dev); | ||
550 | |||
546 | return 0; | 551 | return 0; |
547 | } | 552 | } |
548 | 553 | ||