diff options
author | Vignesh Raghavendra <vigneshr@ti.com> | 2024-03-09 01:33:57 +0530 |
---|---|---|
committer | Praneeth Bajjuri <praneeth@ti.com> | 2024-03-11 13:51:58 -0500 |
commit | 286ef76358e23497fafb79548a696c3ae2470cd9 (patch) | |
tree | b9cdef1a8a7d1dbc754ac867eea53f3666962ff4 | |
parent | 9ca1870d256cd80bc78d4ea05a0f3da5d1a6db65 (diff) |
spi: spi-cadence-quadspi: Disable DMA due to errata id i2285
As per errata id i2285 of AM64x Errata doc [1] BCDMA can only be used
when data source and DMA descriptor source is on the same endpoint. In
case of OSPI mem to mem DMA read, descriptor is in DDR while source data
is in OSPI which may trigger above errata leading to read data
corruption on AM64x SR1.0 devices. Therefore disable OSPI DMA on such
SoCs. Subsequent SR versions are not affected.
[1] https://www.ti.com/lit/er/sprz457e/sprz457e.pdf
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Apurva Nandan <a-nandan@ti.com>
-rw-r--r-- | drivers/spi/spi-cadence-quadspi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index e8d91523fc1f..b3f5a4e3577d 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -29,6 +29,7 @@ #include <linux/sched.h> #include <linux/spi/spi.h> #include <linux/spi/spi-mem.h> +#include <linux/sys_soc.h> #include <linux/timer.h> #define CQSPI_NAME "cadence-qspi" @@ -2457,6 +2458,11 @@ static int cqspi_setup_flash(struct cqspi_st *cqspi) return 0; } +static const struct soc_device_attribute k3_soc_devices[] = { + { .family = "AM64X", .revision = "SR1.0" }, + { /* sentinel */ } +}; + static int cqspi_probe(struct platform_device *pdev) { const struct cqspi_driver_platdata *ddata; @@ -2611,7 +2617,7 @@ static int cqspi_probe(struct platform_device *pdev) goto probe_setup_failed; } - if (cqspi->use_direct_mode) { + if (cqspi->use_direct_mode && !soc_device_match(k3_soc_devices)) { ret = cqspi_request_mmap_dma(cqspi); if (ret == -EPROBE_DEFER) goto probe_setup_failed; |