mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-12-16 15:38:06 +01:00
spi: Fixes for v6.8
There's two things here - the big one is a batch of fixes for the power management in the Cadence QuadSPI driver which had some serious issues with runtime PM and there's also a revert of one of the last batch of fixes for ppc4xx which has a dependency on -next but was in between two mainline fixes so the -next dependency got missed. The ppc4xx driver is not currently included in any defconfig and has dependencies that exclude it from allmodconfigs so none of the CI systems catch issues with it, hence the need for the earlier fixes series. There's some updates to the PowerPC configs to address this. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmXfcaAACgkQJNaLcl1U h9DOagf7BA7H/KvTOLuyd6uU90TwExZslA3/KiHhxn9ePwPHdc9njVMHBMVWl7T2 K4jMDVz9Y7SN41npLG/B48n1dD1jMyWsX2GxkUHaFGCMyK4Go1ODJHmK8ixWSRfy hIFacWgjd6qEJej9SRoKFXmhi9u/UdNJIcUU8xXy3WK3IkrugGySmPUtVXDby+3A 6u2aR588xDEYrySZtxm8ZDFpl2FKU912OswtPPwCNTmSsMkn25/ePqhdo9C2H/VK GA8290rVJFpGSsJPdUVLYAyYIbaar7bBtWV4IfLRBbIN9sFNRKvRbxJpwe6A93dQ BOCjj+G/UjKPFYARhuDReF1Hd5+/Bg== =YOog -----END PGP SIGNATURE----- Merge tag 'spi-fix-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "There's two things here - the big one is a batch of fixes for the power management in the Cadence QuadSPI driver which had some serious issues with runtime PM and there's also a revert of one of the last batch of fixes for ppc4xx which has a dependency on -next but was in between two mainline fixes so the -next dependency got missed. The ppc4xx driver is not currently included in any defconfig and has dependencies that exclude it from allmodconfigs so none of the CI systems catch issues with it, hence the need for the earlier fixes series. There's some updates to the PowerPC configs to address this" * tag 'spi-fix-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: Drop mismerged fix spi: cadence-qspi: add system-wide suspend and resume callbacks spi: cadence-qspi: put runtime in runtime PM hooks names spi: cadence-qspi: remove system-wide suspend helper calls from runtime PM hooks spi: cadence-qspi: fix pointer reference in runtime PM hooks
This commit is contained in:
commit
5cf7ebef02
|
|
@ -1927,24 +1927,18 @@ static void cqspi_remove(struct platform_device *pdev)
|
|||
pm_runtime_disable(&pdev->dev);
|
||||
}
|
||||
|
||||
static int cqspi_suspend(struct device *dev)
|
||||
static int cqspi_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct cqspi_st *cqspi = dev_get_drvdata(dev);
|
||||
struct spi_controller *host = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
ret = spi_controller_suspend(host);
|
||||
cqspi_controller_enable(cqspi, 0);
|
||||
|
||||
clk_disable_unprepare(cqspi->clk);
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cqspi_resume(struct device *dev)
|
||||
static int cqspi_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct cqspi_st *cqspi = dev_get_drvdata(dev);
|
||||
struct spi_controller *host = dev_get_drvdata(dev);
|
||||
|
||||
clk_prepare_enable(cqspi->clk);
|
||||
cqspi_wait_idle(cqspi);
|
||||
|
|
@ -1952,12 +1946,27 @@ static int cqspi_resume(struct device *dev)
|
|||
|
||||
cqspi->current_cs = -1;
|
||||
cqspi->sclk = 0;
|
||||
|
||||
return spi_controller_resume(host);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static DEFINE_RUNTIME_DEV_PM_OPS(cqspi_dev_pm_ops, cqspi_suspend,
|
||||
cqspi_resume, NULL);
|
||||
static int cqspi_suspend(struct device *dev)
|
||||
{
|
||||
struct cqspi_st *cqspi = dev_get_drvdata(dev);
|
||||
|
||||
return spi_controller_suspend(cqspi->host);
|
||||
}
|
||||
|
||||
static int cqspi_resume(struct device *dev)
|
||||
{
|
||||
struct cqspi_st *cqspi = dev_get_drvdata(dev);
|
||||
|
||||
return spi_controller_resume(cqspi->host);
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops cqspi_dev_pm_ops = {
|
||||
RUNTIME_PM_OPS(cqspi_runtime_suspend, cqspi_runtime_resume, NULL)
|
||||
SYSTEM_SLEEP_PM_OPS(cqspi_suspend, cqspi_resume)
|
||||
};
|
||||
|
||||
static const struct cqspi_driver_platdata cdns_qspi = {
|
||||
.quirks = CQSPI_DISABLE_DAC_MODE,
|
||||
|
|
|
|||
|
|
@ -359,22 +359,22 @@ static int spi_ppc4xx_of_probe(struct platform_device *op)
|
|||
|
||||
/* Setup the state for the bitbang driver */
|
||||
bbp = &hw->bitbang;
|
||||
bbp->ctlr = hw->host;
|
||||
bbp->master = hw->host;
|
||||
bbp->setup_transfer = spi_ppc4xx_setupxfer;
|
||||
bbp->txrx_bufs = spi_ppc4xx_txrx;
|
||||
bbp->use_dma = 0;
|
||||
bbp->ctlr->setup = spi_ppc4xx_setup;
|
||||
bbp->ctlr->cleanup = spi_ppc4xx_cleanup;
|
||||
bbp->ctlr->bits_per_word_mask = SPI_BPW_MASK(8);
|
||||
bbp->ctlr->use_gpio_descriptors = true;
|
||||
bbp->master->setup = spi_ppc4xx_setup;
|
||||
bbp->master->cleanup = spi_ppc4xx_cleanup;
|
||||
bbp->master->bits_per_word_mask = SPI_BPW_MASK(8);
|
||||
bbp->master->use_gpio_descriptors = true;
|
||||
/*
|
||||
* The SPI core will count the number of GPIO descriptors to figure
|
||||
* out the number of chip selects available on the platform.
|
||||
*/
|
||||
bbp->ctlr->num_chipselect = 0;
|
||||
bbp->master->num_chipselect = 0;
|
||||
|
||||
/* the spi->mode bits understood by this driver: */
|
||||
bbp->ctlr->mode_bits =
|
||||
bbp->master->mode_bits =
|
||||
SPI_CPHA | SPI_CPOL | SPI_CS_HIGH | SPI_LSB_FIRST;
|
||||
|
||||
/* Get the clock for the OPB */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user