Skip to content

Commit f422316

Browse files
Haibo Chenbroonie
authored andcommitted
spi: spi-nxp-fspi: move the register operation after the clock enable
Move the register operation after the clock enable, otherwise system will stuck when this driver probe. Fixes: 71d8056 ("spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts") Signed-off-by: Haibo Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent aceda40 commit f422316

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/spi/spi-nxp-fspi.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,12 +1124,6 @@ static int nxp_fspi_probe(struct platform_device *pdev)
11241124
goto err_put_ctrl;
11251125
}
11261126

1127-
/* Clear potential interrupts */
1128-
reg = fspi_readl(f, f->iobase + FSPI_INTR);
1129-
if (reg)
1130-
fspi_writel(f, reg, f->iobase + FSPI_INTR);
1131-
1132-
11331127
/* find the resources - controller memory mapped space */
11341128
if (is_acpi_node(f->dev->fwnode))
11351129
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -1167,6 +1161,11 @@ static int nxp_fspi_probe(struct platform_device *pdev)
11671161
}
11681162
}
11691163

1164+
/* Clear potential interrupts */
1165+
reg = fspi_readl(f, f->iobase + FSPI_INTR);
1166+
if (reg)
1167+
fspi_writel(f, reg, f->iobase + FSPI_INTR);
1168+
11701169
/* find the irq */
11711170
ret = platform_get_irq(pdev, 0);
11721171
if (ret < 0)

0 commit comments

Comments
 (0)