Skip to content
Commit e5222d40 authored by Tali Perry's avatar Tali Perry Committed by Wolfram Sang
Browse files

i2c: npcm: Handle spurious interrupts



On some platforms in rare cases (1 to 100,000 transactions),
the i2c gets a spurious interrupt which means that we enter an interrupt
but in the interrupt handler we don't find any status bit that points to
the reason we got this interrupt.

This may be a case of a rare HW issue or signal integrity issue that is
still under investigation.

In order to overcome this we are doing the following:
1. Disable incoming interrupts in master mode only when slave mode is not
   enabled.
2. Clear end of busy (EOB) after every interrupt.
3. Clear other status bits (just in case since we found them cleared)
4. Return correct status during the interrupt that will finish the
   transaction.

On next xmit transaction if the bus is still busy the master will issue a
recovery process before issuing the new transaction.

Fixes: 56a1485b ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
Signed-off-by: default avatarTali Perry <tali.perry1@gmail.com>
Signed-off-by: default avatarTyrone Ting <kfting@nuvoton.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent ea9f8426
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment