spi: spi-msm-geni: Propagate change form 4.14 to 5.4

Propagate following change from 4.14 to 5.4 for SPI.
'commit 0f5e798e98004 ("spi: spi-geni-qcom: Don't
initialize GSI channels for FIFO/SE_DMA mode")'.

Change-Id: I600cb1a522a09c4e9cd2ee1cad3d3f6d4c66a358
Signed-off-by: Ashish Kori <akori@codeaurora.org>
This commit is contained in:
Ashish Kori 2020-08-06 19:06:21 +05:30
commit 45203d00ef

View file

@ -1069,11 +1069,17 @@ static int spi_geni_mas_setup(struct spi_master *spi)
/* Transmit an entire FIFO worth of data per IRQ */
mas->tx_wm = 1;
mas->tx = dma_request_slave_channel(mas->dev, "tx");
if (IS_ERR_OR_NULL(mas->tx)) {
dev_info(mas->dev, "Failed to get tx DMA ch %ld\n",
mas->gsi_mode =
(geni_read_reg(mas->base, GENI_IF_FIFO_DISABLE_RO) &
FIFO_IF_DISABLE);
if (mas->gsi_mode) {
mas->tx = dma_request_slave_channel(mas->dev, "tx");
if (IS_ERR_OR_NULL(mas->tx)) {
dev_info(mas->dev, "Failed to get tx DMA ch %ld\n",
PTR_ERR(mas->tx));
} else {
goto setup_ipc;
}
mas->rx = dma_request_slave_channel(mas->dev, "rx");
if (IS_ERR_OR_NULL(mas->rx)) {
dev_info(mas->dev, "Failed to get rx DMA ch %ld\n",
@ -1152,9 +1158,6 @@ setup_ipc:
if (mas->set_miso_sampling)
spi_geni_set_sampling_rate(mas, major, minor);
mas->gsi_mode =
(geni_read_reg(mas->base, GENI_IF_FIFO_DISABLE_RO) &
FIFO_IF_DISABLE);
if (mas->dis_autosuspend)
GENI_SE_DBG(mas->ipc, false, mas->dev,
"Auto Suspend is disabled\n");