Merge remote-tracking branches 'spi/fix/complete', 'spi/fix/efm32', 'spi/fix/omap2-mcspi' and 'spi/fix/qup' into spi-linus
This commit is contained in:
commit
6eadd84631
|
@ -8,7 +8,13 @@ Required properties:
|
||||||
- interrupts: pair specifying rx and tx irq
|
- interrupts: pair specifying rx and tx irq
|
||||||
- clocks: phandle to the spi clock
|
- clocks: phandle to the spi clock
|
||||||
- cs-gpios: see spi-bus.txt
|
- cs-gpios: see spi-bus.txt
|
||||||
- efm32,location: Value to write to the ROUTE register's LOCATION bitfield to configure the pinmux for the device, see datasheet for values.
|
|
||||||
|
Recommended properties :
|
||||||
|
- efm32,location: Value to write to the ROUTE register's LOCATION bitfield to
|
||||||
|
configure the pinmux for the device, see datasheet for values.
|
||||||
|
If "efm32,location" property is not provided, keeping what is
|
||||||
|
already configured in the hardware, so its either the reset
|
||||||
|
default 0 or whatever the bootloader did.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|
|
@ -383,7 +383,7 @@ config SPI_RSPI
|
||||||
|
|
||||||
config SPI_QUP
|
config SPI_QUP
|
||||||
tristate "Qualcomm SPI controller with QUP interface"
|
tristate "Qualcomm SPI controller with QUP interface"
|
||||||
depends on ARCH_MSM_DT || (ARM && COMPILE_TEST)
|
depends on ARCH_QCOM || (ARM && COMPILE_TEST)
|
||||||
help
|
help
|
||||||
Qualcomm Universal Peripheral (QUP) core is an AHB slave that
|
Qualcomm Universal Peripheral (QUP) core is an AHB slave that
|
||||||
provides a common data path (an output FIFO and an input FIFO)
|
provides a common data path (an output FIFO and an input FIFO)
|
||||||
|
|
|
@ -441,6 +441,7 @@ static void fsl_espi_do_one_msg(struct spi_message *m)
|
||||||
|
|
||||||
m->actual_length = espi_trans.actual_length;
|
m->actual_length = espi_trans.actual_length;
|
||||||
m->status = espi_trans.status;
|
m->status = espi_trans.status;
|
||||||
|
if (m->complete)
|
||||||
m->complete(m->context);
|
m->complete(m->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -408,6 +408,7 @@ static void fsl_spi_do_one_msg(struct spi_message *m)
|
||||||
}
|
}
|
||||||
|
|
||||||
m->status = status;
|
m->status = status;
|
||||||
|
if (m->complete)
|
||||||
m->complete(m->context);
|
m->complete(m->context);
|
||||||
|
|
||||||
if (status || !cs_change) {
|
if (status || !cs_change) {
|
||||||
|
|
|
@ -300,6 +300,7 @@ static int mpc512x_psc_spi_msg_xfer(struct spi_master *master,
|
||||||
}
|
}
|
||||||
|
|
||||||
m->status = status;
|
m->status = status;
|
||||||
|
if (m->complete)
|
||||||
m->complete(m->context);
|
m->complete(m->context);
|
||||||
|
|
||||||
if (status || !cs_change)
|
if (status || !cs_change)
|
||||||
|
|
|
@ -247,6 +247,7 @@ static void mpc52xx_psc_spi_work(struct work_struct *work)
|
||||||
}
|
}
|
||||||
|
|
||||||
m->status = status;
|
m->status = status;
|
||||||
|
if (m->complete)
|
||||||
m->complete(m->context);
|
m->complete(m->context);
|
||||||
|
|
||||||
if (status || !cs_change)
|
if (status || !cs_change)
|
||||||
|
|
|
@ -234,6 +234,7 @@ static int mpc52xx_spi_fsmstate_transfer(int irq, struct mpc52xx_spi *ms,
|
||||||
dev_err(&ms->master->dev, "mode fault\n");
|
dev_err(&ms->master->dev, "mode fault\n");
|
||||||
mpc52xx_spi_chipsel(ms, 0);
|
mpc52xx_spi_chipsel(ms, 0);
|
||||||
ms->message->status = -EIO;
|
ms->message->status = -EIO;
|
||||||
|
if (ms->message->complete)
|
||||||
ms->message->complete(ms->message->context);
|
ms->message->complete(ms->message->context);
|
||||||
ms->state = mpc52xx_spi_fsmstate_idle;
|
ms->state = mpc52xx_spi_fsmstate_idle;
|
||||||
return FSM_CONTINUE;
|
return FSM_CONTINUE;
|
||||||
|
@ -288,6 +289,7 @@ mpc52xx_spi_fsmstate_wait(int irq, struct mpc52xx_spi *ms, u8 status, u8 data)
|
||||||
ms->msg_count++;
|
ms->msg_count++;
|
||||||
mpc52xx_spi_chipsel(ms, 0);
|
mpc52xx_spi_chipsel(ms, 0);
|
||||||
ms->message->status = 0;
|
ms->message->status = 0;
|
||||||
|
if (ms->message->complete)
|
||||||
ms->message->complete(ms->message->context);
|
ms->message->complete(ms->message->context);
|
||||||
ms->state = mpc52xx_spi_fsmstate_idle;
|
ms->state = mpc52xx_spi_fsmstate_idle;
|
||||||
return FSM_CONTINUE;
|
return FSM_CONTINUE;
|
||||||
|
|
|
@ -1379,12 +1379,13 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
INIT_LIST_HEAD(&mcspi->ctx.cs);
|
INIT_LIST_HEAD(&mcspi->ctx.cs);
|
||||||
|
|
||||||
mcspi->dma_channels = kcalloc(master->num_chipselect,
|
mcspi->dma_channels = devm_kcalloc(&pdev->dev, master->num_chipselect,
|
||||||
sizeof(struct omap2_mcspi_dma),
|
sizeof(struct omap2_mcspi_dma),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
if (mcspi->dma_channels == NULL) {
|
||||||
if (mcspi->dma_channels == NULL)
|
status = -ENOMEM;
|
||||||
goto free_master;
|
goto free_master;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < master->num_chipselect; i++) {
|
for (i = 0; i < master->num_chipselect; i++) {
|
||||||
char *dma_rx_ch_name = mcspi->dma_channels[i].dma_rx_ch_name;
|
char *dma_rx_ch_name = mcspi->dma_channels[i].dma_rx_ch_name;
|
||||||
|
@ -1426,7 +1427,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
goto dma_chnl_free;
|
goto free_master;
|
||||||
|
|
||||||
pm_runtime_use_autosuspend(&pdev->dev);
|
pm_runtime_use_autosuspend(&pdev->dev);
|
||||||
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
|
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
|
||||||
|
@ -1444,8 +1445,6 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
disable_pm:
|
disable_pm:
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
dma_chnl_free:
|
|
||||||
kfree(mcspi->dma_channels);
|
|
||||||
free_master:
|
free_master:
|
||||||
spi_master_put(master);
|
spi_master_put(master);
|
||||||
return status;
|
return status;
|
||||||
|
@ -1453,19 +1452,12 @@ free_master:
|
||||||
|
|
||||||
static int omap2_mcspi_remove(struct platform_device *pdev)
|
static int omap2_mcspi_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct spi_master *master;
|
struct spi_master *master = platform_get_drvdata(pdev);
|
||||||
struct omap2_mcspi *mcspi;
|
struct omap2_mcspi *mcspi = spi_master_get_devdata(master);
|
||||||
struct omap2_mcspi_dma *dma_channels;
|
|
||||||
|
|
||||||
master = platform_get_drvdata(pdev);
|
|
||||||
mcspi = spi_master_get_devdata(master);
|
|
||||||
dma_channels = mcspi->dma_channels;
|
|
||||||
|
|
||||||
pm_runtime_put_sync(mcspi->dev);
|
pm_runtime_put_sync(mcspi->dev);
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
kfree(dma_channels);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -322,6 +322,7 @@ static void spi_sh_work(struct work_struct *work)
|
||||||
spin_lock_irqsave(&ss->lock, flags);
|
spin_lock_irqsave(&ss->lock, flags);
|
||||||
|
|
||||||
mesg->status = 0;
|
mesg->status = 0;
|
||||||
|
if (mesg->complete)
|
||||||
mesg->complete(mesg->context);
|
mesg->complete(mesg->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,6 +341,7 @@ static void spi_sh_work(struct work_struct *work)
|
||||||
|
|
||||||
error:
|
error:
|
||||||
mesg->status = ret;
|
mesg->status = ret;
|
||||||
|
if (mesg->complete)
|
||||||
mesg->complete(mesg->context);
|
mesg->complete(mesg->context);
|
||||||
|
|
||||||
spi_sh_clear_bit(ss, SPI_SH_SSA | SPI_SH_SSDB | SPI_SH_SSD,
|
spi_sh_clear_bit(ss, SPI_SH_SSA | SPI_SH_SSDB | SPI_SH_SSD,
|
||||||
|
|
|
@ -262,6 +262,7 @@ static void txx9spi_work_one(struct txx9spi *c, struct spi_message *m)
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
m->status = status;
|
m->status = status;
|
||||||
|
if (m->complete)
|
||||||
m->complete(m->context);
|
m->complete(m->context);
|
||||||
|
|
||||||
/* normally deactivate chipselect ... unless no error and
|
/* normally deactivate chipselect ... unless no error and
|
||||||
|
|
Loading…
Reference in New Issue