diff options
author | Josh Wu <Josh.wu@atmel.com> | 2014-06-10 09:50:11 (GMT) |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-07-22 03:05:36 (GMT) |
commit | e4e069347030ab0fea7304d06704fb3b64e5fe40 (patch) | |
tree | 8be0d57b3c64f5e882db5bf77bbacb0f9888e1f0 /drivers/isdn/pcbit | |
parent | 72a78e3cd2c02c46ce5a3b89a2a854199e5a4820 (diff) | |
download | linux-e4e069347030ab0fea7304d06704fb3b64e5fe40.tar.xz |
mtd: atmel_nand: NFC: support multiple interrupt handling
Fix the following error, which sometimes happens during the NFC data
transfer:
atmel_nand 80000000.nand: Time out to wait for interrupt: 0x00010000
atmel_nand 80000000.nand: something wrong, No XFR_DONE interrupt comes.
The root cause is that in the interrupt handler, we read the ISR but
only handle one interrupt. If more than one interrupt arrive at the same
time, then the second one will be lost.
During the NFC data transfer. Two NFC interrupts (NFC_CMD_DONE and
NFC_XFR_DONE) may come at the same time.
NFC_CMD_DONE means NFC command is sent, and NFC_XFR_DONE means NFC data
is transferred.
This patch can handle multiple NFC interrupts at the same time. During
the NFC data transfer, we need to wait for two NFC interrupts:
NFC_CMD_DONE and NFC_XFR_DONE.
Also we separate the completion initialization code to a
nfc_prepare_interrupt(), which is paired with nfc_wait_interrupt().
We call nfc_prepare_interrupt() before sending out nfc commands, to make
sure no interrupt lost.
Reported-by: Matthieu CRAPET <Matthieu.CRAPET@ingenico.com>
Tested-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/isdn/pcbit')
0 files changed, 0 insertions, 0 deletions