From: Srikanth Boyapally <srikanth.boyapally@amd.com>
To: <broonie@kernel.org>, <robh@kernel.org>, <krzk+dt@kernel.org>,
<conor+dt@kernel.org>, <vaishnav.a@ti.com>
Cc: <linux-spi@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <git@amd.com>,
<srinivas.goud@amd.com>, <radhey.shyam.pandey@amd.com>,
<srikanthboyapally2016@gmail.com>, <srikanth.boyapally@amd.com>,
<sai.krishna.potthuri@amd.com>
Subject: [PATCH 2/3] spi: cadence-quadspi: Use quirks to set dma_set_mask instead of compatible string for 64-bit DMA support
Date: Wed, 20 Nov 2024 17:39:50 +0530 [thread overview]
Message-ID: <20241120120951.56327-3-srikanth.boyapally@amd.com> (raw)
In-Reply-To: <20241120120951.56327-1-srikanth.boyapally@amd.com>
Remove device compatible property check and instead use
quirks to program DMA addressing.
Signed-off-by: Srikanth Boyapally <srikanth.boyapally@amd.com>
---
drivers/spi/spi-cadence-quadspi.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 1755ca026f08..fb75400518e0 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -43,6 +43,7 @@ static_assert(CQSPI_MAX_CHIPSELECT <= SPI_CS_CNT_MAX);
#define CQSPI_SLOW_SRAM BIT(4)
#define CQSPI_NEEDS_APB_AHB_HAZARD_WAR BIT(5)
#define CQSPI_RD_NO_IRQ BIT(6)
+#define CQSPI_DMA_SET_MASK BIT(7)
/* Capabilities */
#define CQSPI_SUPPORTS_OCTAL BIT(0)
@@ -1881,8 +1882,7 @@ static int cqspi_probe(struct platform_device *pdev)
goto probe_reset_failed;
}
- if (of_device_is_compatible(pdev->dev.of_node,
- "xlnx,versal-ospi-1.0")) {
+ if (ddata->quirks & CQSPI_DMA_SET_MASK) {
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
if (ret)
goto probe_reset_failed;
@@ -2048,7 +2048,8 @@ static const struct cqspi_driver_platdata socfpga_qspi = {
static const struct cqspi_driver_platdata versal_ospi = {
.hwcaps_mask = CQSPI_SUPPORTS_OCTAL,
- .quirks = CQSPI_DISABLE_DAC_MODE | CQSPI_SUPPORT_EXTERNAL_DMA,
+ .quirks = CQSPI_DISABLE_DAC_MODE | CQSPI_SUPPORT_EXTERNAL_DMA
+ | CQSPI_DMA_SET_MASK,
.indirect_read_dma = cqspi_versal_indirect_read_dma,
.get_dma_status = cqspi_get_versal_dma_status,
};
--
2.34.1
next prev parent reply other threads:[~2024-11-20 12:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 12:09 [PATCH 0/3] spi: cadence-quadspi: Add support for device reset Srikanth Boyapally
2024-11-20 12:09 ` [PATCH 1/3] dt-bindings: qspi: cdns,qspi-nor: Add compatible string to support OSPI controller on Versal Gen2 platform Srikanth Boyapally
2024-11-20 16:33 ` Conor Dooley
2024-11-20 12:09 ` Srikanth Boyapally [this message]
2024-11-20 12:09 ` [PATCH 3/3] spi: cadence-quadspi: Support for device reset via OSPI controller Srikanth Boyapally
2024-12-02 17:36 ` [PATCH 0/3] spi: cadence-quadspi: Add support for device reset Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241120120951.56327-3-srikanth.boyapally@amd.com \
--to=srikanth.boyapally@amd.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=git@amd.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=radhey.shyam.pandey@amd.com \
--cc=robh@kernel.org \
--cc=sai.krishna.potthuri@amd.com \
--cc=srikanthboyapally2016@gmail.com \
--cc=srinivas.goud@amd.com \
--cc=vaishnav.a@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox