All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: spi-nxp-fspi: move the register operation after the clock enable
@ 2021-06-10  9:24 haibo.chen
  2021-06-14 19:53 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: haibo.chen @ 2021-06-10  9:24 UTC (permalink / raw)
  To: ashish.kumar, ran.wang_1, broonie
  Cc: yogeshgaur.83, linux-spi, linux-imx, han.xu, haibo.chen

From: Haibo Chen <haibo.chen@nxp.com>

Move the register operation after the clock enable, otherwise system
will stuck when this driver probe.

Fixes: 71d80563b076 ("spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 drivers/spi/spi-nxp-fspi.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
index 6e6c2403944d..a66fa97046ee 100644
--- a/drivers/spi/spi-nxp-fspi.c
+++ b/drivers/spi/spi-nxp-fspi.c
@@ -1124,12 +1124,6 @@ static int nxp_fspi_probe(struct platform_device *pdev)
 		goto err_put_ctrl;
 	}
 
-	/* Clear potential interrupts */
-	reg = fspi_readl(f, f->iobase + FSPI_INTR);
-	if (reg)
-		fspi_writel(f, reg, f->iobase + FSPI_INTR);
-
-
 	/* find the resources - controller memory mapped space */
 	if (is_acpi_node(f->dev->fwnode))
 		res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -1167,6 +1161,11 @@ static int nxp_fspi_probe(struct platform_device *pdev)
 		}
 	}
 
+	/* Clear potential interrupts */
+	reg = fspi_readl(f, f->iobase + FSPI_INTR);
+	if (reg)
+		fspi_writel(f, reg, f->iobase + FSPI_INTR);
+
 	/* find the irq */
 	ret = platform_get_irq(pdev, 0);
 	if (ret < 0)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: spi-nxp-fspi: move the register operation after the clock enable
  2021-06-10  9:24 [PATCH] spi: spi-nxp-fspi: move the register operation after the clock enable haibo.chen
@ 2021-06-14 19:53 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-06-14 19:53 UTC (permalink / raw)
  To: ashish.kumar, haibo.chen, ran.wang_1
  Cc: Mark Brown, yogeshgaur.83, linux-imx, linux-spi, han.xu

On Thu, 10 Jun 2021 17:24:33 +0800, haibo.chen@nxp.com wrote:
> Move the register operation after the clock enable, otherwise system
> will stuck when this driver probe.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: spi-nxp-fspi: move the register operation after the clock enable
      commit: f422316c8e9d3c4aff3c56549dfb44a677d02f14

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:[~2021-06-14 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  9:24 [PATCH] spi: spi-nxp-fspi: move the register operation after the clock enable haibo.chen
2021-06-14 19:53 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.