summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
diff options
context:
space:
mode:
authorJosh Wu2014-06-10 11:50:11 +0200
committerBrian Norris2014-07-22 05:05:36 +0200
commite4e069347030ab0fea7304d06704fb3b64e5fe40 (patch)
tree8be0d57b3c64f5e882db5bf77bbacb0f9888e1f0 /drivers/mtd/nand/gpmi-nand/gpmi-nand.c
parentmtd: atmel_nand: implement the nfc_device_ready() by checking the R/B bit (diff)
downloadkernel-qcow2-linux-e4e069347030ab0fea7304d06704fb3b64e5fe40.tar.gz
kernel-qcow2-linux-e4e069347030ab0fea7304d06704fb3b64e5fe40.tar.xz
kernel-qcow2-linux-e4e069347030ab0fea7304d06704fb3b64e5fe40.zip
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/mtd/nand/gpmi-nand/gpmi-nand.c')
0 files changed, 0 insertions, 0 deletions