spi: mediatek: Enable irq when pdata is ready
authorRicardo Ribalda <ribalda@chromium.org>
Mon, 28 Nov 2022 11:00:01 +0000 (12:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Feb 2023 10:25:39 +0000 (11:25 +0100)
commit80cf2b219ebc7e724e0f70ae815aea53b1768b19
tree09dbdefaca1836600ceaa7960d0b71274d33d4e9
parente933c28aa5cd1536bb69967763a88d5876e54cdb
spi: mediatek: Enable irq when pdata is ready

[ Upstream commit c6f7874687f7027d7c4b2f53ff6e4d22850f915d ]

If the device does not come straight from reset, we might receive an IRQ
before we are ready to handle it.

Fixes:

[    0.832328] Unable to handle kernel read from unreadable memory at virtual address 0000000000000010
[    1.040343] Call trace:
[    1.040347]  mtk_spi_can_dma+0xc/0x40
...
[    1.262265]  start_kernel+0x338/0x42c

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20221128-spi-mt65xx-v1-0-509266830665@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-mt65xx.c