Commit f422316c authored by Haibo Chen's avatar Haibo Chen Committed by Mark Brown

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: 71d80563 ("spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts")
Signed-off-by: default avatarHaibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/1623317073-25158-1-git-send-email-haibo.chen@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent aceda401
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment