Commit 346eef2fc0c6e535f2de74a551223e2e456c1f41

Authored by 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

Showing 2 changed files Side-by-side Diff

drivers/spi/spi-img-spfi.c
... ... @@ -341,7 +341,7 @@
341 341 default:
342 342 rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA;
343 343 rxconf.src_addr_width = 1;
344   - rxconf.src_maxburst = 1;
  344 + rxconf.src_maxburst = 4;
345 345 }
346 346 dmaengine_slave_config(spfi->rx_ch, &rxconf);
347 347  
... ... @@ -368,7 +368,7 @@
368 368 default:
369 369 txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA;
370 370 txconf.dst_addr_width = 1;
371   - txconf.dst_maxburst = 1;
  371 + txconf.dst_maxburst = 4;
372 372 break;
373 373 }
374 374 dmaengine_slave_config(spfi->tx_ch, &txconf);
375 375  
... ... @@ -390,13 +390,13 @@
390 390 dma_async_issue_pending(spfi->rx_ch);
391 391 }
392 392  
  393 + spfi_start(spfi);
  394 +
393 395 if (xfer->tx_buf) {
394 396 spfi->tx_dma_busy = true;
395 397 dmaengine_submit(txdesc);
396 398 dma_async_issue_pending(spfi->tx_ch);
397 399 }
398   -
399   - spfi_start(spfi);
400 400  
401 401 return 1;
402 402  
drivers/spi/spi-sh-msiof.c
... ... @@ -480,6 +480,8 @@
480 480 struct device_node *np = spi->master->dev.of_node;
481 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 485 if (!np) {
484 486 /*
485 487 * Use spi->controller_data for CS (same strategy as spi_gpio),
... ... @@ -497,6 +499,9 @@
497 499  
498 500 if (spi->cs_gpio >= 0)
499 501 gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH));
  502 +
  503 +
  504 + pm_runtime_put_sync(&p->pdev->dev);
500 505  
501 506 return 0;
502 507 }