[PATCH 04/29] spi: mtk_spim: clear IRQ enable bits

Jagan Teki jagan at amarulasolutions.com
Wed Jul 19 11:22:33 CEST 2023


On Wed, Jul 19, 2023 at 2:46 PM Weijie Gao <weijie.gao at mediatek.com> wrote:
>
> In u-boot we don't use IRQ. Instead, we poll busy bit in SPI_STATUS.
>
> However these IRQ enable bits may be set in previous boot stage (BootROM).
>
> If we leave these bits not cleared, although u-boot has disabled IRQ and
> nothing will happen, the linux kernel may encounter panic during
> initializing the spim driver due to IRQ event happens before IRQ handler
> is properly setup.
>
> This patch clear IRQ bits to prevent this from happening.
>
> Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
> Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
> ---

Reviewed-by: Jagan Teki <jagan at amarulasolutions.com>


More information about the U-Boot mailing list