* [PATCH] spi: spi-cadence-qspi: Disable STIG mode for Altera SoCFPGA.
@ 2024-12-04 6:33 niravkumar.l.rabara
2024-12-10 13:00 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: niravkumar.l.rabara @ 2024-12-04 6:33 UTC (permalink / raw)
To: Mark Brown, niravkumar.l.rabara, linux-spi, linux-kernel
From: Niravkumar L Rabara <niravkumar.l.rabara@intel.com>
STIG mode is enabled by default for less than 8 bytes data read/write.
STIG mode doesn't work with Altera SocFPGA platform due hardware
limitation.
Add a quirks to disable STIG mode for Altera SoCFPGA platform.
Signed-off-by: Niravkumar L Rabara <niravkumar.l.rabara@intel.com>
---
drivers/spi/spi-cadence-quadspi.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 0b45b7b2b3ab..a031ecb358e0 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_DISABLE_STIG_MODE BIT(7)
/* Capabilities */
#define CQSPI_SUPPORTS_OCTAL BIT(0)
@@ -103,6 +104,7 @@ struct cqspi_st {
bool apb_ahb_hazard;
bool is_jh7110; /* Flag for StarFive JH7110 SoC */
+ bool disable_stig_mode;
const struct cqspi_driver_platdata *ddata;
};
@@ -1416,7 +1418,8 @@ static int cqspi_mem_process(struct spi_mem *mem, const struct spi_mem_op *op)
* reads, prefer STIG mode for such small reads.
*/
if (!op->addr.nbytes ||
- op->data.nbytes <= CQSPI_STIG_DATA_LEN_MAX)
+ (op->data.nbytes <= CQSPI_STIG_DATA_LEN_MAX &&
+ !cqspi->disable_stig_mode))
return cqspi_command_read(f_pdata, op);
return cqspi_read(f_pdata, op);
@@ -1880,6 +1883,8 @@ static int cqspi_probe(struct platform_device *pdev)
if (ret)
goto probe_reset_failed;
}
+ if (ddata->quirks & CQSPI_DISABLE_STIG_MODE)
+ cqspi->disable_stig_mode = true;
if (of_device_is_compatible(pdev->dev.of_node,
"xlnx,versal-ospi-1.0")) {
@@ -2043,7 +2048,8 @@ static const struct cqspi_driver_platdata intel_lgm_qspi = {
static const struct cqspi_driver_platdata socfpga_qspi = {
.quirks = CQSPI_DISABLE_DAC_MODE
| CQSPI_NO_SUPPORT_WR_COMPLETION
- | CQSPI_SLOW_SRAM,
+ | CQSPI_SLOW_SRAM
+ | CQSPI_DISABLE_STIG_MODE,
};
static const struct cqspi_driver_platdata versal_ospi = {
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] spi: spi-cadence-qspi: Disable STIG mode for Altera SoCFPGA.
2024-12-04 6:33 [PATCH] spi: spi-cadence-qspi: Disable STIG mode for Altera SoCFPGA niravkumar.l.rabara
@ 2024-12-10 13:00 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-12-10 13:00 UTC (permalink / raw)
To: linux-spi, linux-kernel, niravkumar.l.rabara
On Wed, 04 Dec 2024 14:33:38 +0800, niravkumar.l.rabara@intel.com wrote:
> STIG mode is enabled by default for less than 8 bytes data read/write.
> STIG mode doesn't work with Altera SocFPGA platform due hardware
> limitation.
> Add a quirks to disable STIG mode for Altera SoCFPGA platform.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: spi-cadence-qspi: Disable STIG mode for Altera SoCFPGA.
commit: 25fb0e77b90e290a1ca30900d54c6a495eea65e2
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-10 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-04 6:33 [PATCH] spi: spi-cadence-qspi: Disable STIG mode for Altera SoCFPGA niravkumar.l.rabara
2024-12-10 13:00 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®