Skip to content

Commit 2e4d9f5

Browse files
SrikanthGoud123broonie
authored andcommitted
spi: cadence-quadspi: Use quirks to set dma_set_mask instead of compatible string for 64-bit DMA support
Remove device compatible property check and instead use quirks to program DMA addressing. Signed-off-by: Srikanth Boyapally <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 40384c8 commit 2e4d9f5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/spi/spi-cadence-quadspi.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ static_assert(CQSPI_MAX_CHIPSELECT <= SPI_CS_CNT_MAX);
4343
#define CQSPI_SLOW_SRAM BIT(4)
4444
#define CQSPI_NEEDS_APB_AHB_HAZARD_WAR BIT(5)
4545
#define CQSPI_RD_NO_IRQ BIT(6)
46+
#define CQSPI_DMA_SET_MASK BIT(7)
4647

4748
/* Capabilities */
4849
#define CQSPI_SUPPORTS_OCTAL BIT(0)
@@ -1881,8 +1882,7 @@ static int cqspi_probe(struct platform_device *pdev)
18811882
goto probe_reset_failed;
18821883
}
18831884

1884-
if (of_device_is_compatible(pdev->dev.of_node,
1885-
"xlnx,versal-ospi-1.0")) {
1885+
if (ddata->quirks & CQSPI_DMA_SET_MASK) {
18861886
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
18871887
if (ret)
18881888
goto probe_reset_failed;
@@ -2048,7 +2048,8 @@ static const struct cqspi_driver_platdata socfpga_qspi = {
20482048

20492049
static const struct cqspi_driver_platdata versal_ospi = {
20502050
.hwcaps_mask = CQSPI_SUPPORTS_OCTAL,
2051-
.quirks = CQSPI_DISABLE_DAC_MODE | CQSPI_SUPPORT_EXTERNAL_DMA,
2051+
.quirks = CQSPI_DISABLE_DAC_MODE | CQSPI_SUPPORT_EXTERNAL_DMA
2052+
| CQSPI_DMA_SET_MASK,
20522053
.indirect_read_dma = cqspi_versal_indirect_read_dma,
20532054
.get_dma_status = cqspi_get_versal_dma_status,
20542055
};

0 commit comments

Comments
 (0)