mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
spi: spi-nxp-fspi: move the register operation after the clock enable
[ Upstream commitf422316c8e] Move the register operation after the clock enable, otherwise system will stuck when this driver probe. Fixes:71d80563b0("spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts") Signed-off-by: Haibo Chen <haibo.chen@nxp.com> Link: https://lore.kernel.org/r/1623317073-25158-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
50a1312a29
commit
4b06ebab4a
|
|
@ -1033,12 +1033,6 @@ static int nxp_fspi_probe(struct platform_device *pdev)
|
||||||
goto err_put_ctrl;
|
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 */
|
/* find the resources - controller memory mapped space */
|
||||||
if (is_acpi_node(f->dev->fwnode))
|
if (is_acpi_node(f->dev->fwnode))
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||||
|
|
@ -1076,6 +1070,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 */
|
/* find the irq */
|
||||||
ret = platform_get_irq(pdev, 0);
|
ret = platform_get_irq(pdev, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user