Merge tag 'spi-fix-v6.13-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown: "A few fairly minor driver specific fixes, plus one core fix for the handling of deferred probe on ACPI systems - ignoring probe deferral and incorrectly treating it like a fatal error while parsing the generic ACPI bindings for SPI devices" * tag 'spi-fix-v6.13-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: Fix acpi deferred irq probe spi: atmel-quadspi: Fix register name in verbose logging function spi-imx: prevent overflow when estimating transfer time spi: rockchip-sfc: Embedded DMA only support 4B aligned address
This commit is contained in:
@@ -183,7 +183,7 @@ static const char *atmel_qspi_reg_name(u32 offset, char *tmp, size_t sz)
|
||||
case QSPI_MR:
|
||||
return "MR";
|
||||
case QSPI_RD:
|
||||
return "MR";
|
||||
return "RD";
|
||||
case QSPI_TD:
|
||||
return "TD";
|
||||
case QSPI_SR:
|
||||
|
||||
@@ -1685,7 +1685,7 @@ static unsigned int spi_imx_transfer_estimate_time_us(struct spi_transfer *trans
|
||||
words = DIV_ROUND_UP(transfer->len * BITS_PER_BYTE, transfer->bits_per_word);
|
||||
word_delay_us = DIV_ROUND_CLOSEST(spi_delay_to_ns(&transfer->word_delay, transfer),
|
||||
NSEC_PER_USEC);
|
||||
result += words * word_delay_us;
|
||||
result += (u64)words * word_delay_us;
|
||||
}
|
||||
|
||||
return min(result, U32_MAX);
|
||||
|
||||
@@ -503,7 +503,7 @@ static int rockchip_sfc_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op
|
||||
rockchip_sfc_adjust_op_work((struct spi_mem_op *)op);
|
||||
rockchip_sfc_xfer_setup(sfc, mem, op, len);
|
||||
if (len) {
|
||||
if (likely(sfc->use_dma) && len >= SFC_DMA_TRANS_THRETHOLD) {
|
||||
if (likely(sfc->use_dma) && len >= SFC_DMA_TRANS_THRETHOLD && !(len & 0x3)) {
|
||||
init_completion(&sfc->cp);
|
||||
rockchip_sfc_irq_unmask(sfc, SFC_IMR_DMA);
|
||||
ret = rockchip_sfc_xfer_data_dma(sfc, op, len);
|
||||
|
||||
+10
-3
@@ -424,6 +424,16 @@ static int spi_probe(struct device *dev)
|
||||
spi->irq = 0;
|
||||
}
|
||||
|
||||
if (has_acpi_companion(dev) && spi->irq < 0) {
|
||||
struct acpi_device *adev = to_acpi_device_node(dev->fwnode);
|
||||
|
||||
spi->irq = acpi_dev_gpio_irq_get(adev, 0);
|
||||
if (spi->irq == -EPROBE_DEFER)
|
||||
return -EPROBE_DEFER;
|
||||
if (spi->irq < 0)
|
||||
spi->irq = 0;
|
||||
}
|
||||
|
||||
ret = dev_pm_domain_attach(dev, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -2866,9 +2876,6 @@ static acpi_status acpi_register_spi_device(struct spi_controller *ctlr,
|
||||
acpi_set_modalias(adev, acpi_device_hid(adev), spi->modalias,
|
||||
sizeof(spi->modalias));
|
||||
|
||||
if (spi->irq < 0)
|
||||
spi->irq = acpi_dev_gpio_irq_get(adev, 0);
|
||||
|
||||
acpi_device_set_enumerated(adev);
|
||||
|
||||
adev->power.flags.ignore_parent = true;
|
||||
|
||||
Reference in New Issue
Block a user