spi: Fixes for v3.19

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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUoX+AAAoJECTWi3JdVIfQnCUH+wezEX6JeLIW86WiCjHB5hE2
 oEhkp7MS/0qSasgguEQ/kDaov1p8hn3nnpY6t5H695L/MWN8sALBkOymbOhUyNGB
 hWOxpIJ31vdy4hauo/GvEQe9nsR8/AHeM3+e85qQWQKrUZgkDsmZckDy19WlFbdN
 sUuqmfzyAB2xImTmtkAhe2nia3XOoHsvwfZcKXQEyEl4HOQkazD/iC4JNOkP9l98
 NA3U9bFvL1PLD9r0E3A3Ly0LHW90f+DB+Ssuxxdh1CcCTLSxQc0VMnBbCslM0A13
 aiwINf+wFDnh/kx4aAlbmVnOq4JECOwURWmfxqldNmvbc8zuDx8xLdUhQ40CPlk=
 =xJxL
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2014-12-29 13:30:50 -08:00
commit 346eef2fc0
2 changed files with 9 additions and 4 deletions

View file

@ -341,7 +341,7 @@ static int img_spfi_start_dma(struct spi_master *master,
default:
rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA;
rxconf.src_addr_width = 1;
rxconf.src_maxburst = 1;
rxconf.src_maxburst = 4;
}
dmaengine_slave_config(spfi->rx_ch, &rxconf);
@ -368,7 +368,7 @@ static int img_spfi_start_dma(struct spi_master *master,
default:
txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA;
txconf.dst_addr_width = 1;
txconf.dst_maxburst = 1;
txconf.dst_maxburst = 4;
break;
}
dmaengine_slave_config(spfi->tx_ch, &txconf);
@ -390,14 +390,14 @@ static int img_spfi_start_dma(struct spi_master *master,
dma_async_issue_pending(spfi->rx_ch);
}
spfi_start(spfi);
if (xfer->tx_buf) {
spfi->tx_dma_busy = true;
dmaengine_submit(txdesc);
dma_async_issue_pending(spfi->tx_ch);
}
spfi_start(spfi);
return 1;
stop_dma:

View file

@ -480,6 +480,8 @@ static int sh_msiof_spi_setup(struct spi_device *spi)
struct device_node *np = spi->master->dev.of_node;
struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master);
pm_runtime_get_sync(&p->pdev->dev);
if (!np) {
/*
* 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)
if (spi->cs_gpio >= 0)
gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH));
pm_runtime_put_sync(&p->pdev->dev);
return 0;
}