提交 2b43abc0 编写于 作者: H Haibo Chen 提交者: Zheng Zengkai

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

stable inclusion
from stable-5.10.47
commit 4b06ebab4a828c03e9a1ba9bbced505560f8aab6
bugzilla: 172973 https://gitee.com/openeuler/kernel/issues/I4DAKB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4b06ebab4a828c03e9a1ba9bbced505560f8aab6

--------------------------------

[ Upstream commit f422316c ]

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: NHaibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/1623317073-25158-1-git-send-email-haibo.chen@nxp.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 0bce8399
...@@ -1033,12 +1033,6 @@ static int nxp_fspi_probe(struct platform_device *pdev) ...@@ -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) ...@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册