mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-04 20:26:13 +02:00
spi: mtk_spim: clear IRQ enable bits
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@mediatek.com> Signed-off-by: Weijie Gao <weijie.gao@mediatek.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
This commit is contained in:
parent
793e623011
commit
b43512d046
@ -242,6 +242,9 @@ static int mtk_spim_hw_init(struct spi_slave *slave)
|
||||
reg_val &= ~SPI_CMD_SAMPLE_SEL;
|
||||
}
|
||||
|
||||
/* Disable interrupt enable for pause mode & normal mode */
|
||||
reg_val &= ~(SPI_CMD_PAUSE_IE | SPI_CMD_FINISH_IE);
|
||||
|
||||
/* disable dma mode */
|
||||
reg_val &= ~(SPI_CMD_TX_DMA | SPI_CMD_RX_DMA);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user