Skip to content

Commit b7f7340

Browse files
committed
Merge tag 'spi-fix-v5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown: "A few more fixes for SPI, plus one new PCI ID for another Intel chipset. All device specific stuff" * tag 'spi-fix-v5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: atmel-quadspi: Fix the buswidth adjustment between spi-mem and controller spi: cadence-quadspi: fix incorrect supports_op() return value spi: intel: Add support for Raptor Lake-S SPI serial flash spi: spi-mtk-nor: initialize spi controller after resume
2 parents 705191b + 8c235cc commit b7f7340

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

drivers/spi/atmel-quadspi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ static int atmel_qspi_find_mode(const struct spi_mem_op *op)
277277
static bool atmel_qspi_supports_op(struct spi_mem *mem,
278278
const struct spi_mem_op *op)
279279
{
280+
if (!spi_mem_default_supports_op(mem, op))
281+
return false;
282+
280283
if (atmel_qspi_find_mode(op) < 0)
281284
return false;
282285

drivers/spi/spi-cadence-quadspi.c

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,9 +1415,24 @@ static bool cqspi_supports_mem_op(struct spi_mem *mem,
14151415
all_false = !op->cmd.dtr && !op->addr.dtr && !op->dummy.dtr &&
14161416
!op->data.dtr;
14171417

1418-
/* Mixed DTR modes not supported. */
1419-
if (!(all_true || all_false))
1418+
if (all_true) {
1419+
/* Right now we only support 8-8-8 DTR mode. */
1420+
if (op->cmd.nbytes && op->cmd.buswidth != 8)
1421+
return false;
1422+
if (op->addr.nbytes && op->addr.buswidth != 8)
1423+
return false;
1424+
if (op->data.nbytes && op->data.buswidth != 8)
1425+
return false;
1426+
} else if (all_false) {
1427+
/* Only 1-1-X ops are supported without DTR */
1428+
if (op->cmd.nbytes && op->cmd.buswidth > 1)
1429+
return false;
1430+
if (op->addr.nbytes && op->addr.buswidth > 1)
1431+
return false;
1432+
} else {
1433+
/* Mixed DTR modes are not supported. */
14201434
return false;
1435+
}
14211436

14221437
return spi_mem_default_supports_op(mem, op);
14231438
}

drivers/spi/spi-intel-pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ static const struct pci_device_id intel_spi_pci_ids[] = {
7272
{ PCI_VDEVICE(INTEL, 0x4da4), (unsigned long)&bxt_info },
7373
{ PCI_VDEVICE(INTEL, 0x51a4), (unsigned long)&cnl_info },
7474
{ PCI_VDEVICE(INTEL, 0x54a4), (unsigned long)&cnl_info },
75+
{ PCI_VDEVICE(INTEL, 0x7a24), (unsigned long)&cnl_info },
7576
{ PCI_VDEVICE(INTEL, 0x7aa4), (unsigned long)&cnl_info },
7677
{ PCI_VDEVICE(INTEL, 0xa0a4), (unsigned long)&bxt_info },
7778
{ PCI_VDEVICE(INTEL, 0xa1a4), (unsigned long)&bxt_info },

drivers/spi/spi-mtk-nor.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,17 @@ static int __maybe_unused mtk_nor_suspend(struct device *dev)
960960

961961
static int __maybe_unused mtk_nor_resume(struct device *dev)
962962
{
963-
return pm_runtime_force_resume(dev);
963+
struct spi_controller *ctlr = dev_get_drvdata(dev);
964+
struct mtk_nor *sp = spi_controller_get_devdata(ctlr);
965+
int ret;
966+
967+
ret = pm_runtime_force_resume(dev);
968+
if (ret)
969+
return ret;
970+
971+
mtk_nor_init(sp);
972+
973+
return 0;
964974
}
965975

966976
static const struct dev_pm_ops mtk_nor_pm_ops = {

0 commit comments

Comments
 (0)