* [PATCH 1/1] spi: spi-cadence: Enable spi refclk in slave mode
@ 2024-06-17 15:38 Amit Kumar Mahapatra
2024-06-20 20:04 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Amit Kumar Mahapatra @ 2024-06-17 15:38 UTC (permalink / raw)
To: broonie; +Cc: linux-spi, linux-kernel, git, amitrkcian2002,
Amit Kumar Mahapatra
When spi-cadence is configured as a slave, it requires the SPI refclk to
detect the synchronization start condition while communicating with the
master. However, the spi-cadence driver never enables the SPI refclk in
slave mode, causing the refclk to remain disabled if the
"clk_ignore_unused" kernel parameter is not passed through bootargs.
As a result, the slave cannot detect data sent by the master, leading to
communication failure. Update driver to enable the SPI refclk in both
master and slave configurations.
Fixes: b1b90514eaa3 ("spi: spi-cadence: Add support for Slave mode")
Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
---
BRANCH: for-next
---
drivers/spi/spi-cadence.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c
index 4eacf3f6e031..e07e081de5ea 100644
--- a/drivers/spi/spi-cadence.c
+++ b/drivers/spi/spi-cadence.c
@@ -601,14 +601,14 @@ static int cdns_spi_probe(struct platform_device *pdev)
reset_control_assert(xspi->rstc);
reset_control_deassert(xspi->rstc);
- if (!spi_controller_is_target(ctlr)) {
- xspi->ref_clk = devm_clk_get_enabled(&pdev->dev, "ref_clk");
- if (IS_ERR(xspi->ref_clk)) {
- dev_err(&pdev->dev, "ref_clk clock not found.\n");
- ret = PTR_ERR(xspi->ref_clk);
- goto remove_ctlr;
- }
+ xspi->ref_clk = devm_clk_get_enabled(&pdev->dev, "ref_clk");
+ if (IS_ERR(xspi->ref_clk)) {
+ dev_err(&pdev->dev, "ref_clk clock not found.\n");
+ ret = PTR_ERR(xspi->ref_clk);
+ goto remove_ctlr;
+ }
+ if (!spi_controller_is_target(ctlr)) {
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT);
pm_runtime_get_noresume(&pdev->dev);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] spi: spi-cadence: Enable spi refclk in slave mode
2024-06-17 15:38 [PATCH 1/1] spi: spi-cadence: Enable spi refclk in slave mode Amit Kumar Mahapatra
@ 2024-06-20 20:04 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-06-20 20:04 UTC (permalink / raw)
To: Amit Kumar Mahapatra; +Cc: linux-spi, linux-kernel, git, amitrkcian2002
On Mon, 17 Jun 2024 21:08:37 +0530, Amit Kumar Mahapatra wrote:
> When spi-cadence is configured as a slave, it requires the SPI refclk to
> detect the synchronization start condition while communicating with the
> master. However, the spi-cadence driver never enables the SPI refclk in
> slave mode, causing the refclk to remain disabled if the
> "clk_ignore_unused" kernel parameter is not passed through bootargs.
> As a result, the slave cannot detect data sent by the master, leading to
> communication failure. Update driver to enable the SPI refclk in both
> master and slave configurations.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: spi-cadence: Enable spi refclk in slave mode
commit: 78b05172b42d14a4c6fc6b75b31590b8977900dc
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-06-20 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 15:38 [PATCH 1/1] spi: spi-cadence: Enable spi refclk in slave mode Amit Kumar Mahapatra
2024-06-20 20:04 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).