Skip to contentSkip to conversation

spi: spi-nxp-fspi: move the register operation after the clock enable

PATCH In review [email protected] 2 participants 2 messages Jun 10, 2021 – Jun 14, 2021

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 spi: spi-nxp-fspi: move the register operation after the clock enable

From: Haibo Chen <[email protected]>

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")
---
 drivers/spi/spi-nxp-fspi.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/spi/spi-nxp-fspi.c +5 -6
index 6e6c2403944d..a66fa97046ee 100644
@@ -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)
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 2 lines · On Thu, 10 Jun 2021 17:24:33 +0800, [email protected] 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